/* Generated by Cython 3.0.8 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "NPY_1_7_API_VERSION"
            ]
        ],
        "depends": [
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h",
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include/numpy/arrayscalars.h",
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h",
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h",
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include/numpy/ufuncobject.h"
        ],
        "extra_compile_args": [
            "-Wno-parentheses-equality",
            "-Wno-unreachable-code-fallthrough"
        ],
        "extra_objects": [
            "./sndlib/libsndlib.a"
        ],
        "include_dirs": [
            "/private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/core/include",
            "./sndlib"
        ],
        "libraries": [
            "m"
        ],
        "name": "pysndlib.clm",
        "sources": [
            "src/pysndlib/clm.pyx"
        ]
    },
    "module_name": "pysndlib.clm"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030008F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
    if (!empty_bytes) return NULL;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__pysndlib__clm
#define __PYX_HAVE_API__pysndlib__clm
/* Early includes */
#include <string.h>
#include <stdio.h>

    /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"
#include "sndlib.h"
#include "clm.h"

    typedef mus_float_t (*connect_points_cb)(mus_float_t val);
    typedef mus_float_t (*input_cb)(void *arg, int direction);
    typedef int (*edit_cb)(void *closure);
    typedef bool (*analyze_cb)(void *arg, mus_float_t (*input)(void *arg1, int direction));
	typedef mus_float_t (*synthesize_cb)(void *arg);
	typedef void (*detour_cb)(mus_any *ptr, mus_long_t val);

    typedef mus_any* mus_any_ptr;
    typedef mus_any** mus_any_ptr_ptr;
    
#include <math.h>
#include "pythread.h"
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 1
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING "utf8"
#define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = (char) c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "src/pysndlib/clm.pyx",
  "<stringsource>",
  "__init__.cython-30.pxd",
  "type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* BufferFormatStructs.proto */
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;

/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #pragma intrinsic (_InterlockedExchangeAdd)
    #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])

/* #### Code section: numeric_typedefs ### */

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":730
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":731
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":732
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":733
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":737
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":738
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":739
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":740
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":744
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":745
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":754
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":755
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":757
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":758
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":760
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":761
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":763
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":764
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":765
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* #### Code section: complex_type_declarations ### */
/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_8pysndlib_3clm_mus_any;
struct __pyx_obj_8pysndlib_3clm_mus_any_array;
struct __pyx_obj_8pysndlib_3clm_array_readin_gen;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb;
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator;
struct __pyx_obj___Pyx_EnumMeta;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":767
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":768
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;

/* "pysndlib/sndlib.pxd":11
 * csndlib.mus_sound_initialize()
 * 
 * cpdef enum Header:             # <<<<<<<<<<<<<<
 *     """
 *     file types for audio files
 */
enum __pyx_t_8pysndlib_6sndlib_Header {
  __pyx_e_8pysndlib_6sndlib_UNKNOWN_HEADER,
  __pyx_e_8pysndlib_6sndlib_NEXT,
  __pyx_e_8pysndlib_6sndlib_AIFC,
  __pyx_e_8pysndlib_6sndlib_RIFF,
  __pyx_e_8pysndlib_6sndlib_RF64,
  __pyx_e_8pysndlib_6sndlib_BICSF,
  __pyx_e_8pysndlib_6sndlib_NIST,
  __pyx_e_8pysndlib_6sndlib_INRS,
  __pyx_e_8pysndlib_6sndlib_ESPS,
  __pyx_e_8pysndlib_6sndlib_SVX,
  __pyx_e_8pysndlib_6sndlib_VOC,
  __pyx_e_8pysndlib_6sndlib_SNDT,
  __pyx_e_8pysndlib_6sndlib_RAW,
  __pyx_e_8pysndlib_6sndlib_SMP,
  __pyx_e_8pysndlib_6sndlib_AVR,
  __pyx_e_8pysndlib_6sndlib_IRCAM,
  __pyx_e_8pysndlib_6sndlib_SD1,
  __pyx_e_8pysndlib_6sndlib_SPPACK,
  __pyx_e_8pysndlib_6sndlib_MUS10,
  __pyx_e_8pysndlib_6sndlib_HCOM,
  __pyx_e_8pysndlib_6sndlib_PSION,
  __pyx_e_8pysndlib_6sndlib_MAUD,
  __pyx_e_8pysndlib_6sndlib_IEEE,
  __pyx_e_8pysndlib_6sndlib_MATLAB,
  __pyx_e_8pysndlib_6sndlib_ADC,
  __pyx_e_8pysndlib_6sndlib_MIDI,
  __pyx_e_8pysndlib_6sndlib_SOUNDFONT,
  __pyx_e_8pysndlib_6sndlib_GRAVIS,
  __pyx_e_8pysndlib_6sndlib_COMDISCO,
  __pyx_e_8pysndlib_6sndlib_GOLDWAVE,
  __pyx_e_8pysndlib_6sndlib_SRFS,
  __pyx_e_8pysndlib_6sndlib_MIDI_SAMPLE_DUMP,
  __pyx_e_8pysndlib_6sndlib_DIAMONDWARE,
  __pyx_e_8pysndlib_6sndlib_ADF,
  __pyx_e_8pysndlib_6sndlib_SBSTUDIOII,
  __pyx_e_8pysndlib_6sndlib_DELUSION,
  __pyx_e_8pysndlib_6sndlib_FARANDOLE,
  __pyx_e_8pysndlib_6sndlib_SAMPLE_DUMP,
  __pyx_e_8pysndlib_6sndlib_ULTRATRACKER,
  __pyx_e_8pysndlib_6sndlib_YAMAHA_SY85,
  __pyx_e_8pysndlib_6sndlib_YAMAHA_TX16W,
  __pyx_e_8pysndlib_6sndlib_DIGIPLAYER,
  __pyx_e_8pysndlib_6sndlib_COVOX,
  __pyx_e_8pysndlib_6sndlib_AVI,
  __pyx_e_8pysndlib_6sndlib_OMF,
  __pyx_e_8pysndlib_6sndlib_QUICKTIME,
  __pyx_e_8pysndlib_6sndlib_ASF,
  __pyx_e_8pysndlib_6sndlib_YAMAHA_SY99,
  __pyx_e_8pysndlib_6sndlib_KURZWEIL_2000,
  __pyx_e_8pysndlib_6sndlib_AIFF,
  __pyx_e_8pysndlib_6sndlib_PAF,
  __pyx_e_8pysndlib_6sndlib_CSL,
  __pyx_e_8pysndlib_6sndlib_FILE_SAMP,
  __pyx_e_8pysndlib_6sndlib_PVF,
  __pyx_e_8pysndlib_6sndlib_SOUNDFORGE,
  __pyx_e_8pysndlib_6sndlib_TWINVQ,
  __pyx_e_8pysndlib_6sndlib_AKAI4,
  __pyx_e_8pysndlib_6sndlib_IMPULSETRACKER,
  __pyx_e_8pysndlib_6sndlib_KORG,
  __pyx_e_8pysndlib_6sndlib_NVF,
  __pyx_e_8pysndlib_6sndlib_CAFF,
  __pyx_e_8pysndlib_6sndlib_MAUI,
  __pyx_e_8pysndlib_6sndlib_SDIF,
  __pyx_e_8pysndlib_6sndlib_OGG,
  __pyx_e_8pysndlib_6sndlib_FLAC,
  __pyx_e_8pysndlib_6sndlib_SPEEX,
  __pyx_e_8pysndlib_6sndlib_MPEG,
  __pyx_e_8pysndlib_6sndlib_SHORTEN,
  __pyx_e_8pysndlib_6sndlib_TTA,
  __pyx_e_8pysndlib_6sndlib_WAVPACK,
  __pyx_e_8pysndlib_6sndlib_SOX,
  __pyx_e_8pysndlib_6sndlib_NUM_HEADERS
};

/* "pysndlib/sndlib.pxd":17
 *     UNKNOWN_HEADER, NEXT, AIFC, RIFF, RF64, BICSF, NIST, INRS, ESPS, SVX, VOC, SNDT, RAW, SMP, AVR, IRCAM, SD1, SPPACK, MUS10, HCOM, PSION, MAUD, IEEE, MATLAB, ADC, MIDI, SOUNDFONT, GRAVIS, COMDISCO, GOLDWAVE, SRFS, MIDI_SAMPLE_DUMP, DIAMONDWARE, ADF, SBSTUDIOII, DELUSION, FARANDOLE, SAMPLE_DUMP, ULTRATRACKER, YAMAHA_SY85, YAMAHA_TX16W, DIGIPLAYER, COVOX, AVI, OMF, QUICKTIME, ASF, YAMAHA_SY99, KURZWEIL_2000, AIFF, PAF, CSL, FILE_SAMP, PVF, SOUNDFORGE, TWINVQ, AKAI4, IMPULSETRACKER, KORG, NVF, CAFF, MAUI, SDIF, OGG, FLAC, SPEEX, MPEG, SHORTEN, TTA, WAVPACK, SOX, NUM_HEADERS,
 * 
 * cpdef enum Sample:             # <<<<<<<<<<<<<<
 *     """
 *     numerical sample types
 */
enum __pyx_t_8pysndlib_6sndlib_Sample {
  __pyx_e_8pysndlib_6sndlib_UNKNOWN_SAMPLE,
  __pyx_e_8pysndlib_6sndlib_BSHORT,
  __pyx_e_8pysndlib_6sndlib_MULAW,
  __pyx_e_8pysndlib_6sndlib_BYTE,
  __pyx_e_8pysndlib_6sndlib_BFLOAT,
  __pyx_e_8pysndlib_6sndlib_BINT,
  __pyx_e_8pysndlib_6sndlib_ALAW,
  __pyx_e_8pysndlib_6sndlib_UBYTE,
  __pyx_e_8pysndlib_6sndlib_B24INT,
  __pyx_e_8pysndlib_6sndlib_BDOUBLE,
  __pyx_e_8pysndlib_6sndlib_LSHORT,
  __pyx_e_8pysndlib_6sndlib_LINT,
  __pyx_e_8pysndlib_6sndlib_LFLOAT,
  __pyx_e_8pysndlib_6sndlib_LDOUBLE,
  __pyx_e_8pysndlib_6sndlib_UBSHORT,
  __pyx_e_8pysndlib_6sndlib_ULSHORT,
  __pyx_e_8pysndlib_6sndlib_L24INT,
  __pyx_e_8pysndlib_6sndlib_BINTN,
  __pyx_e_8pysndlib_6sndlib_LINTN,
  __pyx_e_8pysndlib_6sndlib_BFLOAT_UNSCALED,
  __pyx_e_8pysndlib_6sndlib_LFLOAT_UNSCALED,
  __pyx_e_8pysndlib_6sndlib_BDOUBLE_UNSCALED,
  __pyx_e_8pysndlib_6sndlib_LDOUBLE_UNSCALED,
  __pyx_e_8pysndlib_6sndlib_NUM_SAMPLES
};

/* "pysndlib/sndlib.pxd":23
 *     UNKNOWN_SAMPLE, BSHORT, MULAW, BYTE, BFLOAT, BINT, ALAW, UBYTE, B24INT, BDOUBLE, LSHORT, LINT, LFLOAT, LDOUBLE, UBSHORT, ULSHORT, L24INT, BINTN, LINTN, BFLOAT_UNSCALED, LFLOAT_UNSCALED, BDOUBLE_UNSCALED, LDOUBLE_UNSCALED, NUM_SAMPLES,
 * 
 * cpdef enum Error:             # <<<<<<<<<<<<<<
 *     """
 *     sndlib and clm errors
 */
enum __pyx_t_8pysndlib_6sndlib_Error {
  __pyx_e_8pysndlib_6sndlib_NO_ERROR,
  __pyx_e_8pysndlib_6sndlib_NO_FREQUENCY,
  __pyx_e_8pysndlib_6sndlib_NO_PHASE,
  __pyx_e_8pysndlib_6sndlib_NO_GEN,
  __pyx_e_8pysndlib_6sndlib_NO_LENGTH,
  __pyx_e_8pysndlib_6sndlib_NO_DESCRIBE,
  __pyx_e_8pysndlib_6sndlib_NO_DATA,
  __pyx_e_8pysndlib_6sndlib_NO_SCALER,
  __pyx_e_8pysndlib_6sndlib_MEMORY_ALLOCATION_FAILED,
  __pyx_e_8pysndlib_6sndlib_CANT_OPEN_FILE,
  __pyx_e_8pysndlib_6sndlib_NO_SAMPLE_INPUT,
  __pyx_e_8pysndlib_6sndlib_NO_SAMPLE_OUTPUT,
  __pyx_e_8pysndlib_6sndlib_NO_SUCH_CHANNEL,
  __pyx_e_8pysndlib_6sndlib_NO_FILE_NAME_PROVIDED,
  __pyx_e_8pysndlib_6sndlib_NO_LOCATION,
  __pyx_e_8pysndlib_6sndlib_NO_CHANNEL,
  __pyx_e_8pysndlib_6sndlib_NO_SUCH_FFT_WINDOW,
  __pyx_e_8pysndlib_6sndlib_UNSUPPORTED_SAMPLE_TYPE,
  __pyx_e_8pysndlib_6sndlib_HEADER_READ_FAILED,
  __pyx_e_8pysndlib_6sndlib_UNSUPPORTED_HEADER_TYPE,
  __pyx_e_8pysndlib_6sndlib_FILE_DESCRIPTORS_NOT_INITIALIZED,
  __pyx_e_8pysndlib_6sndlib_NOT_A_SOUND_FILE,
  __pyx_e_8pysndlib_6sndlib_FILE_CLOSED,
  __pyx_e_8pysndlib_6sndlib_WRITE_ERROR,
  __pyx_e_8pysndlib_6sndlib_HEADER_WRITE_FAILED,
  __pyx_e_8pysndlib_6sndlib_CANT_OPEN_TEMP_FILE,
  __pyx_e_8pysndlib_6sndlib_INTERRUPTED,
  __pyx_e_8pysndlib_6sndlib_BAD_ENVELOPE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CHANNELS_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_SRATE_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_SAMPLE_TYPE_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_NO_INPUT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CONFIGURATION_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_WRITE_ERROR,
  __pyx_e_8pysndlib_6sndlib_AUDIO_SIZE_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_DEVICE_NOT_AVAILABLE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CANT_CLOSE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CANT_OPEN,
  __pyx_e_8pysndlib_6sndlib_AUDIO_READ_ERROR,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CANT_WRITE,
  __pyx_e_8pysndlib_6sndlib_AUDIO_CANT_READ,
  __pyx_e_8pysndlib_6sndlib_AUDIO_NO_READ_PERMISSION,
  __pyx_e_8pysndlib_6sndlib_CANT_CLOSE_FILE,
  __pyx_e_8pysndlib_6sndlib_ARG_OUT_OF_RANGE,
  __pyx_e_8pysndlib_6sndlib_NO_CHANNELS,
  __pyx_e_8pysndlib_6sndlib_NO_HOP,
  __pyx_e_8pysndlib_6sndlib_NO_WIDTH,
  __pyx_e_8pysndlib_6sndlib_NO_FILE_NAME,
  __pyx_e_8pysndlib_6sndlib_NO_RAMP,
  __pyx_e_8pysndlib_6sndlib_NO_RUN,
  __pyx_e_8pysndlib_6sndlib_NO_INCREMENT,
  __pyx_e_8pysndlib_6sndlib_NO_OFFSET,
  __pyx_e_8pysndlib_6sndlib_NO_XCOEFF,
  __pyx_e_8pysndlib_6sndlib_NO_YCOEFF,
  __pyx_e_8pysndlib_6sndlib_NO_XCOEFFS,
  __pyx_e_8pysndlib_6sndlib_NO_YCOEFFS,
  __pyx_e_8pysndlib_6sndlib_NO_RESET,
  __pyx_e_8pysndlib_6sndlib_BAD_SIZE,
  __pyx_e_8pysndlib_6sndlib_CANT_CONVERT,
  __pyx_e_8pysndlib_6sndlib_READ_ERROR,
  __pyx_e_8pysndlib_6sndlib_NO_FEEDFORWARD,
  __pyx_e_8pysndlib_6sndlib_NO_FEEDBACK,
  __pyx_e_8pysndlib_6sndlib_NO_INTERP_TYPE,
  __pyx_e_8pysndlib_6sndlib_NO_POSITION,
  __pyx_e_8pysndlib_6sndlib_NO_ORDER,
  __pyx_e_8pysndlib_6sndlib_NO_COPY,
  __pyx_e_8pysndlib_6sndlib_CANT_TRANSLATE,
  __pyx_e_8pysndlib_6sndlib_NUM_ERRORS
};
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr;
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data;
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next;
struct __pyx_opt_args_8pysndlib_3clm_get_srate;
struct __pyx_opt_args_8pysndlib_3clm_random;
struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement;
struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate;
struct __pyx_opt_args_8pysndlib_3clm_make_fft_window;
struct __pyx_opt_args_8pysndlib_3clm_file2ndarray;
struct __pyx_opt_args_8pysndlib_3clm_ndarray2file;
struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum;
struct __pyx_opt_args_8pysndlib_3clm_spectrum;
struct __pyx_opt_args_8pysndlib_3clm_convolution;
struct __pyx_opt_args_8pysndlib_3clm_mus_convolution;
struct __pyx_opt_args_8pysndlib_3clm_partials2wave;
struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave;
struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial;
struct __pyx_opt_args_8pysndlib_3clm_oscil;
struct __pyx_opt_args_8pysndlib_3clm_pulsed_env;
struct __pyx_opt_args_8pysndlib_3clm_table_lookup;
struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env;
struct __pyx_opt_args_8pysndlib_3clm_polywave;
struct __pyx_opt_args_8pysndlib_3clm_polyshape;
struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated;
struct __pyx_opt_args_8pysndlib_3clm_triangle_wave;
struct __pyx_opt_args_8pysndlib_3clm_square_wave;
struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave;
struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave;
struct __pyx_opt_args_8pysndlib_3clm_pulse_train;
struct __pyx_opt_args_8pysndlib_3clm_ncos;
struct __pyx_opt_args_8pysndlib_3clm_nsin;
struct __pyx_opt_args_8pysndlib_3clm_nrxysin;
struct __pyx_opt_args_8pysndlib_3clm_nrxycos;
struct __pyx_opt_args_8pysndlib_3clm_rxykcos;
struct __pyx_opt_args_8pysndlib_3clm_rxyksin;
struct __pyx_opt_args_8pysndlib_3clm_ssb_am;
struct __pyx_opt_args_8pysndlib_3clm_wave_train;
struct __pyx_opt_args_8pysndlib_3clm_rand;
struct __pyx_opt_args_8pysndlib_3clm_rand_interp;
struct __pyx_opt_args_8pysndlib_3clm_formant;
struct __pyx_opt_args_8pysndlib_3clm_firmant;
struct __pyx_opt_args_8pysndlib_3clm_delay;
struct __pyx_opt_args_8pysndlib_3clm_tap;
struct __pyx_opt_args_8pysndlib_3clm_comb;
struct __pyx_opt_args_8pysndlib_3clm_filtered_comb;
struct __pyx_opt_args_8pysndlib_3clm_notch;
struct __pyx_opt_args_8pysndlib_3clm_all_pass;
struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm;
struct __pyx_opt_args_8pysndlib_3clm_file2sample;
struct __pyx_opt_args_8pysndlib_3clm_src;
struct __pyx_opt_args_8pysndlib_3clm_out_any;
struct __pyx_opt_args_8pysndlib_3clm_outa;
struct __pyx_opt_args_8pysndlib_3clm_outb;
struct __pyx_opt_args_8pysndlib_3clm_outc;
struct __pyx_opt_args_8pysndlib_3clm_outd;
struct __pyx_opt_args_8pysndlib_3clm_convolve_files;
struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance;
struct __pyx_opt_args_8pysndlib_3clm_edot_product;
struct __pyx_opt_args_8pysndlib_3clm_check_ndim;
struct __pyx_opt_args_8pysndlib_3clm_check_range;
struct __pyx_opt_args_8pysndlib_3clm_make_oscil;
struct __pyx_opt_args_8pysndlib_3clm_make_oscil_bank;
struct __pyx_opt_args_8pysndlib_3clm_make_env;
struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup;
struct __pyx_opt_args_8pysndlib_3clm_make_polywave;
struct __pyx_opt_args_8pysndlib_3clm_make_polyshape;
struct __pyx_opt_args_8pysndlib_3clm_make_triangle_wave;
struct __pyx_opt_args_8pysndlib_3clm_make_square_wave;
struct __pyx_opt_args_8pysndlib_3clm_make_pulse_train;
struct __pyx_opt_args_8pysndlib_3clm_make_ncos;
struct __pyx_opt_args_8pysndlib_3clm_make_nsin;
struct __pyx_opt_args_8pysndlib_3clm_make_nrxysin;
struct __pyx_opt_args_8pysndlib_3clm_make_nrxycos;
struct __pyx_opt_args_8pysndlib_3clm_make_rxykcos;
struct __pyx_opt_args_8pysndlib_3clm_make_rxyksin;
struct __pyx_opt_args_8pysndlib_3clm_make_ssb_am;
struct __pyx_opt_args_8pysndlib_3clm_make_wave_train;
struct __pyx_opt_args_8pysndlib_3clm_make_wave_train_with_env;
struct __pyx_opt_args_8pysndlib_3clm_make_rand;
struct __pyx_opt_args_8pysndlib_3clm_make_rand_interp;
struct __pyx_opt_args_8pysndlib_3clm_make_two_pole;
struct __pyx_opt_args_8pysndlib_3clm_make_two_zero;
struct __pyx_opt_args_8pysndlib_3clm_make_formant_bank;
struct __pyx_opt_args_8pysndlib_3clm_make_delay;
struct __pyx_opt_args_8pysndlib_3clm_make_comb;
struct __pyx_opt_args_8pysndlib_3clm_make_filtered_comb;
struct __pyx_opt_args_8pysndlib_3clm_make_notch;
struct __pyx_opt_args_8pysndlib_3clm_make_all_pass;
struct __pyx_opt_args_8pysndlib_3clm_make_moving_average;
struct __pyx_opt_args_8pysndlib_3clm_make_moving_max;
struct __pyx_opt_args_8pysndlib_3clm_make_moving_norm;
struct __pyx_opt_args_8pysndlib_3clm_make_asymmetric_fm;
struct __pyx_opt_args_8pysndlib_3clm_make_file2sample;
struct __pyx_opt_args_8pysndlib_3clm_make_sample2file;
struct __pyx_opt_args_8pysndlib_3clm_make_file2frample;
struct __pyx_opt_args_8pysndlib_3clm_make_frample2file;
struct __pyx_opt_args_8pysndlib_3clm_make_readin;
struct __pyx_opt_args_8pysndlib_3clm_make_locsig;
struct __pyx_opt_args_8pysndlib_3clm_make_array_readin;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;

/* "pysndlib/clm.pxd":14
 * 
 * # --------------- clm enums ---------------- #
 * cpdef enum Interp:             # <<<<<<<<<<<<<<
 *     """
 *     various interpolation types
 */
enum __pyx_t_8pysndlib_3clm_Interp {
  __pyx_e_8pysndlib_3clm_NONE,
  __pyx_e_8pysndlib_3clm_LINEAR,
  __pyx_e_8pysndlib_3clm_SINUSOIDAL,
  __pyx_e_8pysndlib_3clm_ALL_PASS,
  __pyx_e_8pysndlib_3clm_LAGRANGE,
  __pyx_e_8pysndlib_3clm_BEZIER,
  __pyx_e_8pysndlib_3clm_HERMITE
};

/* "pysndlib/clm.pxd":20
 *     NONE, LINEAR,SINUSOIDAL, ALL_PASS, LAGRANGE, BEZIER, HERMITE
 * 
 * cpdef enum Window:             # <<<<<<<<<<<<<<
 *     """
 *     many useful windows
 */
enum __pyx_t_8pysndlib_3clm_Window {
  __pyx_e_8pysndlib_3clm_RECTANGULAR,
  __pyx_e_8pysndlib_3clm_HANN,
  __pyx_e_8pysndlib_3clm_WELCH,
  __pyx_e_8pysndlib_3clm_PARZEN,
  __pyx_e_8pysndlib_3clm_BARTLETT,
  __pyx_e_8pysndlib_3clm_HAMMING,
  __pyx_e_8pysndlib_3clm_BLACKMAN2,
  __pyx_e_8pysndlib_3clm_BLACKMAN3,
  __pyx_e_8pysndlib_3clm_BLACKMAN4,
  __pyx_e_8pysndlib_3clm_EXPONENTIAL,
  __pyx_e_8pysndlib_3clm_RIEMANN,
  __pyx_e_8pysndlib_3clm_KAISER,
  __pyx_e_8pysndlib_3clm_CAUCHY,
  __pyx_e_8pysndlib_3clm_POISSON,
  __pyx_e_8pysndlib_3clm_GAUSSIAN,
  __pyx_e_8pysndlib_3clm_TUKEY,
  __pyx_e_8pysndlib_3clm_DOLPH_CHEBYSHEV,
  __pyx_e_8pysndlib_3clm_HANN_POISSON,
  __pyx_e_8pysndlib_3clm_CONNES,
  __pyx_e_8pysndlib_3clm_SAMARAKI,
  __pyx_e_8pysndlib_3clm_ULTRASPHERICAL,
  __pyx_e_8pysndlib_3clm_BARTLETT_HANN,
  __pyx_e_8pysndlib_3clm_BOHMAN,
  __pyx_e_8pysndlib_3clm_FLAT_TOP,
  __pyx_e_8pysndlib_3clm_BLACKMAN5,
  __pyx_e_8pysndlib_3clm_BLACKMAN6,
  __pyx_e_8pysndlib_3clm_BLACKMAN7,
  __pyx_e_8pysndlib_3clm_BLACKMAN8,
  __pyx_e_8pysndlib_3clm_BLACKMAN9,
  __pyx_e_8pysndlib_3clm_BLACKMAN10,
  __pyx_e_8pysndlib_3clm_RV2,
  __pyx_e_8pysndlib_3clm_RV3,
  __pyx_e_8pysndlib_3clm_RV4,
  __pyx_e_8pysndlib_3clm_MLT_SINE,
  __pyx_e_8pysndlib_3clm_PAPOULIS,
  __pyx_e_8pysndlib_3clm_DPSS,
  __pyx_e_8pysndlib_3clm_SINC
};

/* "pysndlib/clm.pxd":26
 *     RECTANGULAR, HANN, WELCH, PARZEN, BARTLETT, HAMMING, BLACKMAN2, BLACKMAN3, BLACKMAN4, EXPONENTIAL, RIEMANN, KAISER, CAUCHY, POISSON, GAUSSIAN, TUKEY, DOLPH_CHEBYSHEV, HANN_POISSON, CONNES, SAMARAKI, ULTRASPHERICAL, BARTLETT_HANN, BOHMAN, FLAT_TOP, BLACKMAN5, BLACKMAN6, BLACKMAN7, BLACKMAN8, BLACKMAN9, BLACKMAN10, RV2, RV3, RV4, MLT_SINE, PAPOULIS, DPSS, SINC,
 * 
 * cpdef enum Spectrum:             # <<<<<<<<<<<<<<
 *     """
 *     types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw
 */
enum __pyx_t_8pysndlib_3clm_Spectrum {
  __pyx_e_8pysndlib_3clm_IN_DB,
  __pyx_e_8pysndlib_3clm_NORMALIZED,
  __pyx_e_8pysndlib_3clm_RAW
};

/* "pysndlib/clm.pxd":32
 *     IN_DB, NORMALIZED, RAW
 * 
 * cpdef enum Polynomial:             # <<<<<<<<<<<<<<
 *     """
 *     used for polynomial based gens
 */
enum __pyx_t_8pysndlib_3clm_Polynomial {
  __pyx_e_8pysndlib_3clm_EITHER_KIND,
  __pyx_e_8pysndlib_3clm_FIRST_KIND,
  __pyx_e_8pysndlib_3clm_SECOND_KIND,
  __pyx_e_8pysndlib_3clm_BOTH_KINDS
};

/* "pysndlib/clm.pxd":77
 *     # these should all be considered private
 *     @staticmethod
 *     cdef mus_any from_ptr(cclm.mus_any *_ptr, bint owner=*, cython.int length=*)             # <<<<<<<<<<<<<<
 * 
 *     cpdef cache_append(self, obj)
 */
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr {
  int __pyx_n;
  int owner;
  int length;
};

/* "pysndlib/clm.pxd":81
 *     cpdef cache_append(self, obj)
 *     cpdef cache_extend(self, obj)
 *     cpdef set_up_data(self , cython.int length=*)             # <<<<<<<<<<<<<<
 *     cpdef set_up_xcoeffs(self)
 *     cpdef set_up_ycoeffs(self)
 */
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data {
  int __pyx_n;
  int length;
};

/* "pysndlib/clm.pxd":88
 *     # these should all be considered public
 *     cpdef mus_reset(self)
 *     cpdef next(self, cython.double arg1=*, cython.double arg2=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next {
  int __pyx_n;
  double arg1;
  double arg2;
};

/* "pysndlib/clm.pxd":97
 * cpdef mus_reset(mus_any obj)
 * cpdef cython.long get_length(obj)
 * cpdef cython.double get_srate(obj=*)             # <<<<<<<<<<<<<<
 * cpdef cython.long get_framples(obj)
 * cpdef cython.long get_channels(obj)
 */
struct __pyx_opt_args_8pysndlib_3clm_get_srate {
  int __pyx_n;
  PyObject *obj;
};

/* "pysndlib/clm.pxd":100
 * cpdef cython.long get_framples(obj)
 * cpdef cython.long get_channels(obj)
 * cpdef cython.double random(cython.double x=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_zero( cython.double x)
 * cpdef bint is_even(n)
 */
struct __pyx_opt_args_8pysndlib_3clm_random {
  int __pyx_n;
  double x;
};

/* "pysndlib/clm.pxd":119
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2)
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3)
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index=* )             # <<<<<<<<<<<<<<
 * cpdef cython.double dot_product(np.ndarray data1, np.ndarray  data2)
 * cpdef cython.double polynomial(np.ndarray coeffs, cython.double x )
 */
struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement {
  int __pyx_n;
  double fm_index;
};

/* "pysndlib/clm.pxd":124
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x)
 * cpdef cython.double bessi0(cython.double x)
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =*)             # <<<<<<<<<<<<<<
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=* , cython.double alpha=*)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate {
  int __pyx_n;
  double y1;
};

/* "pysndlib/clm.pxd":125
 * cpdef cython.double bessi0(cython.double x)
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =*)
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=* , cython.double alpha=*)             # <<<<<<<<<<<<<<
 * 
 * cpdef file2ndarray(str filename, channel=*, beg=*, size=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_make_fft_window {
  int __pyx_n;
  double beta;
  double alpha;
};

/* "pysndlib/clm.pxd":127
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=* , cython.double alpha=*)
 * 
 * cpdef file2ndarray(str filename, channel=*, beg=*, size=*)             # <<<<<<<<<<<<<<
 * cpdef ndarray2file(str filename, np.ndarray arr, size=*, sr=*, sample_type=*, header_type=*, comment=* )
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_file2ndarray {
  int __pyx_n;
  PyObject *channel;
  PyObject *beg;
  PyObject *size;
};

/* "pysndlib/clm.pxd":128
 * 
 * cpdef file2ndarray(str filename, channel=*, beg=*, size=*)
 * cpdef ndarray2file(str filename, np.ndarray arr, size=*, sr=*, sample_type=*, header_type=*, comment=* )             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_ndarray2file {
  int __pyx_n;
  PyObject *size;
  PyObject *sr;
  PyObject *sample_type;
  PyObject *header_type;
  PyObject *comment;
};

/* "pysndlib/clm.pxd":139
 * cpdef np.ndarray mus_polar2rectangular(np.ndarray rdat,  np.ndarray idat)
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat)
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)             # <<<<<<<<<<<<<<
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray idat,np.ndarray window, Spectrum norm_type=*)
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum {
  int __pyx_n;
  enum __pyx_t_8pysndlib_3clm_Spectrum norm_type;
};

/* "pysndlib/clm.pxd":140
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat)
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray idat,np.ndarray window, Spectrum norm_type=*)             # <<<<<<<<<<<<<<
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)
 * cpdef np.ndarray convolution(np.ndarray rl1, np.ndarray  rl2, fft_size = *)
 */
struct __pyx_opt_args_8pysndlib_3clm_spectrum {
  int __pyx_n;
  enum __pyx_t_8pysndlib_3clm_Spectrum norm_type;
};

/* "pysndlib/clm.pxd":142
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray idat,np.ndarray window, Spectrum norm_type=*)
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)
 * cpdef np.ndarray convolution(np.ndarray rl1, np.ndarray  rl2, fft_size = *)             # <<<<<<<<<<<<<<
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size=*)
 * cpdef np.ndarray autocorrelate(np.ndarray data)
 */
struct __pyx_opt_args_8pysndlib_3clm_convolution {
  int __pyx_n;
  PyObject *fft_size;
};

/* "pysndlib/clm.pxd":143
 * cpdef np.ndarray mus_spectrum(np.ndarray rdat, np.ndarray  idat, np.ndarray  window, Spectrum norm_type=*)
 * cpdef np.ndarray convolution(np.ndarray rl1, np.ndarray  rl2, fft_size = *)
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size=*)             # <<<<<<<<<<<<<<
 * cpdef np.ndarray autocorrelate(np.ndarray data)
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data)
 */
struct __pyx_opt_args_8pysndlib_3clm_mus_convolution {
  int __pyx_n;
  PyObject *fft_size;
};

/* "pysndlib/clm.pxd":150
 * cpdef np.ndarray mus_cepstrum( np.ndarray data)
 * cpdef np.ndarray cepstrum(np.ndarray data)
 * cpdef np.ndarray partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )             # <<<<<<<<<<<<<<
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_partials2wave {
  int __pyx_n;
  PyArrayObject *wave;
  PyObject *table_size;
  int norm;
};

/* "pysndlib/clm.pxd":151
 * cpdef np.ndarray cepstrum(np.ndarray data)
 * cpdef np.ndarray partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )             # <<<<<<<<<<<<<<
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=*)
 * cpdef np.ndarray normalize_partials(partials)
 */
struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave {
  int __pyx_n;
  PyArrayObject *wave;
  PyObject *table_size;
  int norm;
};

/* "pysndlib/clm.pxd":152
 * cpdef np.ndarray partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=*, table_size=*, bint norm=* )
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=*)             # <<<<<<<<<<<<<<
 * cpdef np.ndarray normalize_partials(partials)
 * cpdef cython.double chebyshev_tu_sum(cython.double x, tcoeffs, ucoeffs)
 */
struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial {
  int __pyx_n;
  enum __pyx_t_8pysndlib_3clm_Polynomial kind;
};

/* "pysndlib/clm.pxd":160
 * # ---------------- clm gen ---------------- #
 * 
 * cpdef cython.double oscil(mus_any gen, cython.double fm=*, cython.double pm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double oscil_unmodulated(mus_any gen)
 * cpdef bint is_oscil(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_oscil {
  int __pyx_n;
  double fm;
  double pm;
};

/* "pysndlib/clm.pxd":176
 * cpdef cython.double env_any(mus_any gen , connection_function)
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen)
 * cpdef bint is_pulsed_env(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_pulsed_env {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":180
 * cpdef bint is_pulsed_env(mus_any gen)
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double table_lookup_unmodulated(mus_any gen)
 * cpdef bint is_table_lookup(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_table_lookup {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":183
 * cpdef cython.double table_lookup_unmodulated(mus_any gen)
 * cpdef bint is_table_lookup(mus_any gen)
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= *)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env {
  int __pyx_n;
  PyObject *size;
};

/* "pysndlib/clm.pxd":185
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= *)
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double polywave_unmodulated(mus_any gen)
 * cpdef bint is_polywave(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_polywave {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":189
 * cpdef bint is_polywave(mus_any gen)
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=*, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=*)
 * cpdef bint is_polyshape(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_polyshape {
  int __pyx_n;
  double index;
  double fm;
};

/* "pysndlib/clm.pxd":190
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=*, cython.double fm=*)
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_polyshape(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated {
  int __pyx_n;
  double index;
};

/* "pysndlib/clm.pxd":193
 * cpdef bint is_polyshape(mus_any gen)
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double triangle_wave_unmodulated(mus_any gen)
 * cpdef bint is_triangle_wave(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_triangle_wave {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":197
 * cpdef bint is_triangle_wave(mus_any gen)
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_square_wave(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_square_wave {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":200
 * cpdef bint is_square_wave(mus_any gen)
 * 
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=*, cython.double phase=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =*)
 * cpdef bint is_sawtooth_wave(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave {
  int __pyx_n;
  double amplitude;
  double phase;
};

/* "pysndlib/clm.pxd":201
 * 
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=*, cython.double phase=*)
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =*)             # <<<<<<<<<<<<<<
 * cpdef bint is_sawtooth_wave(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":204
 * cpdef bint is_sawtooth_wave(mus_any gen)
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double pulse_train_unmodulated(mus_any gen)
 * cpdef bint is_pulse_train(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_pulse_train {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":208
 * cpdef bint is_pulse_train(mus_any gen)
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_ncos(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_ncos {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":211
 * cpdef bint is_ncos(mus_any gen)
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_nsin(mus_any gen )
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_nsin {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":214
 * cpdef bint is_nsin(mus_any gen )
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_nrxysin(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_nrxysin {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":217
 * cpdef bint is_nrxysin(mus_any gen)
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_nrxycos(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_nrxycos {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":220
 * cpdef bint is_nrxycos(mus_any gen)
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_rxykcos(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_rxykcos {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":223
 * cpdef bint is_rxykcos(mus_any gen)
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_rxyksin(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_rxyksin {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":226
 * cpdef bint is_rxyksin(mus_any gen)
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double ssb_am_unmodulated(mus_any gen, cython.double insig)
 * cpdef bint is_ssb_am(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_ssb_am {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":230
 * cpdef bint is_ssb_am(mus_any gen)
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double wave_train_unmodulated(mus_any gen)
 * cpdef bint is_wave_train(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_wave_train {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":234
 * cpdef bint is_wave_train(mus_any gen)
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double rand_unmodulated(mus_any gen)
 * cpdef bint is_rand(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_rand {
  int __pyx_n;
  double sweep;
};

/* "pysndlib/clm.pxd":238
 * cpdef bint is_rand(mus_any gen)
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=*)             # <<<<<<<<<<<<<<
 * cpdef rand_interp_unmodulated(mus_any gen)
 * cpdef bint is_rand_interp(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_rand_interp {
  int __pyx_n;
  double sweep;
};

/* "pysndlib/clm.pxd":254
 * cpdef bint is_two_zero(mus_any gen)
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_formant(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_formant {
  int __pyx_n;
  double radians;
};

/* "pysndlib/clm.pxd":260
 * cpdef bint is_formant_bank(mus_any gen)
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=*)             # <<<<<<<<<<<<<<
 * cpdef is_firmant(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_firmant {
  int __pyx_n;
  double radians;
};

/* "pysndlib/clm.pxd":272
 * cpdef bint is_iir_filter(mus_any gen)
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig)
 * cpdef bint is_delay(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_delay {
  int __pyx_n;
  double pm;
};

/* "pysndlib/clm.pxd":275
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig)
 * cpdef bint is_delay(mus_any gen)
 * cpdef cython.double tap(mus_any gen, offset=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double tap_unmodulated(mus_any gen)
 * cpdef bint is_tap(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_tap {
  int __pyx_n;
  PyObject *offset;
};

/* "pysndlib/clm.pxd":280
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig )
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_comb(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_comb {
  int __pyx_n;
  PyObject *pm;
};

/* "pysndlib/clm.pxd":286
 * cpdef bint is_comb_bank(mus_any gen)
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double filtered_comb_unmodulated(mus_any gen, cython.double insig)
 * cpdef bint is_filtered_comb(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_filtered_comb {
  int __pyx_n;
  double pm;
};

/* "pysndlib/clm.pxd":293
 * cpdef bint is_filtered_comb_bank(mus_any gen)
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double notch_unmodulated(mus_any gen, cython.double insig)
 * cpdef bint is_notch(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_notch {
  int __pyx_n;
  double pm;
};

/* "pysndlib/clm.pxd":297
 * cpdef bint is_notch(mus_any gen)
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=*)             # <<<<<<<<<<<<<<
 * cpdef is_all_pass(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_all_pass {
  int __pyx_n;
  PyObject *pm;
};

/* "pysndlib/clm.pxd":315
 * cpdef is_moving_norm(mus_any gen)
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=*)             # <<<<<<<<<<<<<<
 * cpdef cython.double asymmetric_fm_unmodulated(mus_any gen, cython.double index)
 * cpdef bint is_asymmetric_fm(mus_any gen)
 */
struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm {
  int __pyx_n;
  double fm;
};

/* "pysndlib/clm.pxd":319
 * cpdef bint is_asymmetric_fm(mus_any gen)
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_file2sample(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_file2sample {
  int __pyx_n;
  int chan;
};

/* "pysndlib/clm.pxd":335
 * cpdef is_readin(mus_any gen)
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=*)             # <<<<<<<<<<<<<<
 * cpdef bint is_src(mus_any gen)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_src {
  int __pyx_n;
  double sr_change;
};

/* "pysndlib/clm.pxd":352
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen)
 * 
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=*)             # <<<<<<<<<<<<<<
 * cpdef outa(cython.long loc, cython.double data, output=*)
 * cpdef outb(cython.long loc, cython.double data, output=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_out_any {
  int __pyx_n;
  PyObject *output;
};

/* "pysndlib/clm.pxd":353
 * 
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=*)
 * cpdef outa(cython.long loc, cython.double data, output=*)             # <<<<<<<<<<<<<<
 * cpdef outb(cython.long loc, cython.double data, output=*)
 * cpdef outc(cython.long loc, cython.double data, output=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_outa {
  int __pyx_n;
  PyObject *output;
};

/* "pysndlib/clm.pxd":354
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=*)
 * cpdef outa(cython.long loc, cython.double data, output=*)
 * cpdef outb(cython.long loc, cython.double data, output=*)             # <<<<<<<<<<<<<<
 * cpdef outc(cython.long loc, cython.double data, output=*)
 * cpdef outd(cython.long loc, cython.double data, output=*)
 */
struct __pyx_opt_args_8pysndlib_3clm_outb {
  int __pyx_n;
  PyObject *output;
};

/* "pysndlib/clm.pxd":355
 * cpdef outa(cython.long loc, cython.double data, output=*)
 * cpdef outb(cython.long loc, cython.double data, output=*)
 * cpdef outc(cython.long loc, cython.double data, output=*)             # <<<<<<<<<<<<<<
 * cpdef outd(cython.long loc, cython.double data, output=*)
 * cpdef in_any(cython.long loc, cython.int channel, inp)
 */
struct __pyx_opt_args_8pysndlib_3clm_outc {
  int __pyx_n;
  PyObject *output;
};

/* "pysndlib/clm.pxd":356
 * cpdef outb(cython.long loc, cython.double data, output=*)
 * cpdef outc(cython.long loc, cython.double data, output=*)
 * cpdef outd(cython.long loc, cython.double data, output=*)             # <<<<<<<<<<<<<<
 * cpdef in_any(cython.long loc, cython.int channel, inp)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_outd {
  int __pyx_n;
  PyObject *output;
};

/* "pysndlib/clm.pxd":372
 * cpdef move_locsig(mus_any gen,cython.double degree, cython.double distance)
 * 
 * cpdef convolve_files(str file1, str file2, cython.double maxamp=*, str outputfile=*, sample_type=*, header_type=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_convolve_files {
  int __pyx_n;
  double maxamp;
  PyObject *outputfile;
  PyObject *sample_type;
  PyObject *header_type;
};

/* "pysndlib/clm.pxd":380
 * cpdef cython.double biquad(mus_any gen, cython.double insig)
 * cpdef bint is_biquad(mus_any gen)
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=*)             # <<<<<<<<<<<<<<
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen)
 * cpdef cython.double bes_j0(cython.double x)
 */
struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance {
  int __pyx_n;
  int normalize;
};

/* "pysndlib/clm.pxd":390
 * 
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=*)             # <<<<<<<<<<<<<<
 * 
 * #cpdef mus_any make_oscil(cython.double frequency=*,cython.double  initial_phase = *)
 */
struct __pyx_opt_args_8pysndlib_3clm_edot_product {
  int __pyx_n;
  PyObject *size;
};

/* "pysndlib/clm.pyx":111
 * 
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):             # <<<<<<<<<<<<<<
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 */
struct __pyx_opt_args_8pysndlib_3clm_check_ndim {
  int __pyx_n;
  PyObject *dim;
};

/* "pysndlib/clm.pyx":115
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):             # <<<<<<<<<<<<<<
 *     if x is None:
 *         return
 */
struct __pyx_opt_args_8pysndlib_3clm_check_range {
  int __pyx_n;
  PyObject *low;
  PyObject *high;
};

/* "pysndlib/clm.pyx":1978
 * 
 * # ---------------- oscil ---------------- #
 * cpdef mus_any make_oscil(cython.double frequency=0.,cython.double  initial_phase = 0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil (sinewave) generator
 */
struct __pyx_opt_args_8pysndlib_3clm_make_oscil {
  int __pyx_n;
  double frequency;
  double initial_phase;
};

/* "pysndlib/clm.pyx":2026
 * # ---------------- oscil-bank ---------------- #
 * 
 * cpdef mus_any make_oscil_bank(freqs, phases, amps=None, bint stable=False):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil_bank generator. (freqs in radians)
 */
struct __pyx_opt_args_8pysndlib_3clm_make_oscil_bank {
  int __pyx_n;
  PyObject *amps;
  int stable;
};

/* "pysndlib/clm.pyx":2087
 * 
 * # ---------------- env ---------------- #
 * cpdef mus_any make_env(envelope, cython.double duration=1.0, cython.double scaler=1.0, cython.double offset=0.0, cython.double base=1.0, cython.int length=0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the
 */
struct __pyx_opt_args_8pysndlib_3clm_make_env {
  int __pyx_n;
  double duration;
  double scaler;
  double offset;
  double base;
  int length;
};

/* "pysndlib/clm.pyx":2246
 * 
 * # ---------------- table-lookup ---------------- #
 * cpdef mus_any make_table_lookup(cython.double frequency=0.0, cython.double initial_phase=0.0, wave= None, size=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator. the default table size is 512; use size to set some other
 */
struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup {
  int __pyx_n;
  double frequency;
  double initial_phase;
  PyObject *wave;
  PyObject *size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":2334
 * 
 * # ---------------- polywave ---------------- #
 * cpdef mus_any make_polywave(cython.double frequency,  partials = [0.,1.], Polynomial kind=Polynomial.FIRST_KIND, xcoeffs=None, ycoeffs=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is
 */
struct __pyx_opt_args_8pysndlib_3clm_make_polywave {
  int __pyx_n;
  PyObject *partials;
  enum __pyx_t_8pysndlib_3clm_Polynomial kind;
  PyObject *xcoeffs;
  PyObject *ycoeffs;
};

/* "pysndlib/clm.pyx":2427
 * # ---------------- polyshape ---------------- #
 * 
 * cpdef mus_any make_polyshape(cython.double frequency, cython.double initial_phase=0.0, coeffs = None, partials = [1.,1.], Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
struct __pyx_opt_args_8pysndlib_3clm_make_polyshape {
  int __pyx_n;
  double initial_phase;
  PyObject *coeffs;
  PyObject *partials;
  enum __pyx_t_8pysndlib_3clm_Polynomial kind;
};

/* "pysndlib/clm.pyx":2496
 * 
 * # ---------------- triangle-wave ---------------- #
 * cpdef mus_any make_triangle_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new triangle_wave generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_triangle_wave {
  int __pyx_n;
  double amplitude;
  double phase;
};

/* "pysndlib/clm.pyx":2541
 * 
 * # ---------------- square-wave ---------------- #
 * cpdef mus_any make_square_wave(cython.double frequency , cython.double amplitude=1.0, cython.double phase=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new square_wave generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_square_wave {
  int __pyx_n;
  double amplitude;
  double phase;
};

/* "pysndlib/clm.pyx":2611
 * 
 * # ---------------- pulse-train ---------------- #
 * cpdef mus_any make_pulse_train(cython.double frequency=1.0, cython.double amplitude=1.0, cython.double phase=(np.pi*2)):             # <<<<<<<<<<<<<<
 *     """
 *     return a new pulse_train generator. this produces a sequence of impulses.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_pulse_train {
  int __pyx_n;
  double frequency;
  double amplitude;
  double phase;
};

/* "pysndlib/clm.pyx":2656
 * # ---------------- ncos ---------------- #
 * 
 * cpdef mus_any make_ncos(cython.double frequency, cython.int n=1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ncos generator, producing a sum of 'n' equal amplitude cosines.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_ncos {
  int __pyx_n;
  int n;
};

/* "pysndlib/clm.pyx":2690
 * 
 * # ---------------- nsin ---------------- #
 * cpdef mus_any make_nsin(cython.double frequency, cython.int n =1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nsin generator, producing a sum of 'n' equal amplitude sines.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_nsin {
  int __pyx_n;
  int n;
};

/* "pysndlib/clm.pyx":2726
 * # ---------------- nrxysin and nrxycos ---------------- #
 * 
 * cpdef mus_any make_nrxysin( cython.double frequency,  cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxysin generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_nrxysin {
  int __pyx_n;
  double ratio;
  int n;
  double r;
};

/* "pysndlib/clm.pyx":2763
 * 
 * 
 * cpdef mus_any make_nrxycos(cython.double frequency , cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxycos generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_nrxycos {
  int __pyx_n;
  double ratio;
  int n;
  double r;
};

/* "pysndlib/clm.pyx":2802
 * 
 * # ---------------- rxykcos and rxyksin ---------------- #
 * cpdef mus_any make_rxykcos(cython.double frequency, cython.double phase=0.0, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxykcos generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_rxykcos {
  int __pyx_n;
  double phase;
  double r;
  double ratio;
};

/* "pysndlib/clm.pyx":2836
 *     return cclm.mus_is_rxykcos(gen._ptr)
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxyksin generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_rxyksin {
  int __pyx_n;
  double r;
  double ratio;
};

/* "pysndlib/clm.pyx":2871
 * 
 * # ---------------- ssb-am ---------------- #
 * cpdef mus_any make_ssb_am(cython.double frequency, cython.int order=40):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ssb_am generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_ssb_am {
  int __pyx_n;
  int order;
};

/* "pysndlib/clm.pyx":2916
 * 
 * # ---------------- wave-train ----------------#
 * cpdef mus_any make_wave_train(cython.double frequency, wave=None, cython.double initial_phase=0., Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate
 */
struct __pyx_opt_args_8pysndlib_3clm_make_wave_train {
  int __pyx_n;
  PyObject *wave;
  double initial_phase;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":2969
 * 
 * 
 * cpdef mus_any make_wave_train_with_env(cython.double frequency, envelope, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator with the envelope loaded \in with size.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_wave_train_with_env {
  int __pyx_n;
  PyObject *size;
};

/* "pysndlib/clm.pyx":2993
 * 
 * # ---------------- rand, rand_interp ---------------- #
 * cpdef mus_any make_rand(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand generator, producing a sequence of random numbers (a step  function). frequency
 */
struct __pyx_opt_args_8pysndlib_3clm_make_rand {
  int __pyx_n;
  double amplitude;
  PyObject *distribution;
};

/* "pysndlib/clm.pyx":3046
 *     return cclm.mus_is_rand(gen._ptr)
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand_interp generator, producing linearly interpolated random numbers. frequency is
 */
struct __pyx_opt_args_8pysndlib_3clm_make_rand_interp {
  int __pyx_n;
  double amplitude;
  PyObject *distribution;
};

/* "pysndlib/clm.pyx":3169
 * 
 * 
 * cpdef make_two_pole(frequency=None, radius=None, a0=None,b1=None,b2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).
 */
struct __pyx_opt_args_8pysndlib_3clm_make_two_pole {
  int __pyx_n;
  PyObject *frequency;
  PyObject *radius;
  PyObject *a0;
  PyObject *b1;
  PyObject *b2;
};

/* "pysndlib/clm.pyx":3211
 * 
 * 
 * cpdef make_two_zero(frequency=None, radius=None, a0=None,a1=None,a2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).
 */
struct __pyx_opt_args_8pysndlib_3clm_make_two_zero {
  int __pyx_n;
  PyObject *frequency;
  PyObject *radius;
  PyObject *a0;
  PyObject *a1;
  PyObject *a2;
};

/* "pysndlib/clm.pyx":3295
 * 
 * # ---------------- formant-bank ---------------- #
 * cpdef mus_any make_formant_bank(list filters, amps=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant-bank generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_formant_bank {
  int __pyx_n;
  PyObject *amps;
};

/* "pysndlib/clm.pyx":3545
 * 
 * # ---------------- delay ---------------- #
 * cpdef mus_any make_delay(cython.long size, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new delay line of size elements. if the delay length will be changing at run-time,
 */
struct __pyx_opt_args_8pysndlib_3clm_make_delay {
  int __pyx_n;
  PyObject *initial_contents;
  PyObject *initial_element;
  PyObject *max_size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":3670
 * 
 * # ---------------- comb ---------------- #
 * cpdef mus_any make_comb(cython.double feedback=1.0,size=None, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb
 */
struct __pyx_opt_args_8pysndlib_3clm_make_comb {
  int __pyx_n;
  double feedback;
  PyObject *size;
  PyObject *initial_contents;
  PyObject *initial_element;
  PyObject *max_size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":3780
 * 
 * # ---------------- filtered-comb ---------------- #
 * cpdef mus_any make_filtered_comb(cython.double feedback,cython.long size, mus_any filter, initial_contents=None,  cython.double initial_element=0.0, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
struct __pyx_opt_args_8pysndlib_3clm_make_filtered_comb {
  int __pyx_n;
  PyObject *initial_contents;
  double initial_element;
  PyObject *max_size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */
struct __pyx_opt_args_8pysndlib_3clm_make_notch {
  int __pyx_n;
  double feedforward;
  PyObject *size;
  PyObject *initial_contents;
  double initial_element;
  PyObject *max_size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":3978
 * 
 * # ---------------- all-pass ---------------- #
 * cpdef mus_any make_all_pass(cython.double feedback, cython.double  feedforward, cython.long  size, initial_contents= None, cython.double  initial_element = 0.0,  max_size= None, Interp interp_type = Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
struct __pyx_opt_args_8pysndlib_3clm_make_all_pass {
  int __pyx_n;
  PyObject *initial_contents;
  double initial_element;
  PyObject *max_size;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":4122
 * 
 * # ---------------- moving-average ---------------- #
 * cpdef mus_any make_moving_average(cython.long size, initial_contents=None, cython.double initial_element=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving_average generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_moving_average {
  int __pyx_n;
  PyObject *initial_contents;
  double initial_element;
};

/* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */
struct __pyx_opt_args_8pysndlib_3clm_make_moving_max {
  int __pyx_n;
  PyObject *initial_contents;
  double initial_element;
};

/* "pysndlib/clm.pyx":4231
 * 
 * # ---------------- moving-norm ---------------- #
 * cpdef mus_any make_moving_norm(cython.long size, initial_contents=None, cython.double scaler=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving-norm generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_moving_norm {
  int __pyx_n;
  PyObject *initial_contents;
  double scaler;
};

/* "pysndlib/clm.pyx":4282
 * 
 * # ---------------- asymmetric-fm ---------------- #
 * cpdef mus_any make_asymmetric_fm(cython.double frequency, cython.double initial_phase=0.0, cython.double r=1.0, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new asymmetric_fm generator.
 */
struct __pyx_opt_args_8pysndlib_3clm_make_asymmetric_fm {
  int __pyx_n;
  double initial_phase;
  double r;
  double ratio;
};

/* "pysndlib/clm.pyx":4330
 * 
 * # ---------------- file-to-sample ---------------- #
 * cpdef mus_any make_file2sample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading 'filename' (a sound file).
 */
struct __pyx_opt_args_8pysndlib_3clm_make_file2sample {
  int __pyx_n;
  PyObject *buffer_size;
};

/* "pysndlib/clm.pyx":4366
 * 
 * # ---------------- sample-to-file ---------------- #
 * cpdef mus_any make_sample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have chans'
 */
struct __pyx_opt_args_8pysndlib_3clm_make_sample2file {
  int __pyx_n;
  int chans;
  PyObject *sample_type;
  PyObject *header_type;
  PyObject *comment;
};

/* "pysndlib/clm.pyx":4419
 * 
 * # ---------------- file-to-frample ---------------- #
 * cpdef mus_any make_file2frample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading all channels of 'filename' (a sound file).
 */
struct __pyx_opt_args_8pysndlib_3clm_make_file2frample {
  int __pyx_n;
  PyObject *buffer_size;
};

/* "pysndlib/clm.pyx":4457
 * 
 * # ---------------- frample-to-file ---------------- #
 * cpdef mus_any make_frample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have 'chans'
 */
struct __pyx_opt_args_8pysndlib_3clm_make_frample2file {
  int __pyx_n;
  int chans;
  PyObject *sample_type;
  PyObject *header_type;
  PyObject *comment;
};

/* "pysndlib/clm.pyx":4519
 * 
 * # ---------------- readin ---------------- #
 * cpdef mus_any make_readin(str filename, cython.int chan=0, cython.long start=0, cython.int direction=1, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new readin (file input) generator reading the sound file 'file' starting at frample
 */
struct __pyx_opt_args_8pysndlib_3clm_make_readin {
  int __pyx_n;
  int chan;
  long start;
  int direction;
  PyObject *buffer_size;
};

/* "pysndlib/clm.pyx":5100
 * 
 * # --------------- locsig ---------------- #
 * cpdef mus_any make_locsig(cython.double degree=0.0, cython.double distance=1., cython.double reverb=0.0, output=None, revout=None, channels=None, reverb_channels=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
struct __pyx_opt_args_8pysndlib_3clm_make_locsig {
  int __pyx_n;
  double degree;
  double distance;
  double reverb;
  PyObject *output;
  PyObject *revout;
  PyObject *channels;
  PyObject *reverb_channels;
  enum __pyx_t_8pysndlib_3clm_Interp interp_type;
};

/* "pysndlib/clm.pyx":5447
 *         return self._val
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 */
struct __pyx_opt_args_8pysndlib_3clm_make_array_readin {
  int __pyx_n;
  PyObject *chan;
  PyObject *start;
  PyObject *direction;
};
struct __pyx_defaults {
  PyObject *__pyx_arg_interp_type;
};

/* "pysndlib/clm.pxd":40
 * 
 * 
 * cdef class mus_any:             # <<<<<<<<<<<<<<
 *     """
 *     a wrapper class for mus_any pointers in c
 */
struct __pyx_obj_8pysndlib_3clm_mus_any {
  PyObject_HEAD
  struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *__pyx_vtab;
  mus_any *_ptr;
  int ptr_owner;
  input_cb _inputcallback;
  edit_cb _editcallback;
  analyze_cb _analyzecallback;
  synthesize_cb _synthesizecallback;
  PyObject *_cache;
  mus_float_t *_data_ptr;
  PyArrayObject *_data;
  mus_float_t *_xcoeffs_ptr;
  PyArrayObject *_xcoeffs;
  mus_float_t *_ycoeffs_ptr;
  PyArrayObject *_ycoeffs;
  mus_float_t *_pv_amp_increments_ptr;
  PyArrayObject *_pv_amp_increments;
  mus_float_t *_pv_amps_ptr;
  PyArrayObject *_pv_amps;
  mus_float_t *_pv_freqs_ptr;
  PyArrayObject *_pv_freqs;
  mus_float_t *_pv_phases_ptr;
  PyArrayObject *_pv_phases;
  mus_float_t *_pv_phase_increments_ptr;
  PyArrayObject *_pv_phase_increments;
};


/* "pysndlib/clm.pyx":554
 *         return cclm.mus_file_name(self._ptr)
 * 
 * cdef class mus_any_array:             # <<<<<<<<<<<<<<
 *     """
 *     a wrapper class arrays of mus_any objects
 */
struct __pyx_obj_8pysndlib_3clm_mus_any_array {
  PyObject_HEAD
  struct __pyx_vtabstruct_8pysndlib_3clm_mus_any_array *__pyx_vtab;
  mus_any_ptr_ptr data;
  size_t item_count;
};


/* "pysndlib/clm.pyx":5399
 * #
 * 
 * cdef class array_readin_gen:             # <<<<<<<<<<<<<<
 *     cdef np.ndarray _arr
 *     cdef int _chan
 */
struct __pyx_obj_8pysndlib_3clm_array_readin_gen {
  PyObject_HEAD
  PyArrayObject *_arr;
  int _chan;
  PY_LONG_LONG _start;
  int _direction;
  PY_LONG_LONG _location;
  PY_LONG_LONG _length;
  float _val;
};


/* "pysndlib/clm.pyx":1088
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("x values of envelope must be increasing")
 * 
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_j;
};


/* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src {
  PyObject_HEAD
  PyObject *__pyx_v_inp;
};


/* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve {
  PyObject_HEAD
  PyObject *__pyx_v_inp;
};


/* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate {
  PyObject_HEAD
  PyObject *__pyx_v_edit;
  PyObject *__pyx_v_inp;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_res;
};


/* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder {
  PyObject_HEAD
  PyObject *__pyx_v_analyze;
  PyObject *__pyx_v_edit;
  PyObject *__pyx_v_inp;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_res;
  PyObject *__pyx_v_synthesize;
};


/* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader {
  PyObject_HEAD
  PyObject *__pyx_v_arr;
  PyObject *__pyx_v_chan;
  PyObject *__pyx_v_ind;
  long __pyx_v_length;
};


/* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb {
  PyObject_HEAD
  PyObject *__pyx_v_func;
};


/* "pysndlib/clm.pyx":5572
 * 
 * 
 * def impulse_generator(arr):             # <<<<<<<<<<<<<<
 *     n = 0
 *     num = len(arr)
 */
struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator {
  PyObject_HEAD
  PyObject *__pyx_v_arr;
  PyObject *__pyx_v_n;
  Py_ssize_t __pyx_v_num;
};


/* "EnumBase":16
 * 
 * @cython.internal
 * cdef class __Pyx_EnumMeta(type):             # <<<<<<<<<<<<<<
 *     def __init__(cls, name, parents, dct):
 *         type.__init__(cls, name, parents, dct)
 */
struct __pyx_obj___Pyx_EnumMeta {
  PyHeapTypeObject __pyx_base;
};


/* "View.MemoryView":114
 * @cython.collection_type("sequence")
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":302
 * 
 * @cname('__pyx_MemviewEnum')
 * cdef class Enum(object):             # <<<<<<<<<<<<<<
 *     cdef object name
 *     def __init__(self, name):
 */
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":337
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview:             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  PyObject *_array_interface;
  PyThread_type_lock lock;
  __pyx_atomic_int_type acquisition_count;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo *typeinfo;
};


/* "View.MemoryView":952
 * @cython.collection_type("sequence")
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "pysndlib/clm.pyx":147
 * # --------------- extension types ---------------- #
 * 
 * cdef class mus_any:             # <<<<<<<<<<<<<<
 *     """
 *     a wrapper class for mus_any pointers in c
 */

struct __pyx_vtabstruct_8pysndlib_3clm_mus_any {
  struct __pyx_obj_8pysndlib_3clm_mus_any *(*from_ptr)(mus_any *, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr *__pyx_optional_args);
  PyObject *(*cache_append)(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*cache_extend)(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set_up_data)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data *__pyx_optional_args);
  PyObject *(*set_up_xcoeffs)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch);
  PyObject *(*set_up_ycoeffs)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch);
  PyObject *(*set_up_pv_data)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch);
  PyObject *(*mus_reset)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch);
  PyObject *(*next)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next *__pyx_optional_args);
};
static struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *__pyx_vtabptr_8pysndlib_3clm_mus_any;


/* "pysndlib/clm.pyx":554
 *         return cclm.mus_file_name(self._ptr)
 * 
 * cdef class mus_any_array:             # <<<<<<<<<<<<<<
 *     """
 *     a wrapper class arrays of mus_any objects
 */

struct __pyx_vtabstruct_8pysndlib_3clm_mus_any_array {
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *(*from_pylist)(PyObject *);
};
static struct __pyx_vtabstruct_8pysndlib_3clm_mus_any_array *__pyx_vtabptr_8pysndlib_3clm_mus_any_array;


/* "View.MemoryView":114
 * @cython.collection_type("sequence")
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":337
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview:             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
  PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":952
 * @cython.collection_type("sequence")
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* IncludeStringH.proto */
#include <string.h>

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
    #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    #define __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
    #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
                                                   to have the same reference counting */
    #define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* UnaryNegOverflows.proto */
#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (1)
#elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PySequenceMultiply.proto */
#define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* RaiseUnboundLocalError.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* DivInt[mus_long_t].proto */
static CYTHON_INLINE mus_long_t __Pyx_div_mus_long_t(mus_long_t, mus_long_t);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char);

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* BufferIndexError.proto */
static void __Pyx_RaiseBufferIndexError(int axis);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* pybytes_as_double.proto */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
    as_c_string = PyBytes_AS_STRING(obj);
    size = PyBytes_GET_SIZE(obj);
#else
    if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
        return (double)-1;
    }
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
    as_c_string = PyByteArray_AS_STRING(obj);
    size = PyByteArray_GET_SIZE(obj);
#else
    as_c_string = PyByteArray_AsString(obj);
    if (as_c_string == NULL) {
        return (double)-1;
    }
    size = PyByteArray_Size(obj);
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}

/* pyunicode_as_double.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

/* pynumber_float.proto */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyNumberPow2.proto */
#define __Pyx_PyNumber_InPlacePowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 1)
#define __Pyx_PyNumber_PowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 0)
static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace);

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* ModInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* RaiseClosureNameError.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* CallableCheck.proto */
#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
#define __Pyx_PyCallable_Check(obj)   (Py_TYPE(obj)->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
#endif

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    typesModule = PyImport_ImportModule("types");
    if (!typesModule) return NULL;
    methodType = PyObject_GetAttrString(typesModule, "MethodType");
    Py_DECREF(typesModule);
    if (!methodType) return NULL;
    result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    Py_DECREF(methodType);
    return result;
}
#elif PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_SubtractCObj(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type);
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_8
#define __PYX_HAVE_RT_ImportType_proto_3_0_8
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_0_8 {
   __Pyx_ImportType_CheckSize_Error_3_0_8 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_0_8 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_0_8 = 2
};
static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size);
#endif

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* SetNewInClass.proto */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* PyExec.proto */
static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*);

/* PyExecGlobals.proto */
static PyObject* __Pyx_PyExecGlobals(PyObject*);

/* CyFunctionClassCell.proto */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* FromPy.proto */
static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*);

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.proto */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_long_t(PyObject *, int writable_flag);

/* ToPy.proto */
#define __pyx_PyComplex_FromComplex(z)\
        PyComplex_FromDoubles((double)__Pyx_CREAL(z),\
                              (double)__Pyx_CIMAG(z))

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* MemviewSliceCopyTemplate.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

/* MemviewSliceInit.proto */
#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Interp __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Window __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Window(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Spectrum __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Spectrum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Polynomial __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE mus_sample_t __Pyx_PyInt_As_mus_sample_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE mus_header_t __Pyx_PyInt_As_mus_header_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(enum __pyx_t_8pysndlib_3clm_Interp value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(enum __pyx_t_8pysndlib_3clm_Polynomial value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(enum __pyx_t_8pysndlib_3clm_Spectrum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(enum __pyx_t_8pysndlib_3clm_Window value);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);

/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

/* #### Code section: module_declarations ### */
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_7mus_any_from_ptr(mus_any *__pyx_v__ptr, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_cache_append(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_cache_extend(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_xcoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_ycoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_pv_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_next(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next *__pyx_optional_args); /* proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(PyObject *__pyx_v_lst); /* proto*/

/* Module declarations from "cython.view" */

/* Module declarations from "cython.dataclasses" */

/* Module declarations from "cython" */

/* Module declarations from "libc.string" */

/* Module declarations from "libc.stdio" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "cpython" */

/* Module declarations from "cpython.object" */

/* Module declarations from "cpython.ref" */

/* Module declarations from "numpy" */

/* Module declarations from "numpy" */
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from "pysndlib.csndlib" */

/* Module declarations from "pysndlib.cclm" */

/* Module declarations from "pysndlib.sndlib" */

/* Module declarations from "cpython.mem" */

/* Module declarations from "pysndlib" */

/* Module declarations from "pysndlib.cmath_sf" */

/* Module declarations from "pysndlib.clm" */
static PyObject *__Pyx_OrderedDict = 0;
static PyObject *__Pyx_EnumBase = 0;
static PyObject *__Pyx_FlagBase = 0;
static PyObject *__pyx_collections_abc_Sequence = 0;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static PyObject *__Pyx_globals = 0;
static int __pyx_f_8pysndlib_3clm_mus_close(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_mus_is_output(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_mus_is_input(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_length(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_get_srate(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_get_srate *__pyx_optional_args); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_framples(PyObject *, int __pyx_skip_dispatch); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_channels(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_random(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_random *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_zero(double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_radians2hz(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_hz2radians(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_degrees2radians(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_radians2degrees(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_db2linear(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_linear2db(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_odd_multiple(double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_even_multiple(double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_odd_weight(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_even_weight(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_set_srate(double, int __pyx_skip_dispatch); /*proto*/
static long __pyx_f_8pysndlib_3clm_seconds2samples(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_samples2seconds(long, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_ring_modulate(double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_amplitude_modulate(double, double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_contrast_enhancement(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_dot_product(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_polynomial(PyArrayObject *, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_array_interp(PyArrayObject *, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bessi0(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_mus_interpolate(enum __pyx_t_8pysndlib_3clm_Interp, double, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_make_fft_window(enum __pyx_t_8pysndlib_3clm_Window, int, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_fft_window *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_file2ndarray(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2ndarray *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_ndarray2file(PyObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ndarray2file *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_fft(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_fft(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_rectangular2polar(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rectangular2polar(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_rectangular2magnitudes(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rectangular2magnitudes(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_polar2rectangular(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_polar2rectangular(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_spectrum(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_spectrum(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_spectrum *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_convolution(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolution *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_convolution(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_convolution *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_autocorrelate(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_autocorrelate(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_correlate(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_correlate(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_cepstrum(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_cepstrum(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_partials2wave(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2wave *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_partials2wave(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_partials2polynomial(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial *__pyx_optional_args); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_normalize_partials(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_tu_sum(double, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_t_sum(double, PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_u_sum(double, PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_oscil *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_oscil(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_oscil_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_env(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_env(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_env_interp(double, struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_envelope_interp(double, struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_env_rates(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_env_any(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulsed_env(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulsed_env *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulsed_env_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_pulsed_env(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_table_lookup(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_table_lookup *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_table_lookup_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_table_lookup(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_table_lookup_with_env(double, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_polywave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polywave *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_polywave_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_polywave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_polyshape(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_polyshape_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_polyshape(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_triangle_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_triangle_wave *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_triangle_wave_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_triangle_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_square_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_square_wave *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_square_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_sawtooth_wave(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_sawtooth_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_sawtooth_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulse_train(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulse_train *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulse_train_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_pulse_train(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_ncos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ncos *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_ncos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_nsin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nsin *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nsin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_nrxysin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxysin *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nrxysin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_nrxycos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxycos *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nrxycos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_rxykcos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxykcos *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rxykcos(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_rxyksin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxyksin *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rxyksin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_ssb_am(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ssb_am *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_ssb_am_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_ssb_am(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_wave_train(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_wave_train *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_wave_train_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_wave_train(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_rand(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_rand_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rand(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rand_interp(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand_interp *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rand_interp_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rand_interp(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_two_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_two_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_two_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_two_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_formant(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_formant *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_formant(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_formant_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_formant_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_firmant(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_firmant *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_firmant(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_fir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_fir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_iir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_iir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_delay *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_delay(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_tap(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_tap *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_tap_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_tap(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay_tick(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_comb *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_filtered_comb *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filtered_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filtered_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_notch(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_notch *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_notch_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_notch(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_all_pass *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_all_pass_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_all_pass_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_pole_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_pole_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_average(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_moving_average(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_max(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_moving_max(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_norm(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_moving_norm(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_asymmetric_fm(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_asymmetric_fm_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_asymmetric_fm(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_file2sample(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2sample *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_file2sample(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_sample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_sample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_file2frample(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_file2frample(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_frample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_frample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_continue_frample2file(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_readin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_readin(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_src(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_src *__pyx_optional_args); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_src(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_convolve(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_convolve(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_granulate(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_granulate(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_phase_vocoder(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_phase_vocoder(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_amp_increments(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_amps(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_freqs(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_phases(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_phase_increments(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_out_any(long, double, int, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_out_any *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outa(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outa *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outb(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outb *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outc(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outc *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outd(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outd *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_in_any(long, int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_ina(long, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_inb(long, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_out_bank(PyObject *, long, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_ref(struct __pyx_obj_8pysndlib_3clm_mus_any *, int, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_set(struct __pyx_obj_8pysndlib_3clm_mus_any *, int, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_reverb_ref(struct __pyx_obj_8pysndlib_3clm_mus_any *, int, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_reverb_set(struct __pyx_obj_8pysndlib_3clm_mus_any *, int, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_move_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_convolve_files(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolve_files *__pyx_optional_args); /*proto*/
static double __pyx_f_8pysndlib_3clm_dcblock(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_biquad(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_biquad(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_biquad_set_resonance(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_biquad_set_equal_gain_zeroes(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_j0(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_j1(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_jn(int, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_y0(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_y1(double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_yn(int, double, int __pyx_skip_dispatch); /*proto*/
static __pyx_t_double_complex __pyx_f_8pysndlib_3clm_edot_product(__pyx_t_double_complex, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_edot_product *__pyx_optional_args); /*proto*/
static void __pyx_f_8pysndlib_3clm_clm_error_handler(int, char *); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_check_ndim(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_check_ndim *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_check_range(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_check_range *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_compare_shapes(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_simple_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *); /*proto*/
static double __pyx_f_8pysndlib_3clm_input_callback_func(void *, int); /*proto*/
static void __pyx_f_8pysndlib_3clm_locsig_detour_callback_func(mus_any *, mus_long_t); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_list_or_ndarray(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_power_of_2(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_next_power_of_2(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_to_partials(PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_number(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_oscil(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_oscil *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_oscil_bank(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_oscil_bank *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_env(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_env *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_pulsed_env(PyObject *, double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_table_lookup(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_polywave(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_polywave *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_polyshape(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_polyshape *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_triangle_wave(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_triangle_wave *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_square_wave(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_square_wave *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_pulse_train(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_pulse_train *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_ncos(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_ncos *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nsin(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nsin *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nrxysin(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nrxysin *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nrxycos(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nrxycos *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rxykcos(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rxykcos *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rxyksin(double, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rxyksin *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_ssb_am(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_ssb_am *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_wave_train(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_wave_train *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_wave_train_with_env(double, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_wave_train_with_env *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rand(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rand *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rand_interp(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rand_interp *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_pole(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_zero(double, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_make_two_pole(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_two_pole *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_make_two_zero(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_two_zero *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_formant(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_formant_bank(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_formant_bank *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_firmant(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filter(int, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_fir_filter(int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_iir_filter(int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_make_fir_coeffs(int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_delay(long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_delay *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_comb(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_comb *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_comb_bank(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filtered_comb(double, long, struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_filtered_comb *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filtered_comb_bank(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_notch(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_notch *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_all_pass(double, double, long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_all_pass *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_all_pass_bank(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_pole_all_pass(long, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_average(long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_average *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_max(long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_max *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_norm(long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_norm *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_asymmetric_fm(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_asymmetric_fm *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_file2sample(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_file2sample *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_sample2file(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_sample2file *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_continue_sample2file(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_file2frample(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_file2frample *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_frample2file(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_frample2file *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_readin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_readin *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_locsig(int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_locsig *__pyx_optional_args); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_dcblock(int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad(double, double, double, double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_notch(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_low_pass(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_high_pass(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_band_pass(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_band_reject(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_all_pass(double, double, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_f_8pysndlib_3clm_make_array_readin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_array_readin *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_array_readin(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_array_readin(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_i0(double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm___pyx_unpickle_array_readin_gen__set_state(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *, PyObject *); /*proto*/
static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(enum __pyx_t_8pysndlib_6sndlib_Header); /*proto*/
static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(enum __pyx_t_8pysndlib_6sndlib_Sample); /*proto*/
static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(enum __pyx_t_8pysndlib_3clm_Interp); /*proto*/
static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py(enum __pyx_t_8pysndlib_3clm_Spectrum); /*proto*/
static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(enum __pyx_t_8pysndlib_3clm_Polynomial); /*proto*/
static PyObject *__pyx_unpickle___Pyx_EnumMeta__set_state(struct __pyx_obj___Pyx_EnumMeta *, PyObject *); /*proto*/
static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
static int __pyx_memoryview_err_no_memory(void); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_mus_float_t = { "mus_float_t", NULL, sizeof(mus_float_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_mus_long_t = { "mus_long_t", NULL, sizeof(mus_long_t), { 0 }, 0, __PYX_IS_UNSIGNED(mus_long_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(mus_long_t), 0 };
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pysndlib.clm"
extern int __pyx_module_is_main_pysndlib__clm;
int __pyx_module_is_main_pysndlib__clm = 0;

/* Implementation of "pysndlib.clm" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_all;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_input;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin___import__;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_IndexError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = ".";
static const char __pyx_k_O[] = "O";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k__2[] = "*";
static const char __pyx_k__3[] = "";
static const char __pyx_k__5[] = ": ";
static const char __pyx_k__8[] = "'";
static const char __pyx_k__9[] = ")";
static const char __pyx_k_a0[] = "a0";
static const char __pyx_k_a1[] = "a1";
static const char __pyx_k_a2[] = ", a2: ";
static const char __pyx_k_b1[] = "b1";
static const char __pyx_k_b2[] = ", b2: ";
static const char __pyx_k_fc[] = "fc";
static const char __pyx_k_fm[] = "fm";
static const char __pyx_k_fn[] = "fn";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_hi[] = "hi";
static const char __pyx_k_hz[] = "hz";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_lo[] = "lo";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_pi[] = "pi";
static const char __pyx_k_pm[] = "pm";
static const char __pyx_k_s1[] = "s1";
static const char __pyx_k_s2[] = "s2";
static const char __pyx_k_s3[] = "s3";
static const char __pyx_k_sr[] = "sr";
static const char __pyx_k_vs[] = " vs. ";
static const char __pyx_k_y1[] = "y1";
static const char __pyx_k_ADC[] = "ADC";
static const char __pyx_k_ADF[] = "ADF";
static const char __pyx_k_ASF[] = "ASF";
static const char __pyx_k_AVI[] = "AVI";
static const char __pyx_k_AVR[] = "AVR";
static const char __pyx_k_CSL[] = "CSL";
static const char __pyx_k_NVF[] = "NVF";
static const char __pyx_k_OGG[] = "OGG";
static const char __pyx_k_OMF[] = "OMF";
static const char __pyx_k_PAF[] = "PAF";
static const char __pyx_k_PVF[] = "PVF";
static const char __pyx_k_RAW[] = "RAW";
static const char __pyx_k_RV2[] = "RV2";
static const char __pyx_k_RV3[] = "RV3";
static const char __pyx_k_RV4[] = "RV4";
static const char __pyx_k_SD1[] = "SD1";
static const char __pyx_k_SMP[] = "SMP";
static const char __pyx_k_SOX[] = "SOX";
static const char __pyx_k_SVX[] = "SVX";
static const char __pyx_k_TTA[] = "TTA";
static const char __pyx_k_VOC[] = "VOC";
static const char __pyx_k__13[] = ". ";
static const char __pyx_k__14[] = " < ";
static const char __pyx_k__15[] = " > ";
static const char __pyx_k__17[] = " ";
static const char __pyx_k__18[] = ",";
static const char __pyx_k__19[] = ", ";
static const char __pyx_k__62[] = "/";
static const char __pyx_k_abc[] = "abc";
static const char __pyx_k_abs[] = "abs";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_and[] = " and ";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_arr[] = "arr";
static const char __pyx_k_beg[] = "beg";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_cos[] = "cos";
static const char __pyx_k_dct[] = "dct";
static const char __pyx_k_dim[] = "dim";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_env[] = "env";
static const char __pyx_k_exp[] = "exp";
static const char __pyx_k_fft[] = "fft";
static const char __pyx_k_gen[] = "gen";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_got[] = " (got ";
static const char __pyx_k_hop[] = "hop";
static const char __pyx_k_ina[] = "ina";
static const char __pyx_k_inb[] = "inb";
static const char __pyx_k_ind[] = "ind";
static const char __pyx_k_inp[] = "inp";
static const char __pyx_k_int[] = "int_";
static const char __pyx_k_loc[] = "loc";
static const char __pyx_k_log[] = "log";
static const char __pyx_k_low[] = "low";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_num[] = "num";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_rl1[] = "rl1";
static const char __pyx_k_rl2[] = "rl2";
static const char __pyx_k_run[] = "run";
static const char __pyx_k_s_s[] = "%s.%s";
static const char __pyx_k_sin[] = "sin";
static const char __pyx_k_src[] = "src";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_tan[] = "tan";
static const char __pyx_k_tap[] = "tap";
static const char __pyx_k_tic[] = "tic";
static const char __pyx_k_toc[] = "toc";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_0_8f[] = "0.8f";
static const char __pyx_k_AIFC[] = "AIFC";
static const char __pyx_k_AIFF[] = "AIFF";
static const char __pyx_k_ALAW[] = "ALAW";
static const char __pyx_k_BINT[] = "BINT";
static const char __pyx_k_BYTE[] = "BYTE";
static const char __pyx_k_CAFF[] = "CAFF";
static const char __pyx_k_DPSS[] = "DPSS";
static const char __pyx_k_ESPS[] = "ESPS";
static const char __pyx_k_FLAC[] = "FLAC";
static const char __pyx_k_HANN[] = "HANN";
static const char __pyx_k_HCOM[] = "HCOM";
static const char __pyx_k_IEEE[] = "IEEE";
static const char __pyx_k_INRS[] = "INRS";
static const char __pyx_k_KORG[] = "KORG";
static const char __pyx_k_LINT[] = "LINT";
static const char __pyx_k_MAUD[] = "MAUD";
static const char __pyx_k_MAUI[] = "MAUI";
static const char __pyx_k_MIDI[] = "MIDI";
static const char __pyx_k_MPEG[] = "MPEG";
static const char __pyx_k_NEXT[] = "NEXT";
static const char __pyx_k_NIST[] = "NIST";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_RF64[] = "RF64";
static const char __pyx_k_RIFF[] = "RIFF";
static const char __pyx_k_SDIF[] = "SDIF";
static const char __pyx_k_SINC[] = "SINC";
static const char __pyx_k_SNDT[] = "SNDT";
static const char __pyx_k_SRFS[] = "SRFS";
static const char __pyx_k__137[] = "_";
static const char __pyx_k__630[] = "?";
static const char __pyx_k_a1_2[] = ", a1: ";
static const char __pyx_k_a2_2[] = "a2";
static const char __pyx_k_amax[] = "amax";
static const char __pyx_k_amps[] = "amps";
static const char __pyx_k_arg1[] = "arg1";
static const char __pyx_k_arg2[] = "arg2";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_arr1[] = "arr1";
static const char __pyx_k_arr2[] = "arr2";
static const char __pyx_k_b1_2[] = ", b1: ";
static const char __pyx_k_b2_2[] = "b2";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_beta[] = "beta";
static const char __pyx_k_call[] = "call";
static const char __pyx_k_chan[] = "chan";
static const char __pyx_k_clip[] = "_clip";
static const char __pyx_k_comb[] = "comb";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_edit[] = "edit";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_fabs[] = "fabs";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_fill[] = "fill";
static const char __pyx_k_filt[] = "filt";
static const char __pyx_k_fmod[] = "fmod";
static const char __pyx_k_freq[] = "freq";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_gens[] = "gens";
static const char __pyx_k_high[] = "high";
static const char __pyx_k_idat[] = "idat";
static const char __pyx_k_imag[] = "imag";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_kind[] = "kind";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_loop[] = "loop";
static const char __pyx_k_mabs[] = "mabs";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_ncos[] = "ncos";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_norm[] = "norm";
static const char __pyx_k_nsin[] = "nsin";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_outa[] = "outa";
static const char __pyx_k_outb[] = "outb";
static const char __pyx_k_outc[] = "outc";
static const char __pyx_k_outd[] = "outd";
static const char __pyx_k_pack[] = "pack";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_play[] = "play";
static const char __pyx_k_ramp[] = "ramp";
static const char __pyx_k_rand[] = "rand";
static const char __pyx_k_rdat[] = "rdat";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_real[] = "real";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_samp[] = "samp";
static const char __pyx_k_secs[] = "secs";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_sign[] = "sign";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_sqrt[] = "sqrt";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_temp[] = "temp-";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_vals[] = "vals";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_wave[] = "wave";
static const char __pyx_k_wrap[] = "_wrap";
static const char __pyx_k_AKAI4[] = "AKAI4";
static const char __pyx_k_ASCII[] = "ASCII";
static const char __pyx_k_BICSF[] = "BICSF";
static const char __pyx_k_BINTN[] = "BINTN";
static const char __pyx_k_COVOX[] = "COVOX";
static const char __pyx_k_IN_DB[] = "IN_DB";
static const char __pyx_k_IRCAM[] = "IRCAM";
static const char __pyx_k_LINTN[] = "LINTN";
static const char __pyx_k_MULAW[] = "MULAW";
static const char __pyx_k_MUS10[] = "MUS10";
static const char __pyx_k_PSION[] = "PSION";
static const char __pyx_k_SPEEX[] = "SPEEX";
static const char __pyx_k_Sound[] = "Sound";
static const char __pyx_k_TUKEY[] = "TUKEY";
static const char __pyx_k_UBYTE[] = "UBYTE";
static const char __pyx_k_WELCH[] = "WELCH";
static const char __pyx_k_alpha[] = "alpha";
static const char __pyx_k_aplay[] = "aplay";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_atan2[] = "atan2";
static const char __pyx_k_c_int[] = "c_int";
static const char __pyx_k_chans[] = "chans";
static const char __pyx_k_clamp[] = "clamp";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_coeff[] = "coeff";
static const char __pyx_k_combs[] = "combs";
static const char __pyx_k_count[] = "count ";
static const char __pyx_k_data1[] = "data1";
static const char __pyx_k_data2[] = "data2";
static const char __pyx_k_delay[] = "delay";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_file1[] = "file1";
static const char __pyx_k_file2[] = "file2";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_freqs[] = "freqs";
static const char __pyx_k_harms[] = "harms";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_inp_f[] = "inp_f";
static const char __pyx_k_input[] = "input";
static const char __pyx_k_insig[] = "insig";
static const char __pyx_k_int64[] = "int64";
static const char __pyx_k_linux[] = "linux";
static const char __pyx_k_notch[] = "notch";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_order[] = "order";
static const char __pyx_k_oscil[] = "oscil";
static const char __pyx_k_phase[] = "phase";
static const char __pyx_k_pitch[] = "pitch";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_ratio[] = "ratio";
static const char __pyx_k_s_s_d[] = "<%s.%s: %d>";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_srate[] = "srate";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_str_2[] = "str";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_sweep[] = "sweep";
static const char __pyx_k_table[] = "table";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_times[] = "times";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_wraps[] = "wraps";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_B24INT[] = "B24INT";
static const char __pyx_k_BEZIER[] = "BEZIER";
static const char __pyx_k_BFLOAT[] = "BFLOAT";
static const char __pyx_k_BOHMAN[] = "BOHMAN";
static const char __pyx_k_BSHORT[] = "BSHORT";
static const char __pyx_k_CAUCHY[] = "CAUCHY";
static const char __pyx_k_CONNES[] = "CONNES";
static const char __pyx_k_GRAVIS[] = "GRAVIS";
static const char __pyx_k_Header[] = "Header";
static const char __pyx_k_Interp[] = "Interp";
static const char __pyx_k_KAISER[] = "KAISER";
static const char __pyx_k_L24INT[] = "L24INT";
static const char __pyx_k_LFLOAT[] = "LFLOAT";
static const char __pyx_k_LINEAR[] = "LINEAR";
static const char __pyx_k_LSHORT[] = "LSHORT";
static const char __pyx_k_MATLAB[] = "MATLAB";
static const char __pyx_k_PARZEN[] = "PARZEN";
static const char __pyx_k_SPPACK[] = "SPPACK";
static const char __pyx_k_Sample[] = "Sample";
static const char __pyx_k_TWINVQ[] = "TWINVQ";
static const char __pyx_k_Window[] = "Window";
static const char __pyx_k_afplay[] = "afplay";
static const char __pyx_k_arange[] = "arange";
static const char __pyx_k_argmax[] = "argmax";
static const char __pyx_k_bes_i0[] = "bes_i0";
static const char __pyx_k_bes_j0[] = "bes_j0";
static const char __pyx_k_bes_j1[] = "bes_j1";
static const char __pyx_k_bes_jn[] = "bes_jn";
static const char __pyx_k_bes_y0[] = "bes_y0";
static const char __pyx_k_bes_y1[] = "bes_y1";
static const char __pyx_k_bes_yn[] = "bes_yn";
static const char __pyx_k_bessi0[] = "bessi0";
static const char __pyx_k_biquad[] = "biquad";
static const char __pyx_k_c_bool[] = "c_bool";
static const char __pyx_k_coeffs[] = "coeffs";
static const char __pyx_k_copyto[] = "copyto";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_darwin[] = "darwin";
static const char __pyx_k_degree[] = "degree";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_double[] = "double";
static const char __pyx_k_edit_f[] = "edit_f";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_exists[] = "exists";
static const char __pyx_k_fcombs[] = "fcombs";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_in_any[] = "in_any";
static const char __pyx_k_init_2[] = "___init___";
static const char __pyx_k_inputs[] = "inputs";
static const char __pyx_k_interp[] = "interp";
static const char __pyx_k_is_env[] = "is_env";
static const char __pyx_k_is_odd[] = "is_odd";
static const char __pyx_k_is_src[] = "is_src";
static const char __pyx_k_is_tap[] = "is_tap";
static const char __pyx_k_isfile[] = "isfile";
static const char __pyx_k_jitter[] = "jitter";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_locsig[] = "locsig";
static const char __pyx_k_maxamp[] = " maxamp: ";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_number[] = "number";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_offset[] = "offset";
static const char __pyx_k_output[] = "output";
static const char __pyx_k_phases[] = "phases";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_player[] = "player";
static const char __pyx_k_radius[] = "radius";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_readin[] = "readin: ";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_resize[] = "resize";
static const char __pyx_k_reverb[] = "reverb";
static const char __pyx_k_revmax[] = "revmax: ";
static const char __pyx_k_revout[] = "revout";
static const char __pyx_k_scaler[] = "scaler";
static const char __pyx_k_ssb_am[] = "ssb_am";
static const char __pyx_k_stable[] = "stable";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_window[] = "window";
static const char __pyx_k_BDOUBLE[] = "BDOUBLE";
static const char __pyx_k_HAMMING[] = "HAMMING";
static const char __pyx_k_HERMITE[] = "HERMITE";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_IntFlag[] = "IntFlag";
static const char __pyx_k_LDOUBLE[] = "LDOUBLE";
static const char __pyx_k_POISSON[] = "POISSON";
static const char __pyx_k_RIEMANN[] = "RIEMANN";
static const char __pyx_k_SHORTEN[] = "SHORTEN";
static const char __pyx_k_UBSHORT[] = "UBSHORT";
static const char __pyx_k_ULSHORT[] = "ULSHORT";
static const char __pyx_k_WAVPACK[] = "WAVPACK";
static const char __pyx_k_analyze[] = "analyze";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_channel[] = "channel";
static const char __pyx_k_clipped[] = "clipped";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_count_2[] = "count";
static const char __pyx_k_dcblock[] = "dcblock";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_degrees[] = "degrees";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_env_any[] = "env_any";
static const char __pyx_k_fft_len[] = "fft_len";
static const char __pyx_k_filters[] = "filters";
static const char __pyx_k_firmant[] = "firmant";
static const char __pyx_k_formant[] = "formant";
static const char __pyx_k_fortran[] = "fortran";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_is_comb[] = "is_comb";
static const char __pyx_k_is_even[] = "is_even";
static const char __pyx_k_is_ncos[] = "is_ncos";
static const char __pyx_k_is_nsin[] = "is_nsin";
static const char __pyx_k_is_rand[] = "is_rand";
static const char __pyx_k_is_zero[] = "is_zero";
static const char __pyx_k_members[] = "__members__";
static const char __pyx_k_memview[] = "memview";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_mus_any[] = "mus_any";
static const char __pyx_k_mus_fft[] = "mus_fft";
static const char __pyx_k_nrxycos[] = "nrxycos";
static const char __pyx_k_nrxysin[] = "nrxysin";
static const char __pyx_k_omega_t[] = "omega_t";
static const char __pyx_k_out_any[] = "out_any";
static const char __pyx_k_overlap[] = "overlap";
static const char __pyx_k_parents[] = "parents";
static const char __pyx_k_partial[] = "partial";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_radians[] = "radians";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_revfile[] = "revfile";
static const char __pyx_k_rxykcos[] = "rxykcos";
static const char __pyx_k_rxyksin[] = "rxyksin";
static const char __pyx_k_samples[] = " samples,";
static const char __pyx_k_seconds[] = " seconds,";
static const char __pyx_k_sndplay[] = "sndplay";
static const char __pyx_k_statstr[] = "statstr";
static const char __pyx_k_tcoeffs[] = "tcoeffs";
static const char __pyx_k_ucoeffs[] = "ucoeffs";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_xcoeffs[] = "xcoeffs";
static const char __pyx_k_ycoeffs[] = "ycoeffs";
static const char __pyx_k_ALL_PASS[] = "ALL_PASS";
static const char __pyx_k_BARTLETT[] = "BARTLETT";
static const char __pyx_k_COMDISCO[] = "COMDISCO";
static const char __pyx_k_DELUSION[] = "DELUSION";
static const char __pyx_k_Ellipsis[] = "Ellipsis";
static const char __pyx_k_EnumBase[] = "EnumBase";
static const char __pyx_k_EnumType[] = "EnumType";
static const char __pyx_k_FLAT_TOP[] = "FLAT_TOP";
static const char __pyx_k_GAUSSIAN[] = "GAUSSIAN";
static const char __pyx_k_GOLDWAVE[] = "GOLDWAVE";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_LAGRANGE[] = "LAGRANGE";
static const char __pyx_k_MLT_SINE[] = "MLT_SINE";
static const char __pyx_k_PAPOULIS[] = "PAPOULIS";
static const char __pyx_k_SAMARAKI[] = "SAMARAKI";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_Spectrum[] = "Spectrum";
static const char __pyx_k_all_pass[] = "all_pass";
static const char __pyx_k_builtins[] = "__builtins__";
static const char __pyx_k_c_double[] = "c_double";
static const char __pyx_k_c_void_p[] = "c_void_p";
static const char __pyx_k_cepstrum[] = "cepstrum";
static const char __pyx_k_channels[] = "channels";
static const char __pyx_k_convolve[] = "convolve";
static const char __pyx_k_distance[] = "distance";
static const char __pyx_k_duration[] = " duration: ";
static const char __pyx_k_envelope[] = "envelope";
static const char __pyx_k_feedback[] = "feedback";
static const char __pyx_k_fft_size[] = "fft_size";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_finalize[] = "finalize";
static const char __pyx_k_fm_index[] = "fm_index";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_is_delay[] = "is_delay";
static const char __pyx_k_is_notch[] = "is_notch";
static const char __pyx_k_is_oscil[] = "is_oscil";
static const char __pyx_k_itemsize[] = "itemsize";
static const char __pyx_k_length_2[] = " length: ";
static const char __pyx_k_linspace[] = "linspace";
static const char __pyx_k_make_env[] = "make_env";
static const char __pyx_k_make_src[] = "make_src";
static const char __pyx_k_max_size[] = "max_size";
static const char __pyx_k_maxamp_2[] = "maxamp";
static const char __pyx_k_module_2[] = "module";
static const char __pyx_k_object_2[] = "object ";
static const char __pyx_k_one_pole[] = "one_pole";
static const char __pyx_k_one_zero[] = "one_zero";
static const char __pyx_k_out_bank[] = "out_bank";
static const char __pyx_k_partials[] = "partials";
static const char __pyx_k_platform[] = "platform";
static const char __pyx_k_polywave[] = "polywave";
static const char __pyx_k_pysndlib[] = "~/.pysndlib";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_readin_2[] = "readin";
static const char __pyx_k_register[] = "register";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_size_fft[] = " size fft";
static const char __pyx_k_spectrum[] = "spectrum";
static const char __pyx_k_tempfile[] = "tempfile";
static const char __pyx_k_test_aif[] = "test.aif";
static const char __pyx_k_test_rev[] = "test.rev";
static const char __pyx_k_test_wav[] = "test.wav";
static const char __pyx_k_two_pole[] = "two_pole";
static const char __pyx_k_two_zero[] = "two_zero";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_BLACKMAN2[] = "BLACKMAN2";
static const char __pyx_k_BLACKMAN3[] = "BLACKMAN3";
static const char __pyx_k_BLACKMAN4[] = "BLACKMAN4";
static const char __pyx_k_BLACKMAN5[] = "BLACKMAN5";
static const char __pyx_k_BLACKMAN6[] = "BLACKMAN6";
static const char __pyx_k_BLACKMAN7[] = "BLACKMAN7";
static const char __pyx_k_BLACKMAN8[] = "BLACKMAN8";
static const char __pyx_k_BLACKMAN9[] = "BLACKMAN9";
static const char __pyx_k_CFUNCTYPE[] = "CFUNCTYPE";
static const char __pyx_k_FARANDOLE[] = "FARANDOLE";
static const char __pyx_k_FILE_SAMP[] = "FILE_SAMP";
static const char __pyx_k_QUICKTIME[] = "QUICKTIME";
static const char __pyx_k_SOUNDFONT[] = "SOUNDFONT";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_addressof[] = "addressof";
static const char __pyx_k_amplitude[] = "amplitude";
static const char __pyx_k_analyze_f[] = "analyze_f";
static const char __pyx_k_array_has[] = "array has ";
static const char __pyx_k_asked_for[] = " asked for";
static const char __pyx_k_comb_bank[] = "comb_bank";
static const char __pyx_k_correlate[] = "correlate";
static const char __pyx_k_db2linear[] = "db2linear";
static const char __pyx_k_direction[] = "direction";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_env_rates[] = "env_rates";
static const char __pyx_k_expansion[] = "expansion";
static const char __pyx_k_expecting[] = "expecting ";
static const char __pyx_k_file_name[] = "file_name";
static const char __pyx_k_filt_view[] = "filt_view";
static const char __pyx_k_frequency[] = "frequency";
static const char __pyx_k_functools[] = "functools";
static const char __pyx_k_get_srate[] = "get_srate";
static const char __pyx_k_granulate[] = "granulate";
static const char __pyx_k_is_biquad[] = "is_biquad";
static const char __pyx_k_is_filter[] = "is_filter";
static const char __pyx_k_is_locsig[] = "is_locsig";
static const char __pyx_k_is_number[] = "is_number";
static const char __pyx_k_is_readin[] = "is_readin";
static const char __pyx_k_is_ssb_am[] = "is_ssb_am";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_linear2db[] = "linear2db";
static const char __pyx_k_make_comb[] = "make_comb";
static const char __pyx_k_make_ncos[] = "make_ncos";
static const char __pyx_k_make_nsin[] = "make_nsin";
static const char __pyx_k_make_rand[] = "make_rand";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_mus_close[] = "mus_close";
static const char __pyx_k_mus_order[] = "mus_order";
static const char __pyx_k_mus_reset[] = "mus_reset";
static const char __pyx_k_norm_type[] = "norm_type";
static const char __pyx_k_normalize[] = "normalize";
static const char __pyx_k_old_srate[] = "old_srate";
static const char __pyx_k_polyshape[] = "polyshape";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_samples_2[] = "samples";
static const char __pyx_k_scaled_by[] = "scaled_by";
static const char __pyx_k_scaled_to[] = "scaled_to";
static const char __pyx_k_seconds_2[] = " seconds, ";
static const char __pyx_k_set_srate[] = "set_srate";
static const char __pyx_k_sr_change[] = "sr_change";
static const char __pyx_k_vals_view[] = "vals_view";
static const char __pyx_k_BLACKMAN10[] = "BLACKMAN10";
static const char __pyx_k_BOTH_KINDS[] = "BOTH_KINDS";
static const char __pyx_k_DIGIPLAYER[] = "DIGIPLAYER";
static const char __pyx_k_FIRST_KIND[] = "FIRST_KIND";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_NORMALIZED[] = "NORMALIZED";
static const char __pyx_k_Polynomial[] = "Polynomial";
static const char __pyx_k_SBSTUDIOII[] = "SBSTUDIOII";
static const char __pyx_k_SINUSOIDAL[] = "SINUSOIDAL";
static const char __pyx_k_SOUNDFORGE[] = "SOUNDFORGE";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_all_passes[] = "all_passes";
static const char __pyx_k_c_longlong[] = "c_longlong";
static const char __pyx_k_channels_2[] = " channels: ";
static const char __pyx_k_check_ndim[] = "check_ndim";
static const char __pyx_k_clm_reverb[] = "clm_reverb";
static const char __pyx_k_delay_tick[] = "delay_tick";
static const char __pyx_k_duration_2[] = "duration";
static const char __pyx_k_env_interp[] = "env_interp";
static const char __pyx_k_expanduser[] = "expanduser";
static const char __pyx_k_fir_filter[] = "fir_filter";
static const char __pyx_k_get_length[] = "get_length";
static const char __pyx_k_gettempdir[] = "gettempdir";
static const char __pyx_k_hz2radians[] = "hz2radians";
static const char __pyx_k_iir_filter[] = "iir_filter";
static const char __pyx_k_is_firmant[] = "is_firmant";
static const char __pyx_k_is_formant[] = "is_formant";
static const char __pyx_k_is_nrxycos[] = "is_nrxycos";
static const char __pyx_k_is_nrxysin[] = "is_nrxysin";
static const char __pyx_k_is_rxykcos[] = "is_rxykcos";
static const char __pyx_k_is_rxyksin[] = "is_rxyksin";
static const char __pyx_k_locsig_ref[] = "locsig_ref";
static const char __pyx_k_locsig_set[] = "locsig_set";
static const char __pyx_k_make_delay[] = "make_delay";
static const char __pyx_k_make_notch[] = "make_notch";
static const char __pyx_k_make_oscil[] = "make_oscil";
static const char __pyx_k_moving_max[] = "moving_max";
static const char __pyx_k_mus_length[] = "mus_length";
static const char __pyx_k_new_length[] = "new_length";
static const char __pyx_k_odd_weight[] = "odd_weight";
static const char __pyx_k_oscil_bank[] = "oscil_bank";
static const char __pyx_k_outputfile[] = "outputfile";
static const char __pyx_k_polynomial[] = "polynomial";
static const char __pyx_k_pulsed_env[] = "pulsed_env";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_radians2hz[] = "radians2hz";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_statistics[] = "statistics";
static const char __pyx_k_subprocess[] = "subprocess";
static const char __pyx_k_synthesize[] = "synthesize";
static const char __pyx_k_table_size[] = "table_size";
static const char __pyx_k_times_view[] = "times_view";
static const char __pyx_k_wave_train[] = "wave_train";
static const char __pyx_k_writing_to[] = "writing to  ";
static const char __pyx_k_DIAMONDWARE[] = "DIAMONDWARE";
static const char __pyx_k_EITHER_KIND[] = "EITHER_KIND";
static const char __pyx_k_EXPONENTIAL[] = "EXPONENTIAL";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_NUM_HEADERS[] = "NUM_HEADERS";
static const char __pyx_k_NUM_SAMPLES[] = "NUM_SAMPLES";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_RECTANGULAR[] = "RECTANGULAR";
static const char __pyx_k_SAMPLE_DUMP[] = "SAMPLE_DUMP";
static const char __pyx_k_SECOND_KIND[] = "SECOND_KIND";
static const char __pyx_k_SNDLibError[] = "SNDLibError";
static const char __pyx_k_YAMAHA_SY85[] = "YAMAHA_SY85";
static const char __pyx_k_YAMAHA_SY99[] = "YAMAHA_SY99";
static const char __pyx_k_buffer_size[] = "buffer_size";
static const char __pyx_k_check_range[] = "check_range";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_convolution[] = "convolution";
static const char __pyx_k_dot_product[] = "dot_product";
static const char __pyx_k_envfunction[] = "_envfunction";
static const char __pyx_k_even_weight[] = "even_weight";
static const char __pyx_k_feedforward[] = "feedforward";
static const char __pyx_k_file2sample[] = "file2sample: ";
static const char __pyx_k_filter_size[] = "filter_size";
static const char __pyx_k_header_type[] = "header_type";
static const char __pyx_k_interp_type[] = "interp_type";
static const char __pyx_k_is_all_pass[] = "is_all_pass";
static const char __pyx_k_is_convolve[] = "is_convolve";
static const char __pyx_k_is_one_pole[] = "is_one_pole";
static const char __pyx_k_is_one_zero[] = "is_one_zero";
static const char __pyx_k_is_polywave[] = "is_polywave";
static const char __pyx_k_is_two_pole[] = "is_two_pole";
static const char __pyx_k_is_two_zero[] = "is_two_zero";
static const char __pyx_k_locsig_type[] = "locsig_type";
static const char __pyx_k_make_biquad[] = "make_biquad";
static const char __pyx_k_make_filter[] = "make_filter";
static const char __pyx_k_make_locsig[] = "make_locsig";
static const char __pyx_k_make_readin[] = "make_readin";
static const char __pyx_k_make_ssb_am[] = "make_ssb_am";
static const char __pyx_k_move_locsig[] = "move_locsig";
static const char __pyx_k_moving_norm[] = "moving_norm";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_mus_xcoeffs[] = "mus_xcoeffs";
static const char __pyx_k_mus_ycoeffs[] = "mus_ycoeffs";
static const char __pyx_k_orig_length[] = "orig_length";
static const char __pyx_k_phase_delay[] = "phase_delay";
static const char __pyx_k_pulse_train[] = "pulse_train";
static const char __pyx_k_rand_interp[] = "rand_interp";
static const char __pyx_k_reverb_data[] = "reverb_data";
static const char __pyx_k_sample2file[] = "sample2file";
static const char __pyx_k_sample_type[] = "sample_type";
static const char __pyx_k_set_up_data[] = "set_up_data";
static const char __pyx_k_square_wave[] = "square_wave";
static const char __pyx_k_to_partials[] = "to_partials";
static const char __pyx_k_window_type[] = "window_type";
static const char __pyx_k_HANN_POISSON[] = "HANN_POISSON";
static const char __pyx_k_Optional_int[] = "Optional[int]";
static const char __pyx_k_Pyx_EnumBase[] = "__Pyx_EnumBase";
static const char __pyx_k_Pyx_FlagBase[] = "__Pyx_FlagBase";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Sound___exit[] = "Sound.__exit__";
static const char __pyx_k_Sound___init[] = "Sound.__init__";
static const char __pyx_k_ULTRATRACKER[] = "ULTRATRACKER";
static const char __pyx_k_YAMAHA_TX16W[] = "YAMAHA_TX16W";
static const char __pyx_k_array_interp[] = "array_interp";
static const char __pyx_k_array_reader[] = "array_reader";
static const char __pyx_k_array_readin[] = "array_readin";
static const char __pyx_k_cache_append[] = "cache_append";
static const char __pyx_k_cache_extend[] = "cache_extend";
static const char __pyx_k_channels_but[] = " channels but ";
static const char __pyx_k_compute_time[] = "compute time: ";
static const char __pyx_k_cy_inp_f_ptr[] = "cy_inp_f_ptr";
static const char __pyx_k_distribution[] = "distribution";
static const char __pyx_k_editcallback[] = "_editcallback";
static const char __pyx_k_edot_product[] = "edot_product";
static const char __pyx_k_file2frample[] = "file2frample: ";
static const char __pyx_k_file2ndarray[] = "file2ndarray: ";
static const char __pyx_k_formant_bank[] = "formant_bank";
static const char __pyx_k_frample2file[] = "frample2file";
static const char __pyx_k_get_channels[] = "get_channels";
static const char __pyx_k_get_framples[] = "get_framples";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_comb_bank[] = "is_comb_bank";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_is_granulate[] = "is_granulate";
static const char __pyx_k_is_polyshape[] = "is_polyshape";
static const char __pyx_k_make_dcblock[] = "make_dcblock";
static const char __pyx_k_make_firmant[] = "make_firmant";
static const char __pyx_k_make_formant[] = "make_formant";
static const char __pyx_k_make_nrxycos[] = "make_nrxycos";
static const char __pyx_k_make_nrxysin[] = "make_nrxysin";
static const char __pyx_k_make_rxykcos[] = "make_rxykcos";
static const char __pyx_k_make_rxyksin[] = "make_rxyksin";
static const char __pyx_k_member_names[] = "_member_names_";
static const char __pyx_k_mus_any_next[] = "mus_any.next";
static const char __pyx_k_mus_cepstrum[] = "mus_cepstrum";
static const char __pyx_k_mus_channels[] = "mus_channels";
static const char __pyx_k_mus_is_input[] = "mus_is_input";
static const char __pyx_k_mus_spectrum[] = "mus_spectrum";
static const char __pyx_k_ndarray2file[] = "ndarray2file";
static const char __pyx_k_odd_multiple[] = "odd_multiple";
static const char __pyx_k_perf_counter[] = "perf_counter";
static const char __pyx_k_pysndlib_clm[] = "pysndlib.clm";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_synthesize_f[] = "synthesize_f";
static const char __pyx_k_table_lookup[] = "table_lookup";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_BARTLETT_HANN[] = "BARTLETT_HANN";
static const char __pyx_k_GeneratorType[] = "GeneratorType";
static const char __pyx_k_KURZWEIL_2000[] = "KURZWEIL_2000";
static const char __pyx_k_Sound___enter[] = "Sound.__enter__";
static const char __pyx_k_all_pass_bank[] = "all_pass_bank";
static const char __pyx_k_asymmetric_fm[] = "asymmetric_fm";
static const char __pyx_k_autocorrelate[] = "autocorrelate";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_compute_ratio[] = "compute ratio: ";
static const char __pyx_k_cy_edit_f_ptr[] = "cy_edit_f_ptr";
static const char __pyx_k_delete_reverb[] = "delete_reverb";
static const char __pyx_k_even_multiple[] = "even_multiple";
static const char __pyx_k_file2sample_2[] = "file2sample";
static const char __pyx_k_filtered_comb[] = "filtered_comb";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_initial_phase[] = "initial_phase";
static const char __pyx_k_inputcallback[] = "_inputcallback";
static const char __pyx_k_is_fir_filter[] = "is_fir_filter";
static const char __pyx_k_is_iir_filter[] = "is_iir_filter";
static const char __pyx_k_is_moving_max[] = "is_moving_max";
static const char __pyx_k_is_oscil_bank[] = "is_oscil_bank";
static const char __pyx_k_is_power_of_2[] = "is_power_of_2";
static const char __pyx_k_is_pulsed_env[] = "is_pulsed_env";
static const char __pyx_k_is_wave_train[] = "is_wave_train";
static const char __pyx_k_make_all_pass[] = "make_all_pass";
static const char __pyx_k_make_convolve[] = "make_convolve";
static const char __pyx_k_make_one_pole[] = "make_one_pole";
static const char __pyx_k_make_one_zero[] = "make_one_zero";
static const char __pyx_k_make_polywave[] = "make_polywave";
static const char __pyx_k_make_two_pole[] = "make_two_pole";
static const char __pyx_k_make_two_zero[] = "make_two_zero";
static const char __pyx_k_maxamp_result[] = "maxamp_result";
static const char __pyx_k_mus_any_array[] = "mus_any_array";
static const char __pyx_k_mus_correlate[] = "mus_correlate";
static const char __pyx_k_mus_is_output[] = "mus_is_output";
static const char __pyx_k_not_supported[] = " not supported";
static const char __pyx_k_partials2wave[] = "partials2wave";
static const char __pyx_k_phase_vocoder[] = "phase_vocoder";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_ring_modulate[] = "ring_modulate";
static const char __pyx_k_sawtooth_wave[] = "sawtooth_wave";
static const char __pyx_k_triangle_wave[] = "triangle_wave";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_IMPULSETRACKER[] = "IMPULSETRACKER";
static const char __pyx_k_Optional_float[] = "Optional[float]";
static const char __pyx_k_ULTRASPHERICAL[] = "ULTRASPHERICAL";
static const char __pyx_k_UNKNOWN_HEADER[] = "UNKNOWN_HEADER";
static const char __pyx_k_UNKNOWN_SAMPLE[] = "UNKNOWN_SAMPLE";
static const char __pyx_k_array_resample[] = "array_resample";
static const char __pyx_k_before_scaling[] = "(before scaling) ";
static const char __pyx_k_compare_shapes[] = "compare_shapes";
static const char __pyx_k_convolve_files[] = "convolve_files";
static const char __pyx_k_cy_input_f_ptr[] = "cy_input_f_ptr";
static const char __pyx_k_does_not_exist[] = " does not exist.";
static const char __pyx_k_file2frample_2[] = "file2frample";
static const char __pyx_k_file2ndarray_2[] = "file2ndarray";
static const char __pyx_k_is_file2sample[] = "is_file2sample";
static const char __pyx_k_is_moving_norm[] = "is_moving_norm";
static const char __pyx_k_is_pulse_train[] = "is_pulse_train";
static const char __pyx_k_is_rand_interp[] = "is_rand_interp";
static const char __pyx_k_is_sample2file[] = "is_sample2file";
static const char __pyx_k_is_square_wave[] = "is_square_wave";
static const char __pyx_k_make_comb_bank[] = "make_comb_bank";
static const char __pyx_k_make_granulate[] = "make_granulate";
static const char __pyx_k_make_polyshape[] = "make_polyshape";
static const char __pyx_k_moving_average[] = "moving_average";
static const char __pyx_k_output_to_file[] = "output_to_file";
static const char __pyx_k_reverb_to_file[] = "reverb_to_file";
static const char __pyx_k_set_up_pv_data[] = "set_up_pv_data";
static const char __pyx_k_set_up_xcoeffs[] = "set_up_xcoeffs";
static const char __pyx_k_set_up_ycoeffs[] = "set_up_ycoeffs";
static const char __pyx_k_BFLOAT_UNSCALED[] = "BFLOAT_UNSCALED";
static const char __pyx_k_DOLPH_CHEBYSHEV[] = "DOLPH_CHEBYSHEV";
static const char __pyx_k_LFLOAT_UNSCALED[] = "LFLOAT_UNSCALED";
static const char __pyx_k_SimpleNamespace[] = "SimpleNamespace";
static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
static const char __pyx_k_analyzecallback[] = "_analyzecallback";
static const char __pyx_k_chebyshev_t_sum[] = "chebyshev_t_sum";
static const char __pyx_k_chebyshev_u_sum[] = "chebyshev_u_sum";
static const char __pyx_k_collections_abc[] = "collections.abc";
static const char __pyx_k_degrees2radians[] = "degrees2radians";
static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
static const char __pyx_k_envelope_interp[] = "envelope_interp";
static const char __pyx_k_initial_element[] = "initial_element";
static const char __pyx_k_is_array_readin[] = "is_array_readin";
static const char __pyx_k_is_file2frample[] = "is_file2frample";
static const char __pyx_k_is_formant_bank[] = "is_formant_bank";
static const char __pyx_k_is_frample2file[] = "is_frample2file";
static const char __pyx_k_is_out_of_range[] = " is out of range. ";
static const char __pyx_k_is_table_lookup[] = "is_table_lookup";
static const char __pyx_k_make_fft_window[] = "make_fft_window";
static const char __pyx_k_make_fir_coeffs[] = "make_fir_coeffs";
static const char __pyx_k_make_fir_filter[] = "make_fir_filter";
static const char __pyx_k_make_iir_filter[] = "make_iir_filter";
static const char __pyx_k_make_moving_max[] = "make_moving_max";
static const char __pyx_k_make_oscil_bank[] = "make_oscil_bank";
static const char __pyx_k_make_pulsed_env[] = "make_pulsed_env";
static const char __pyx_k_make_wave_train[] = "make_wave_train";
static const char __pyx_k_mus_convolution[] = "mus_convolution";
static const char __pyx_k_mus_interpolate[] = "mus_interpolate";
static const char __pyx_k_next_power_of_2[] = "next_power_of_2";
static const char __pyx_k_pysndlib_sndlib[] = "pysndlib.sndlib";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_radians2degrees[] = "radians2degrees";
static const char __pyx_k_reverb_channels[] = "reverb_channels";
static const char __pyx_k_samples2seconds[] = "samples2seconds";
static const char __pyx_k_seconds2samples[] = "seconds2samples";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_tap_unmodulated[] = "tap_unmodulated";
static const char __pyx_k_BDOUBLE_UNSCALED[] = "BDOUBLE_UNSCALED";
static const char __pyx_k_LDOUBLE_UNSCALED[] = "LDOUBLE_UNSCALED";
static const char __pyx_k_MIDI_SAMPLE_DUMP[] = "MIDI_SAMPLE_DUMP";
static const char __pyx_k_array_readin_gen[] = "array_readin_gen";
static const char __pyx_k_chebyshev_tu_sum[] = "chebyshev_tu_sum";
static const char __pyx_k_cy_analyze_f_ptr[] = "cy_analyze_f_ptr";
static const char __pyx_k_initial_contents[] = "initial_contents";
static const char __pyx_k_is_all_pass_bank[] = "is_all_pass_bank";
static const char __pyx_k_is_asymmetric_fm[] = "is_asymmetric_fm";
static const char __pyx_k_is_filtered_comb[] = "is_filtered_comb";
static const char __pyx_k_is_phase_vocoder[] = "is_phase_vocoder";
static const char __pyx_k_is_sawtooth_wave[] = "is_sawtooth_wave";
static const char __pyx_k_is_triangle_wave[] = "is_triangle_wave";
static const char __pyx_k_make_file2sample[] = "make_file2sample";
static const char __pyx_k_make_moving_norm[] = "make_moving_norm";
static const char __pyx_k_make_pulse_train[] = "make_pulse_train";
static const char __pyx_k_make_rand_interp[] = "make_rand_interp";
static const char __pyx_k_make_sample2file[] = "make_sample2file";
static const char __pyx_k_make_square_wave[] = "make_square_wave";
static const char __pyx_k_rand_unmodulated[] = "rand_unmodulated";
static const char __pyx_k_reverb_file_name[] = "reverb_file_name";
static const char __pyx_k_DEFAULT_FILE_NAME[] = "DEFAULT_FILE_NAME";
static const char __pyx_k_FileNotFoundError[] = "FileNotFoundError";
static const char __pyx_k_continue_old_file[] = "continue_old_file";
static const char __pyx_k_convert_frequency[] = "convert_frequency";
static const char __pyx_k_delay_unmodulated[] = "delay_unmodulated";
static const char __pyx_k_impulse_generator[] = "impulse_generator";
static const char __pyx_k_is_moving_average[] = "is_moving_average";
static const char __pyx_k_locsig_reverb_ref[] = "locsig_reverb_ref";
static const char __pyx_k_locsig_reverb_set[] = "locsig_reverb_set";
static const char __pyx_k_make_array_readin[] = "make_array_readin";
static const char __pyx_k_make_biquad_notch[] = "make_biquad_notch";
static const char __pyx_k_make_file2frample[] = "make_file2frample";
static const char __pyx_k_make_formant_bank[] = "make_formant_bank";
static const char __pyx_k_make_frample2file[] = "make_frample2file";
static const char __pyx_k_make_table_lookup[] = "make_table_lookup";
static const char __pyx_k_mus_any_mus_reset[] = "mus_any.mus_reset";
static const char __pyx_k_mus_autocorrelate[] = "mus_autocorrelate";
static const char __pyx_k_notch_unmodulated[] = "notch_unmodulated";
static const char __pyx_k_one_pole_all_pass[] = "one_pole_all_pass";
static const char __pyx_k_oscil_unmodulated[] = "oscil_unmodulated";
static const char __pyx_k_polar2rectangular[] = "polar2rectangular";
static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
static const char __pyx_k_rectangular2polar[] = "rectangular2polar";
static const char __pyx_k_validate_envelope[] = "validate_envelope";
static const char __pyx_k_Pyx_EnumBase___new[] = "__Pyx_EnumBase.__new__";
static const char __pyx_k_Pyx_EnumBase___str[] = "__Pyx_EnumBase.__str__";
static const char __pyx_k_Pyx_FlagBase___new[] = "__Pyx_FlagBase.__new__";
static const char __pyx_k_Pyx_FlagBase___str[] = "__Pyx_FlagBase.__str__";
static const char __pyx_k_amplitude_modulate[] = "amplitude_modulate";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_filtered_comb_bank[] = "filtered_comb_bank";
static const char __pyx_k_is_list_or_ndarray[] = "is_list_or_ndarray";
static const char __pyx_k_make_all_pass_bank[] = "make_all_pass_bank";
static const char __pyx_k_make_asymmetric_fm[] = "make_asymmetric_fm";
static const char __pyx_k_make_filtered_comb[] = "make_filtered_comb";
static const char __pyx_k_make_phase_vocoder[] = "make_phase_vocoder";
static const char __pyx_k_make_sawtooth_wave[] = "make_sawtooth_wave";
static const char __pyx_k_make_triangle_wave[] = "make_triangle_wave";
static const char __pyx_k_normalize_partials[] = "normalize_partials";
static const char __pyx_k_phase_vocoder_amps[] = "phase_vocoder_amps";
static const char __pyx_k_ssb_am_unmodulated[] = "ssb_am_unmodulated";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
static const char __pyx_k_synthesizecallback[] = "_synthesizecallback";
static const char __pyx_k_DEFAULT_FILE_PLAYER[] = "DEFAULT_FILE_PLAYER";
static const char __pyx_k_Pyx_EnumBase___repr[] = "__Pyx_EnumBase.__repr__";
static const char __pyx_k_Pyx_FlagBase___repr[] = "__Pyx_FlagBase.__repr__";
static const char __pyx_k_SNDLibError____init[] = "SNDLibError.___init___";
static const char __pyx_k_connection_function[] = "connection_function";
static const char __pyx_k_cy_synthesize_f_ptr[] = "cy_synthesize_f_ptr";
static const char __pyx_k_make_moving_average[] = "make_moving_average";
static const char __pyx_k_many_useful_windows[] = "\n    many useful windows\n    ";
static const char __pyx_k_mus_any_set_up_data[] = "mus_any.set_up_data";
static const char __pyx_k_no_player_specified[] = "no player specified";
static const char __pyx_k_partials2polynomial[] = "partials2polynomial";
static const char __pyx_k_phase_partials2wave[] = "phase_partials2wave";
static const char __pyx_k_phase_vocoder_freqs[] = "phase_vocoder_freqs";
static const char __pyx_k_DEFAULT_OUTPUT_CHANS[] = "DEFAULT_OUTPUT_CHANS";
static const char __pyx_k_DEFAULT_OUTPUT_SRATE[] = "DEFAULT_OUTPUT_SRATE";
static const char __pyx_k_Unknown_enum_value_s[] = "Unknown enum value: '%s'";
static const char __pyx_k_biquad_set_resonance[] = "biquad_set_resonance";
static const char __pyx_k_continue_sample2file[] = "continue_sample2file";
static const char __pyx_k_contrast_enhancement[] = "contrast_enhancement";
static const char __pyx_k_is_one_pole_all_pass[] = "is_one_pole_all_pass";
static const char __pyx_k_locsigdetourcallback[] = "_locsigdetourcallback";
static const char __pyx_k_make_biquad_all_pass[] = "make_biquad_all_pass";
static const char __pyx_k_make_biquad_low_pass[] = "make_biquad_low_pass";
static const char __pyx_k_mus_any_cache_append[] = "mus_any.cache_append";
static const char __pyx_k_mus_any_cache_extend[] = "mus_any.cache_extend";
static const char __pyx_k_phase_vocoder_phases[] = "phase_vocoder_phases";
static const char __pyx_k_polywave_unmodulated[] = "polywave_unmodulated";
static const char __pyx_k_src_pysndlib_clm_pyx[] = "src/pysndlib/clm.pyx";
static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
static const char __pyx_k_continue_frample2file[] = "continue_frample2file";
static const char __pyx_k_is_filtered_comb_bank[] = "is_filtered_comb_bank";
static const char __pyx_k_make_biquad_band_pass[] = "make_biquad_band_pass";
static const char __pyx_k_make_biquad_high_pass[] = "make_biquad_high_pass";
static const char __pyx_k_make_src_locals_inp_f[] = "make_src.<locals>.inp_f";
static const char __pyx_k_mus_polar2rectangular[] = "mus_polar2rectangular";
static const char __pyx_k_mus_rectangular2polar[] = "mus_rectangular2polar";
static const char __pyx_k_polyshape_unmodulated[] = "polyshape_unmodulated";
static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
static const char __pyx_k_clm_reverb_locals_call[] = "clm_reverb.<locals>.call";
static const char __pyx_k_make_one_pole_all_pass[] = "make_one_pole_all_pass";
static const char __pyx_k_mus_any_set_up_pv_data[] = "mus_any.set_up_pv_data";
static const char __pyx_k_mus_any_set_up_xcoeffs[] = "mus_any.set_up_xcoeffs";
static const char __pyx_k_mus_any_set_up_ycoeffs[] = "mus_any.set_up_ycoeffs";
static const char __pyx_k_npt_NDArray_np_float64[] = "npt.NDArray[np.float64]";
static const char __pyx_k_pulsed_env_unmodulated[] = "pulsed_env_unmodulated";
static const char __pyx_k_rectangular2magnitudes[] = "rectangular2magnitudes";
static const char __pyx_k_wave_train_unmodulated[] = "wave_train_unmodulated";
static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
static const char __pyx_k_dimemsions_but_received[] = " dimemsions but received ";
static const char __pyx_k_make_biquad_band_reject[] = "make_biquad_band_reject";
static const char __pyx_k_make_filtered_comb_bank[] = "make_filtered_comb_bank";
static const char __pyx_k_mus_any___reduce_cython[] = "mus_any.__reduce_cython__";
static const char __pyx_k_pulse_train_unmodulated[] = "pulse_train_unmodulated";
static const char __pyx_k_rand_interp_unmodulated[] = "rand_interp_unmodulated";
static const char __pyx_k_has_no_meaningful_length[] = " has no meaningful length. ";
static const char __pyx_k_make_wave_train_with_env[] = "make_wave_train_with_env";
static const char __pyx_k_table_lookup_unmodulated[] = "table_lookup_unmodulated";
static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
static const char __pyx_k_asymmetric_fm_unmodulated[] = "asymmetric_fm_unmodulated";
static const char __pyx_k_filtered_comb_unmodulated[] = "filtered_comb_unmodulated";
static const char __pyx_k_mus_any___setstate_cython[] = "mus_any.__setstate_cython__";
static const char __pyx_k_ndarrays_of_unequal_shape[] = "ndarrays of unequal shape ";
static const char __pyx_k_triangle_wave_unmodulated[] = "triangle_wave_unmodulated";
static const char __pyx_k_DEFAULT_OUTPUT_HEADER_TYPE[] = "DEFAULT_OUTPUT_HEADER_TYPE";
static const char __pyx_k_DEFAULT_OUTPUT_SAMPLE_TYPE[] = "DEFAULT_OUTPUT_SAMPLE_TYPE";
static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
static const char __pyx_k_array_reader_locals_reader[] = "array_reader.<locals>.reader";
static const char __pyx_k_has_no_meaningful_channels[] = " has no meaningful channels. ";
static const char __pyx_k_has_no_meaningful_framples[] = " has no meaningful framples. ";
static const char __pyx_k_make_convolve_locals_inp_f[] = "make_convolve.<locals>.inp_f";
static const char __pyx_k_make_table_lookup_with_env[] = "make_table_lookup_with_env";
static const char __pyx_k_mus_rectangular2magnitudes[] = "mus_rectangular2magnitudes";
static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
static const char __pyx_k_make_granulate_locals_inp_f[] = "make_granulate.<locals>.inp_f";
static const char __pyx_k_pyx_unpickle___Pyx_EnumMeta[] = "__pyx_unpickle___Pyx_EnumMeta";
static const char __pyx_k_various_interpolation_types[] = "\n    various interpolation types\n    ";
static const char __pyx_k_Pyx_EnumMeta___reduce_cython[] = "__Pyx_EnumMeta.__reduce_cython__";
static const char __pyx_k_biquad_set_equal_gain_zeroes[] = "biquad_set_equal_gain_zeroes";
static const char __pyx_k_make_granulate_locals_edit_f[] = "make_granulate.<locals>.edit_f";
static const char __pyx_k_phase_vocoder_amp_increments[] = "phase_vocoder_amp_increments";
static const char __pyx_k_mus_any_array___reduce_cython[] = "mus_any_array.__reduce_cython__";
static const char __pyx_k_mus_data_can_not_be_called_on[] = "mus_data can not be called on ";
static const char __pyx_k_pyx_unpickle_array_readin_gen[] = "__pyx_unpickle_array_readin_gen";
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
static const char __pyx_k_Pyx_EnumMeta___setstate_cython[] = "__Pyx_EnumMeta.__setstate_cython__";
static const char __pyx_k_phase_vocoder_phase_increments[] = "phase_vocoder_phase_increments";
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
static const char __pyx_k_this_is_general_class_to_raise[] = "\n    this is general class to raise an print errors as defined in sndlib. it is to be used internally by the defined error handler registered with sndlib\n    \n    :meta private:\n    ";
static const char __pyx_k_used_for_polynomial_based_gens[] = "\n    used for polynomial based gens \n    ";
static const char __pyx_k_a_valid_envelope_needs_at_least[] = "a valid envelope needs at least 2 elements";
static const char __pyx_k_cannot_be_converted_to_a_mus_fl[] = " cannot be converted to a mus_float_array";
static const char __pyx_k_context_manager_which_handles_c[] = "\n    context manager which handles creating output and other options\n    \n    :param output: Can be a filename string or np.ndarray\n    :param channels: number of channels \\in main output\n    :param srate:  output sampling rate \n    :param sample_type: output sample data type\n    :param header_type: output header type \n    :param comment: any comment to store \\in the header\n    :param verbose: if True, print out some info (doesn't do anything now)\n    :param reverb: reverb instrument\n    :param reverb_data: arguments passed to the reverb (dictionary)\n    :param reverb_channels: chans \\in the reverb intermediate file\n    :param revfile: reverb intermediate output file name\n    :param continue_old_file: if True, continue a previous computation\n    :param statistics: if True, print info at end of with-sound (compile time, maxamps)\n    :param scaled_to: if a number, scale the output to peak at that amp\n    :param scaled_by: is a number, scale output by that amp\n    :param play: if True, play the sound automatically\n    :param finalize: a function to call on exit from the context. should be a function that takes one argument, the name of the sound file or the ndarray \n        used as output\n    ";
static const char __pyx_k_fft_size_must_be_power_of_2_not[] = "fft_size must be power of 2 not ";
static const char __pyx_k_make_phase_vocoder_locals_inp_f[] = "make_phase_vocoder.<locals>.inp_f";
static const char __pyx_k_mus_any_array___setstate_cython[] = "mus_any_array.__setstate_cython__";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_output_needs_to_be_a_clm_gen_or[] = "output needs to be a clm gen or np.array not a ";
static const char __pyx_k_types_of_normalizations_when_us[] = "\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    ";
static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
static const char __pyx_k_Filter_needs_values_for_a0_a1_a2[] = "Filter needs values for a0, a1, a2 got a0: ";
static const char __pyx_k_Filter_needs_values_for_a0_b1_b2[] = "Filter needs values for a0, b1, b2 got a0: ";
static const char __pyx_k_If_not_specifying_coeffs_must_pr[] = "If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())";
static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
static const char __pyx_k_a_valid_envelope_can_only_contai[] = "a valid envelope can only contain numbers.";
static const char __pyx_k_a_valid_envelope_needs_even_numb[] = "a valid envelope needs even number of elements. This has {len(e)}";
static const char __pyx_k_allpass_list_contains_at_least_o[] = "allpass list contains at least one element that is not a all_pass.";
static const char __pyx_k_array_readin_gen___reduce_cython[] = "array_readin_gen.__reduce_cython__";
static const char __pyx_k_array_readin_gen___setstate_cyth[] = "array_readin_gen.__setstate_cython__";
static const char __pyx_k_enum_class_Header_not_importable[] = "enum class Header not importable from pysndlib.sndlib. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.";
static const char __pyx_k_enum_class_Sample_not_importable[] = "enum class Sample not importable from pysndlib.sndlib. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.";
static const char __pyx_k_fft_size_must_be_a_positive_numb[] = "fft_size must be a positive number greater than 0 not ";
static const char __pyx_k_fft_size_too_large_cannot_alloca[] = "fft_size too large. cannot allocate ";
static const char __pyx_k_filter_list_contains_at_least_on[] = "filter list contains at least one element that is not a formant.";
static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
static const char __pyx_k_input_needs_to_be_a_clm_gen_or_a[] = "input needs to be a clm gen or a callable not a ";
static const char __pyx_k_input_needs_to_be_a_clm_gen_or_f[] = "input needs to be a clm gen or function not a ";
static const char __pyx_k_make_phase_vocoder_locals_analyz[] = "make_phase_vocoder.<locals>.analyze_f";
static const char __pyx_k_make_phase_vocoder_locals_edit_f[] = "make_phase_vocoder.<locals>.edit_f";
static const char __pyx_k_make_phase_vocoder_locals_synthe[] = "make_phase_vocoder.<locals>.synthesize_f";
static const char __pyx_k_mus_xcoeffs_can_not_be_called_on[] = "mus_xcoeffs can not be called on ";
static const char __pyx_k_mus_ycoeffs_can_not_be_called_on[] = "mus_ycoeffs can not be called on ";
static const char __pyx_k_ndarray_must_have_1_or_2_dimensi[] = "ndarray must have 1 or 2 dimensions not ";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_this_class_cannot_be_instantiate[] = "this class cannot be instantiated directly.";
static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
static const char __pyx_k_validate_envelope_locals_genexpr[] = "validate_envelope.<locals>.genexpr";
static const char __pyx_k_x_values_of_envelope_must_be_inc[] = "x values of envelope must be increasing";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))";
static const char __pyx_k_fft_size_must_be_a_positive_numb_2[] = "fft_size must be a positive number greater than 1 not ";
static const char __pyx_k_filter_list_contains_at_least_on_2[] = "filter list contains at least one element that is not a filtered_comb.";
/* #### Code section: decls ### */
static int __pyx_pf_8EnumBase_14__Pyx_EnumMeta___init__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_parents, PyObject *__pyx_v_dct); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_2__iter__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_4__getitem__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_6__reduce_cython__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_8__setstate_cython__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8EnumBase___pyx_unpickle___Pyx_EnumMeta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_11SNDLibError____init___(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_check_ndim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_dim); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_2check_range(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg, PyObject *__pyx_v_x, PyObject *__pyx_v_low, PyObject *__pyx_v_high); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_4compare_shapes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr1, PyObject *__pyx_v_arr2); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any___cinit__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static void __pyx_pf_8pysndlib_3clm_7mus_any_2__dealloc__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_4__init__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_6cache_append(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8cache_extend(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10set_up_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_v_length); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12set_up_xcoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_14set_up_ycoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_16set_up_pv_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_18__call__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_20__str__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_22mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_24next(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, double __pyx_v_arg1, double __pyx_v_arg2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_length___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_length_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_location___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_12mus_location_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_channels___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_15mus_interp_type___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_width___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_9mus_width_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_order___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_channel___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8mus_data___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_7mus_any_8mus_data_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_xcoeffs___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_ycoeffs___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_file_name___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_8pysndlib_3clm_13mus_any_array___cinit__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self, size_t __pyx_v_number); /* proto */
static void __pyx_pf_8pysndlib_3clm_13mus_any_array_2__dealloc__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_8pysndlib_3clm_13mus_any_array_4__len__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_6__str__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_6file2ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_channel, PyObject *__pyx_v_beg, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_8ndarray2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_size, PyObject *__pyx_v_sr, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_5Sound___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_output, PyObject *__pyx_v_channels, PyObject *__pyx_v_srate, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment, PyObject *__pyx_v_verbose, PyObject *__pyx_v_reverb, PyObject *__pyx_v_revfile, PyObject *__pyx_v_reverb_data, PyObject *__pyx_v_reverb_channels, PyObject *__pyx_v_continue_old_file, PyObject *__pyx_v_statistics, PyObject *__pyx_v_scaled_to, PyObject *__pyx_v_scaled_by, PyObject *__pyx_v_play, PyObject *__pyx_v_clipped, PyObject *__pyx_v_finalize); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_5Sound_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_5Sound_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_10is_list_or_ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_12is_power_of_2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_14next_power_of_2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16to_partials(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_harms); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_18mus_close(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_20mus_is_output(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_22mus_is_input(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_24mus_reset(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_26get_length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_28get_channels(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_30get_srate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_32get_framples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_34random(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_17validate_envelope_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_36validate_envelope(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_e); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_38is_zero(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_40is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_42is_odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_44is_even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_46radians2hz(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_radians); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_48hz2radians(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_hz); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_50degrees2radians(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_52radians2degrees(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_radians); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_54db2linear(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_56linear2db(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_58odd_multiple(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_60even_multiple(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_62odd_weight(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_64even_weight(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_66set_srate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_r); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_68seconds2samples(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_secs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_70samples2seconds(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_samples); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_72ring_modulate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_s1, double __pyx_v_s2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_74amplitude_modulate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_s1, double __pyx_v_s2, double __pyx_v_s3); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_76contrast_enhancement(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_insig, double __pyx_v_fm_index); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_78dot_product(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_80polynomial(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_coeffs, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_82array_interp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_fn, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_84bessi0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_86mus_interpolate(CYTHON_UNUSED PyObject *__pyx_self, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type, double __pyx_v_x, PyArrayObject *__pyx_v_table, double __pyx_v_y1); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_88make_fft_window(CYTHON_UNUSED PyObject *__pyx_self, enum __pyx_t_8pysndlib_3clm_Window __pyx_v_window_type, int __pyx_v_size, double __pyx_v_beta, double __pyx_v_alpha); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_90mus_fft(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_92fft(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_94mus_rectangular2polar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_96rectangular2polar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_98mus_rectangular2magnitudes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_100rectangular2magnitudes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_102mus_polar2rectangular(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_104polar2rectangular(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_106mus_spectrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_108spectrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_110mus_convolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, PyObject *__pyx_v_fft_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_112convolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, PyObject *__pyx_v_fft_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_114mus_autocorrelate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_116autocorrelate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_118mus_correlate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_120correlate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_122mus_cepstrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_124cepstrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_126partials2wave(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, PyArrayObject *__pyx_v_wave, PyObject *__pyx_v_table_size, int __pyx_v_norm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_128phase_partials2wave(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, PyArrayObject *__pyx_v_wave, PyObject *__pyx_v_table_size, int __pyx_v_norm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_130partials2polynomial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_132normalize_partials(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_134chebyshev_tu_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_tcoeffs, PyObject *__pyx_v_ucoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_136chebyshev_t_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_tcoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_138chebyshev_u_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_ucoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_140make_oscil(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_142oscil(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm, double __pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_144oscil_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_146is_oscil(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_148make_oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_freqs, PyObject *__pyx_v_phases, PyObject *__pyx_v_amps, int __pyx_v_stable); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_150oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_152is_oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_154make_env(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_envelope, double __pyx_v_duration, double __pyx_v_scaler, double __pyx_v_offset, double __pyx_v_base, int __pyx_v_length); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_156env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_158is_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_160env_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_162envelope_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_164env_rates(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_166env_any(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_connection_function); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_168make_pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_envelope, double __pyx_v_duration, double __pyx_v_frequency); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_170pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_172pulsed_env_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_174is_pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_176make_table_lookup(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, PyObject *__pyx_v_wave, PyObject *__pyx_v_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_178table_lookup(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_180table_lookup_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_182is_table_lookup(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_184make_table_lookup_with_env(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_envelope, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_186make_polywave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind, PyObject *__pyx_v_xcoeffs, PyObject *__pyx_v_ycoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_188polywave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_190polywave_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_192is_polywave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_194make_polyshape(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_196polyshape(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_198polyshape_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_200is_polyshape(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_202make_triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_204triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_206triangle_wave_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_208is_triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_210make_square_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_212square_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_214is_square_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_216make_sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_218sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_220is_sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_222make_pulse_train(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_224pulse_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_226pulse_train_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_228is_pulse_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_230make_ncos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_n); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_232ncos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_234is_ncos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_236make_nsin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_n); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_238nsin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_240is_nsin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_242make_nrxysin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_ratio, int __pyx_v_n, double __pyx_v_r); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_244nrxysin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_246is_nrxysin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_248make_nrxycos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_ratio, int __pyx_v_n, double __pyx_v_r); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_250nrxycos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_252is_nrxycos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_254make_rxykcos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_phase, double __pyx_v_r, double __pyx_v_ratio); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_256rxykcos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_258is_rxykcos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_260make_rxyksin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_phase, double __pyx_v_r, double __pyx_v_ratio); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_262rxyksin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_264is_rxyksin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_266make_ssb_am(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_order); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_268ssb_am(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_270ssb_am_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_272is_ssb_am(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_274make_wave_train(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_wave, double __pyx_v_initial_phase, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_276wave_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_278wave_train_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_280is_wave_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_282make_wave_train_with_env(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_envelope, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_284make_rand(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, PyObject *__pyx_v_distribution); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_286rand(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sweep); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_288rand_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_290is_rand(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_292make_rand_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, PyObject *__pyx_v_distribution); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_294rand_interp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sweep); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_296rand_interp_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_298is_rand_interp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_300make_one_pole(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_b1); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_302one_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_304is_one_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_306make_one_zero(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_a1); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_308one_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_310is_one_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_312make_two_pole(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frequency, PyObject *__pyx_v_radius, PyObject *__pyx_v_a0, PyObject *__pyx_v_b1, PyObject *__pyx_v_b2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_314two_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_316is_two_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_318make_two_zero(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frequency, PyObject *__pyx_v_radius, PyObject *__pyx_v_a0, PyObject *__pyx_v_a1, PyObject *__pyx_v_a2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_320two_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_322is_two_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_324make_formant(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_radius); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_326formant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_radians); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_328is_formant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_330make_formant_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filters, PyObject *__pyx_v_amps); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_332formant_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_inputs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_334is_formant_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_336make_firmant(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_radius); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_338firmant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_radians); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_340is_firmant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_342make_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_xcoeffs, PyObject *__pyx_v_ycoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_344filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_346is_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_348make_fir_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_xcoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_350fir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_352is_fir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_354make_iir_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_ycoeffs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_356iir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_358is_iir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_360make_fir_coeffs(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_envelope); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_362make_delay(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, PyObject *__pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_364delay(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_366delay_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_368is_delay(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_370tap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_372tap_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_374is_tap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_376delay_tick(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_378make_comb(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, PyObject *__pyx_v_size, PyObject *__pyx_v_initial_contents, PyObject *__pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_380comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, PyObject *__pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_382is_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_384make_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_combs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_386comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_388is_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_390make_filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, long __pyx_v_size, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_filter, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_392filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_394filtered_comb_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_396is_filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_398make_filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fcombs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_400filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_402is_filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_404make_notch(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedforward, PyObject *__pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_406notch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_408notch_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_410is_notch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_412make_all_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, double __pyx_v_feedforward, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_414all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, PyObject *__pyx_v_pm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_416is_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_418make_all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_all_passes); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_420all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_422is_all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_424make_one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, double __pyx_v_coeff); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_426one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_428is_one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_430make_moving_average(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_432moving_average(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_434is_moving_average(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_436make_moving_max(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_438moving_max(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_440is_moving_max(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_442make_moving_norm(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_scaler); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_444moving_norm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_446is_moving_norm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_448make_asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, double __pyx_v_r, double __pyx_v_ratio); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_450asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, double __pyx_v_fm); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_452asymmetric_fm_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_454is_asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_456make_file2sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_458file2sample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, int __pyx_v_chan); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_460is_file2sample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_462make_sample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chans, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_464sample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, int __pyx_v_chan, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_466is_sample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_468continue_sample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_470make_file2frample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_472file2frample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_474is_file2frample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_476make_frample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chans, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_478frample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, PyObject *__pyx_v_vals); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_480is_frample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_482continue_frample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_484make_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chan, long __pyx_v_start, int __pyx_v_direction, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_486readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_488is_readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_8make_src_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_490make_src(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, double __pyx_v_srate, int __pyx_v_width); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_492src(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sr_change); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_494is_src(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_13make_convolve_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_496make_convolve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_filt, long __pyx_v_fft_size, PyObject *__pyx_v_filter_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_498convolve(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_500is_convolve(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_14make_granulate_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_14make_granulate_2edit_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_502make_granulate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_expansion, PyObject *__pyx_v_length, PyObject *__pyx_v_scaler, PyObject *__pyx_v_hop, PyObject *__pyx_v_ramp, PyObject *__pyx_v_jitter, PyObject *__pyx_v_max_size, PyObject *__pyx_v_edit); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_504granulate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_506is_granulate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_2edit_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_4analyze_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, CYTHON_UNUSED PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_6synthesize_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_508make_phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_fft_size, PyObject *__pyx_v_overlap, PyObject *__pyx_v_interp, PyObject *__pyx_v_pitch, PyObject *__pyx_v_analyze, PyObject *__pyx_v_edit, PyObject *__pyx_v_synthesize); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_510phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_512is_phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_514phase_vocoder_amp_increments(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_516phase_vocoder_amps(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_518phase_vocoder_freqs(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_520phase_vocoder_phases(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_522phase_vocoder_phase_increments(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_524out_any(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, int __pyx_v_channel, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_526outa(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_528outb(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_530outc(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_532outd(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_534out_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gens, long __pyx_v_loc, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_536in_any(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, int __pyx_v_channel, PyObject *__pyx_v_inp); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_538ina(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, PyObject *__pyx_v_inp); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_540inb(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, PyObject *__pyx_v_inp); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_542make_locsig(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_degree, double __pyx_v_distance, double __pyx_v_reverb, PyObject *__pyx_v_output, PyObject *__pyx_v_revout, PyObject *__pyx_v_channels, PyObject *__pyx_v_reverb_channels, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_544locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_546is_locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_548locsig_ref(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_550locsig_set(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_552locsig_reverb_ref(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_554locsig_reverb_set(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_556move_locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_degree, double __pyx_v_distance); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_558convolve_files(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file1, PyObject *__pyx_v_file2, double __pyx_v_maxamp, PyObject *__pyx_v_outputfile, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_560make_dcblock(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_562dcblock(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_564make_biquad(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_a1, double __pyx_v_a2, double __pyx_v_b1, double __pyx_v_b2); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_566biquad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_568is_biquad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_570make_biquad_notch(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_radius); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_572make_biquad_low_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_574make_biquad_high_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_576make_biquad_band_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_578make_biquad_band_reject(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_580make_biquad_all_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_582biquad_set_resonance(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fc, double __pyx_v_radius, int __pyx_v_normalize); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_584biquad_set_equal_gain_zeroes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_586convert_frequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */
static int __pyx_pf_8pysndlib_3clm_16array_readin_gen___init__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_start, PyObject *__pyx_v_direction); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_11mus_channel___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location_2__set__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static int __pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment_2__set__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_10mus_length___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_2__call__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_4__reduce_cython__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_6__setstate_cython__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_588make_array_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_start, PyObject *__pyx_v_direction); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_590array_readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_592is_array_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_594clamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_596_clip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_598_wrap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_12array_reader_reader(PyObject *__pyx_self, PyObject *__pyx_v_direction); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_12array_reader_2reader(PyObject *__pyx_self, PyObject *__pyx_v_direction); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_600array_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_loop); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_602sndplay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_10clm_reverb_call(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_604clm_reverb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_631__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_606array_resample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_new_length, PyObject *__pyx_v_interp_type); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_608phase_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_610impulse_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_613bes_i0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_615bes_j0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_617bes_j1(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_619bes_jn(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_621bes_y0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_623bes_y1(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_625bes_yn(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_627edot_product(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_double_complex __pyx_v_freq, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_8pysndlib_3clm_629__pyx_unpickle_array_readin_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_8pysndlib_3clm_mus_any(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm_mus_any_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm_array_readin_gen(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_1_make_src(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_5_array_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0};
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_5numpy_dtype;
  PyTypeObject *__pyx_ptype_5numpy_flatiter;
  PyTypeObject *__pyx_ptype_5numpy_broadcast;
  PyTypeObject *__pyx_ptype_5numpy_ndarray;
  PyTypeObject *__pyx_ptype_5numpy_generic;
  PyTypeObject *__pyx_ptype_5numpy_number;
  PyTypeObject *__pyx_ptype_5numpy_integer;
  PyTypeObject *__pyx_ptype_5numpy_signedinteger;
  PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
  PyTypeObject *__pyx_ptype_5numpy_inexact;
  PyTypeObject *__pyx_ptype_5numpy_floating;
  PyTypeObject *__pyx_ptype_5numpy_complexfloating;
  PyTypeObject *__pyx_ptype_5numpy_flexible;
  PyTypeObject *__pyx_ptype_5numpy_character;
  PyTypeObject *__pyx_ptype_5numpy_ufunc;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  PyObject *__pyx_type_8pysndlib_3clm_mus_any;
  PyObject *__pyx_type_8pysndlib_3clm_mus_any_array;
  PyObject *__pyx_type_8pysndlib_3clm_array_readin_gen;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb;
  PyObject *__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator;
  PyObject *__Pyx_EnumMeta;
  PyObject *__pyx_type___pyx_array;
  PyObject *__pyx_type___pyx_MemviewEnum;
  PyObject *__pyx_type___pyx_memoryview;
  PyObject *__pyx_type___pyx_memoryviewslice;
  #endif
  PyTypeObject *__pyx_ptype_8pysndlib_3clm_mus_any;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm_mus_any_array;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm_array_readin_gen;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb;
  PyTypeObject *__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator;
  PyTypeObject *__pyx_ptype___Pyx_EnumMeta;
  PyTypeObject *__pyx_array_type;
  PyTypeObject *__pyx_MemviewEnum_type;
  PyTypeObject *__pyx_memoryview_type;
  PyTypeObject *__pyx_memoryviewslice_type;
  PyObject *__pyx_kp_u_;
  PyObject *__pyx_kp_u_0_8f;
  PyObject *__pyx_n_s_ADC;
  PyObject *__pyx_n_s_ADF;
  PyObject *__pyx_n_s_AIFC;
  PyObject *__pyx_n_s_AIFF;
  PyObject *__pyx_n_s_AKAI4;
  PyObject *__pyx_n_s_ALAW;
  PyObject *__pyx_n_s_ALL_PASS;
  PyObject *__pyx_n_s_ASCII;
  PyObject *__pyx_n_s_ASF;
  PyObject *__pyx_n_s_AVI;
  PyObject *__pyx_n_s_AVR;
  PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
  PyObject *__pyx_n_s_AssertionError;
  PyObject *__pyx_n_s_B24INT;
  PyObject *__pyx_n_s_BARTLETT;
  PyObject *__pyx_n_s_BARTLETT_HANN;
  PyObject *__pyx_n_s_BDOUBLE;
  PyObject *__pyx_n_s_BDOUBLE_UNSCALED;
  PyObject *__pyx_n_s_BEZIER;
  PyObject *__pyx_n_s_BFLOAT;
  PyObject *__pyx_n_s_BFLOAT_UNSCALED;
  PyObject *__pyx_n_s_BICSF;
  PyObject *__pyx_n_s_BINT;
  PyObject *__pyx_n_s_BINTN;
  PyObject *__pyx_n_s_BLACKMAN10;
  PyObject *__pyx_n_s_BLACKMAN2;
  PyObject *__pyx_n_s_BLACKMAN3;
  PyObject *__pyx_n_s_BLACKMAN4;
  PyObject *__pyx_n_s_BLACKMAN5;
  PyObject *__pyx_n_s_BLACKMAN6;
  PyObject *__pyx_n_s_BLACKMAN7;
  PyObject *__pyx_n_s_BLACKMAN8;
  PyObject *__pyx_n_s_BLACKMAN9;
  PyObject *__pyx_n_s_BOHMAN;
  PyObject *__pyx_n_s_BOTH_KINDS;
  PyObject *__pyx_n_s_BSHORT;
  PyObject *__pyx_n_s_BYTE;
  PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
  PyObject *__pyx_n_s_CAFF;
  PyObject *__pyx_n_s_CAUCHY;
  PyObject *__pyx_n_s_CFUNCTYPE;
  PyObject *__pyx_n_s_COMDISCO;
  PyObject *__pyx_n_s_CONNES;
  PyObject *__pyx_n_s_COVOX;
  PyObject *__pyx_n_s_CSL;
  PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
  PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
  PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
  PyObject *__pyx_kp_u_Cannot_index_with_type;
  PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
  PyObject *__pyx_n_s_DEFAULT_FILE_NAME;
  PyObject *__pyx_n_s_DEFAULT_FILE_PLAYER;
  PyObject *__pyx_n_s_DEFAULT_OUTPUT_CHANS;
  PyObject *__pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE;
  PyObject *__pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE;
  PyObject *__pyx_n_s_DEFAULT_OUTPUT_SRATE;
  PyObject *__pyx_n_s_DELUSION;
  PyObject *__pyx_n_s_DIAMONDWARE;
  PyObject *__pyx_n_s_DIGIPLAYER;
  PyObject *__pyx_n_s_DOLPH_CHEBYSHEV;
  PyObject *__pyx_n_s_DPSS;
  PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
  PyObject *__pyx_n_s_EITHER_KIND;
  PyObject *__pyx_n_s_ESPS;
  PyObject *__pyx_n_s_EXPONENTIAL;
  PyObject *__pyx_n_s_Ellipsis;
  PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
  PyObject *__pyx_n_s_EnumBase;
  PyObject *__pyx_n_s_EnumType;
  PyObject *__pyx_n_s_FARANDOLE;
  PyObject *__pyx_n_s_FILE_SAMP;
  PyObject *__pyx_n_s_FIRST_KIND;
  PyObject *__pyx_n_s_FLAC;
  PyObject *__pyx_n_s_FLAT_TOP;
  PyObject *__pyx_n_s_FileNotFoundError;
  PyObject *__pyx_kp_u_Filter_needs_values_for_a0_a1_a2;
  PyObject *__pyx_kp_u_Filter_needs_values_for_a0_b1_b2;
  PyObject *__pyx_n_s_GAUSSIAN;
  PyObject *__pyx_n_s_GOLDWAVE;
  PyObject *__pyx_n_s_GRAVIS;
  PyObject *__pyx_n_s_GeneratorType;
  PyObject *__pyx_n_s_HAMMING;
  PyObject *__pyx_n_s_HANN;
  PyObject *__pyx_n_s_HANN_POISSON;
  PyObject *__pyx_n_s_HCOM;
  PyObject *__pyx_n_s_HERMITE;
  PyObject *__pyx_n_s_Header;
  PyObject *__pyx_n_s_IEEE;
  PyObject *__pyx_n_s_IMPULSETRACKER;
  PyObject *__pyx_n_s_INRS;
  PyObject *__pyx_n_s_IN_DB;
  PyObject *__pyx_n_s_IRCAM;
  PyObject *__pyx_kp_u_If_not_specifying_coeffs_must_pr;
  PyObject *__pyx_n_s_ImportError;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3;
  PyObject *__pyx_n_s_IndexError;
  PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
  PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
  PyObject *__pyx_n_s_IntEnum;
  PyObject *__pyx_n_s_IntFlag;
  PyObject *__pyx_n_s_Interp;
  PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
  PyObject *__pyx_kp_u_Invalid_shape_in_axis;
  PyObject *__pyx_n_s_KAISER;
  PyObject *__pyx_n_s_KORG;
  PyObject *__pyx_n_s_KURZWEIL_2000;
  PyObject *__pyx_n_s_KeyError;
  PyObject *__pyx_n_s_L24INT;
  PyObject *__pyx_n_s_LAGRANGE;
  PyObject *__pyx_n_s_LDOUBLE;
  PyObject *__pyx_n_s_LDOUBLE_UNSCALED;
  PyObject *__pyx_n_s_LFLOAT;
  PyObject *__pyx_n_s_LFLOAT_UNSCALED;
  PyObject *__pyx_n_s_LINEAR;
  PyObject *__pyx_n_s_LINT;
  PyObject *__pyx_n_s_LINTN;
  PyObject *__pyx_n_s_LSHORT;
  PyObject *__pyx_n_s_MATLAB;
  PyObject *__pyx_n_s_MAUD;
  PyObject *__pyx_n_s_MAUI;
  PyObject *__pyx_n_s_MIDI;
  PyObject *__pyx_n_s_MIDI_SAMPLE_DUMP;
  PyObject *__pyx_n_s_MLT_SINE;
  PyObject *__pyx_n_s_MPEG;
  PyObject *__pyx_n_s_MULAW;
  PyObject *__pyx_n_s_MUS10;
  PyObject *__pyx_n_s_MemoryError;
  PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
  PyObject *__pyx_kp_s_MemoryView_of_r_object;
  PyObject *__pyx_n_s_NEXT;
  PyObject *__pyx_n_s_NIST;
  PyObject *__pyx_n_s_NONE;
  PyObject *__pyx_n_s_NORMALIZED;
  PyObject *__pyx_n_s_NUM_HEADERS;
  PyObject *__pyx_n_s_NUM_SAMPLES;
  PyObject *__pyx_n_s_NVF;
  PyObject *__pyx_kp_u_None;
  PyObject *__pyx_n_b_O;
  PyObject *__pyx_n_s_OGG;
  PyObject *__pyx_n_s_OMF;
  PyObject *__pyx_kp_s_Optional_float;
  PyObject *__pyx_kp_s_Optional_int;
  PyObject *__pyx_n_s_OrderedDict;
  PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
  PyObject *__pyx_n_s_PAF;
  PyObject *__pyx_n_s_PAPOULIS;
  PyObject *__pyx_n_s_PARZEN;
  PyObject *__pyx_n_s_POISSON;
  PyObject *__pyx_n_s_PSION;
  PyObject *__pyx_n_s_PVF;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_n_s_Polynomial;
  PyObject *__pyx_n_s_Pyx_EnumBase;
  PyObject *__pyx_n_s_Pyx_EnumBase___new;
  PyObject *__pyx_n_s_Pyx_EnumBase___repr;
  PyObject *__pyx_n_s_Pyx_EnumBase___str;
  PyObject *__pyx_n_s_Pyx_EnumMeta___reduce_cython;
  PyObject *__pyx_n_s_Pyx_EnumMeta___setstate_cython;
  PyObject *__pyx_n_s_Pyx_FlagBase;
  PyObject *__pyx_n_s_Pyx_FlagBase___new;
  PyObject *__pyx_n_s_Pyx_FlagBase___repr;
  PyObject *__pyx_n_s_Pyx_FlagBase___str;
  PyObject *__pyx_n_s_QUICKTIME;
  PyObject *__pyx_n_s_RAW;
  PyObject *__pyx_n_s_RECTANGULAR;
  PyObject *__pyx_n_s_RF64;
  PyObject *__pyx_n_s_RIEMANN;
  PyObject *__pyx_n_s_RIFF;
  PyObject *__pyx_n_s_RV2;
  PyObject *__pyx_n_s_RV3;
  PyObject *__pyx_n_s_RV4;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_n_s_SAMARAKI;
  PyObject *__pyx_n_s_SAMPLE_DUMP;
  PyObject *__pyx_n_s_SBSTUDIOII;
  PyObject *__pyx_n_s_SD1;
  PyObject *__pyx_n_s_SDIF;
  PyObject *__pyx_n_s_SECOND_KIND;
  PyObject *__pyx_n_s_SHORTEN;
  PyObject *__pyx_n_s_SINC;
  PyObject *__pyx_n_s_SINUSOIDAL;
  PyObject *__pyx_n_s_SMP;
  PyObject *__pyx_n_s_SNDLibError;
  PyObject *__pyx_n_s_SNDLibError____init;
  PyObject *__pyx_n_s_SNDT;
  PyObject *__pyx_n_s_SOUNDFONT;
  PyObject *__pyx_n_s_SOUNDFORGE;
  PyObject *__pyx_n_s_SOX;
  PyObject *__pyx_n_s_SPEEX;
  PyObject *__pyx_n_s_SPPACK;
  PyObject *__pyx_n_s_SRFS;
  PyObject *__pyx_n_s_SVX;
  PyObject *__pyx_n_s_Sample;
  PyObject *__pyx_n_s_Sequence;
  PyObject *__pyx_n_s_SimpleNamespace;
  PyObject *__pyx_n_s_Sound;
  PyObject *__pyx_n_s_Sound___enter;
  PyObject *__pyx_n_s_Sound___exit;
  PyObject *__pyx_n_s_Sound___init;
  PyObject *__pyx_n_s_Spectrum;
  PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
  PyObject *__pyx_n_s_TTA;
  PyObject *__pyx_n_s_TUKEY;
  PyObject *__pyx_n_s_TWINVQ;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_s_UBSHORT;
  PyObject *__pyx_n_s_UBYTE;
  PyObject *__pyx_n_s_ULSHORT;
  PyObject *__pyx_n_s_ULTRASPHERICAL;
  PyObject *__pyx_n_s_ULTRATRACKER;
  PyObject *__pyx_n_s_UNKNOWN_HEADER;
  PyObject *__pyx_n_s_UNKNOWN_SAMPLE;
  PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
  PyObject *__pyx_kp_s_Unknown_enum_value_s;
  PyObject *__pyx_n_s_VOC;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_View_MemoryView;
  PyObject *__pyx_n_s_WAVPACK;
  PyObject *__pyx_n_s_WELCH;
  PyObject *__pyx_n_s_Window;
  PyObject *__pyx_n_s_YAMAHA_SY85;
  PyObject *__pyx_n_s_YAMAHA_SY99;
  PyObject *__pyx_n_s_YAMAHA_TX16W;
  PyObject *__pyx_kp_u__13;
  PyObject *__pyx_n_s__137;
  PyObject *__pyx_kp_u__14;
  PyObject *__pyx_kp_u__15;
  PyObject *__pyx_kp_u__17;
  PyObject *__pyx_kp_u__18;
  PyObject *__pyx_kp_u__19;
  PyObject *__pyx_n_s__2;
  PyObject *__pyx_kp_s__3;
  PyObject *__pyx_kp_u__3;
  PyObject *__pyx_kp_u__5;
  PyObject *__pyx_kp_u__62;
  PyObject *__pyx_n_s__630;
  PyObject *__pyx_kp_u__8;
  PyObject *__pyx_kp_u__9;
  PyObject *__pyx_n_s_a0;
  PyObject *__pyx_n_s_a1;
  PyObject *__pyx_kp_u_a1_2;
  PyObject *__pyx_kp_u_a2;
  PyObject *__pyx_n_s_a2_2;
  PyObject *__pyx_kp_u_a_valid_envelope_can_only_contai;
  PyObject *__pyx_kp_u_a_valid_envelope_needs_at_least;
  PyObject *__pyx_kp_u_a_valid_envelope_needs_even_numb;
  PyObject *__pyx_n_s_abc;
  PyObject *__pyx_n_s_abs;
  PyObject *__pyx_n_s_addressof;
  PyObject *__pyx_n_u_afplay;
  PyObject *__pyx_n_s_all;
  PyObject *__pyx_n_s_all_pass;
  PyObject *__pyx_n_s_all_pass_bank;
  PyObject *__pyx_n_s_all_passes;
  PyObject *__pyx_n_s_allocate_buffer;
  PyObject *__pyx_kp_u_allpass_list_contains_at_least_o;
  PyObject *__pyx_n_s_alpha;
  PyObject *__pyx_n_s_amax;
  PyObject *__pyx_n_s_amplitude;
  PyObject *__pyx_n_s_amplitude_modulate;
  PyObject *__pyx_n_s_amps;
  PyObject *__pyx_n_s_analyze;
  PyObject *__pyx_n_s_analyze_f;
  PyObject *__pyx_n_s_analyzecallback;
  PyObject *__pyx_kp_u_and;
  PyObject *__pyx_n_s_any;
  PyObject *__pyx_n_u_aplay;
  PyObject *__pyx_n_s_arange;
  PyObject *__pyx_n_s_arg;
  PyObject *__pyx_n_s_arg1;
  PyObject *__pyx_n_s_arg2;
  PyObject *__pyx_n_s_argmax;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_arr;
  PyObject *__pyx_n_s_arr1;
  PyObject *__pyx_n_s_arr2;
  PyObject *__pyx_n_s_array;
  PyObject *__pyx_kp_u_array_has;
  PyObject *__pyx_n_s_array_interp;
  PyObject *__pyx_n_s_array_reader;
  PyObject *__pyx_n_s_array_reader_locals_reader;
  PyObject *__pyx_n_s_array_readin;
  PyObject *__pyx_n_s_array_readin_gen;
  PyObject *__pyx_n_s_array_readin_gen___reduce_cython;
  PyObject *__pyx_n_s_array_readin_gen___setstate_cyth;
  PyObject *__pyx_n_s_array_resample;
  PyObject *__pyx_n_s_asarray;
  PyObject *__pyx_kp_u_asked_for;
  PyObject *__pyx_n_s_asymmetric_fm;
  PyObject *__pyx_n_s_asymmetric_fm_unmodulated;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_atan2;
  PyObject *__pyx_n_s_autocorrelate;
  PyObject *__pyx_n_s_b1;
  PyObject *__pyx_kp_u_b1_2;
  PyObject *__pyx_kp_u_b2;
  PyObject *__pyx_n_s_b2_2;
  PyObject *__pyx_n_s_base;
  PyObject *__pyx_kp_u_before_scaling;
  PyObject *__pyx_n_s_beg;
  PyObject *__pyx_n_s_bes_i0;
  PyObject *__pyx_n_s_bes_j0;
  PyObject *__pyx_n_s_bes_j1;
  PyObject *__pyx_n_s_bes_jn;
  PyObject *__pyx_n_s_bes_y0;
  PyObject *__pyx_n_s_bes_y1;
  PyObject *__pyx_n_s_bes_yn;
  PyObject *__pyx_n_s_bessi0;
  PyObject *__pyx_n_s_beta;
  PyObject *__pyx_n_s_biquad;
  PyObject *__pyx_n_s_biquad_set_equal_gain_zeroes;
  PyObject *__pyx_n_s_biquad_set_resonance;
  PyObject *__pyx_n_s_buffer_size;
  PyObject *__pyx_n_u_buffer_size;
  PyObject *__pyx_n_s_builtins;
  PyObject *__pyx_n_s_c;
  PyObject *__pyx_n_u_c;
  PyObject *__pyx_n_s_c_bool;
  PyObject *__pyx_n_s_c_double;
  PyObject *__pyx_n_s_c_int;
  PyObject *__pyx_n_s_c_longlong;
  PyObject *__pyx_n_s_c_void_p;
  PyObject *__pyx_n_s_cache_append;
  PyObject *__pyx_n_s_cache_extend;
  PyObject *__pyx_n_s_call;
  PyObject *__pyx_kp_u_cannot_be_converted_to_a_mus_fl;
  PyObject *__pyx_n_s_cepstrum;
  PyObject *__pyx_n_s_chan;
  PyObject *__pyx_n_u_chan;
  PyObject *__pyx_n_s_channel;
  PyObject *__pyx_n_s_channels;
  PyObject *__pyx_kp_u_channels_2;
  PyObject *__pyx_kp_u_channels_but;
  PyObject *__pyx_n_s_chans;
  PyObject *__pyx_n_s_chebyshev_t_sum;
  PyObject *__pyx_n_s_chebyshev_tu_sum;
  PyObject *__pyx_n_s_chebyshev_u_sum;
  PyObject *__pyx_n_s_check_ndim;
  PyObject *__pyx_n_s_check_range;
  PyObject *__pyx_n_s_clamp;
  PyObject *__pyx_n_s_class;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_clip;
  PyObject *__pyx_n_s_clipped;
  PyObject *__pyx_n_s_clm_reverb;
  PyObject *__pyx_n_s_clm_reverb_locals_call;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_cls;
  PyObject *__pyx_n_s_coeff;
  PyObject *__pyx_n_s_coeffs;
  PyObject *__pyx_n_s_collections;
  PyObject *__pyx_kp_s_collections_abc;
  PyObject *__pyx_n_s_comb;
  PyObject *__pyx_n_s_comb_bank;
  PyObject *__pyx_n_s_combs;
  PyObject *__pyx_n_s_comment;
  PyObject *__pyx_n_s_compare_shapes;
  PyObject *__pyx_kp_u_compute_ratio;
  PyObject *__pyx_kp_u_compute_time;
  PyObject *__pyx_n_s_connection_function;
  PyObject *__pyx_kp_s_context_manager_which_handles_c;
  PyObject *__pyx_kp_s_contiguous_and_direct;
  PyObject *__pyx_kp_s_contiguous_and_indirect;
  PyObject *__pyx_n_s_continue_frample2file;
  PyObject *__pyx_n_s_continue_old_file;
  PyObject *__pyx_n_s_continue_sample2file;
  PyObject *__pyx_n_s_contrast_enhancement;
  PyObject *__pyx_n_s_convert_frequency;
  PyObject *__pyx_n_s_convolution;
  PyObject *__pyx_n_s_convolve;
  PyObject *__pyx_n_s_convolve_files;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_copyto;
  PyObject *__pyx_n_s_correlate;
  PyObject *__pyx_n_s_cos;
  PyObject *__pyx_kp_u_count;
  PyObject *__pyx_n_s_count_2;
  PyObject *__pyx_n_s_ctypes;
  PyObject *__pyx_n_s_cy_analyze_f_ptr;
  PyObject *__pyx_n_s_cy_edit_f_ptr;
  PyObject *__pyx_n_s_cy_inp_f_ptr;
  PyObject *__pyx_n_s_cy_input_f_ptr;
  PyObject *__pyx_n_s_cy_synthesize_f_ptr;
  PyObject *__pyx_n_s_d;
  PyObject *__pyx_n_u_d;
  PyObject *__pyx_n_u_darwin;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_data1;
  PyObject *__pyx_n_s_data2;
  PyObject *__pyx_n_s_db2linear;
  PyObject *__pyx_n_s_dcblock;
  PyObject *__pyx_n_s_dct;
  PyObject *__pyx_n_s_default;
  PyObject *__pyx_n_s_degree;
  PyObject *__pyx_n_s_degrees;
  PyObject *__pyx_n_s_degrees2radians;
  PyObject *__pyx_n_s_delay;
  PyObject *__pyx_n_s_delay_tick;
  PyObject *__pyx_n_s_delay_unmodulated;
  PyObject *__pyx_n_s_delete_reverb;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_s_dim;
  PyObject *__pyx_kp_u_dimemsions_but_received;
  PyObject *__pyx_n_s_direction;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_distance;
  PyObject *__pyx_n_s_distribution;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_kp_u_does_not_exist;
  PyObject *__pyx_n_s_dot_product;
  PyObject *__pyx_n_s_double;
  PyObject *__pyx_n_s_dtype;
  PyObject *__pyx_n_s_dtype_is_object;
  PyObject *__pyx_kp_u_duration;
  PyObject *__pyx_n_s_duration_2;
  PyObject *__pyx_n_u_duration_2;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_edit;
  PyObject *__pyx_n_s_edit_f;
  PyObject *__pyx_n_s_editcallback;
  PyObject *__pyx_n_s_edot_product;
  PyObject *__pyx_n_s_empty;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_encode;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_enum;
  PyObject *__pyx_kp_u_enum_class_Header_not_importable;
  PyObject *__pyx_kp_u_enum_class_Sample_not_importable;
  PyObject *__pyx_n_s_enumerate;
  PyObject *__pyx_n_s_env;
  PyObject *__pyx_n_s_env_any;
  PyObject *__pyx_n_s_env_interp;
  PyObject *__pyx_n_s_env_rates;
  PyObject *__pyx_n_s_envelope;
  PyObject *__pyx_n_s_envelope_interp;
  PyObject *__pyx_n_s_envfunction;
  PyObject *__pyx_n_s_error;
  PyObject *__pyx_n_s_even_multiple;
  PyObject *__pyx_n_s_even_weight;
  PyObject *__pyx_n_s_exists;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_exp;
  PyObject *__pyx_n_s_expanduser;
  PyObject *__pyx_n_s_expansion;
  PyObject *__pyx_kp_u_expecting;
  PyObject *__pyx_n_s_fabs;
  PyObject *__pyx_n_s_fc;
  PyObject *__pyx_n_s_fcombs;
  PyObject *__pyx_n_s_feedback;
  PyObject *__pyx_n_s_feedforward;
  PyObject *__pyx_n_s_fft;
  PyObject *__pyx_n_s_fft_len;
  PyObject *__pyx_n_s_fft_size;
  PyObject *__pyx_kp_u_fft_size_must_be_a_positive_numb;
  PyObject *__pyx_kp_u_fft_size_must_be_a_positive_numb_2;
  PyObject *__pyx_kp_u_fft_size_must_be_power_of_2_not;
  PyObject *__pyx_kp_u_fft_size_too_large_cannot_alloca;
  PyObject *__pyx_n_s_file;
  PyObject *__pyx_n_s_file1;
  PyObject *__pyx_n_s_file2;
  PyObject *__pyx_kp_u_file2frample;
  PyObject *__pyx_n_s_file2frample_2;
  PyObject *__pyx_kp_u_file2ndarray;
  PyObject *__pyx_n_s_file2ndarray_2;
  PyObject *__pyx_kp_u_file2sample;
  PyObject *__pyx_n_s_file2sample_2;
  PyObject *__pyx_n_s_file_name;
  PyObject *__pyx_n_s_filename;
  PyObject *__pyx_n_s_fill;
  PyObject *__pyx_n_s_filt;
  PyObject *__pyx_n_s_filt_view;
  PyObject *__pyx_n_s_filter;
  PyObject *__pyx_kp_u_filter_list_contains_at_least_on;
  PyObject *__pyx_kp_u_filter_list_contains_at_least_on_2;
  PyObject *__pyx_n_s_filter_size;
  PyObject *__pyx_n_s_filtered_comb;
  PyObject *__pyx_n_s_filtered_comb_bank;
  PyObject *__pyx_n_s_filtered_comb_unmodulated;
  PyObject *__pyx_n_s_filters;
  PyObject *__pyx_n_s_finalize;
  PyObject *__pyx_n_s_fir_filter;
  PyObject *__pyx_n_s_firmant;
  PyObject *__pyx_n_s_flags;
  PyObject *__pyx_n_s_fm;
  PyObject *__pyx_n_s_fm_index;
  PyObject *__pyx_n_s_fmod;
  PyObject *__pyx_n_s_fn;
  PyObject *__pyx_n_s_formant;
  PyObject *__pyx_n_s_formant_bank;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_fortran;
  PyObject *__pyx_n_u_fortran;
  PyObject *__pyx_n_s_frample2file;
  PyObject *__pyx_n_s_freq;
  PyObject *__pyx_n_s_freqs;
  PyObject *__pyx_n_s_frequency;
  PyObject *__pyx_n_u_frequency;
  PyObject *__pyx_n_s_func;
  PyObject *__pyx_n_s_functools;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_gen;
  PyObject *__pyx_n_s_genexpr;
  PyObject *__pyx_n_s_gens;
  PyObject *__pyx_n_s_get;
  PyObject *__pyx_n_s_get_channels;
  PyObject *__pyx_n_s_get_framples;
  PyObject *__pyx_n_s_get_length;
  PyObject *__pyx_n_s_get_srate;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_gettempdir;
  PyObject *__pyx_kp_u_got;
  PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
  PyObject *__pyx_n_s_granulate;
  PyObject *__pyx_n_s_harms;
  PyObject *__pyx_kp_u_has_no_meaningful_channels;
  PyObject *__pyx_kp_u_has_no_meaningful_framples;
  PyObject *__pyx_kp_u_has_no_meaningful_length;
  PyObject *__pyx_n_s_header_type;
  PyObject *__pyx_n_s_hi;
  PyObject *__pyx_n_s_high;
  PyObject *__pyx_n_s_hop;
  PyObject *__pyx_n_s_hz;
  PyObject *__pyx_n_s_hz2radians;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_id;
  PyObject *__pyx_n_s_idat;
  PyObject *__pyx_n_s_iir_filter;
  PyObject *__pyx_n_s_imag;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_impulse_generator;
  PyObject *__pyx_n_s_in_any;
  PyObject *__pyx_n_s_ina;
  PyObject *__pyx_n_s_inb;
  PyObject *__pyx_n_s_ind;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_indices;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_init_2;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initial_contents;
  PyObject *__pyx_n_s_initial_element;
  PyObject *__pyx_n_s_initial_phase;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_inp;
  PyObject *__pyx_n_s_inp_f;
  PyObject *__pyx_n_s_input;
  PyObject *__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a;
  PyObject *__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f;
  PyObject *__pyx_n_s_inputcallback;
  PyObject *__pyx_n_s_inputs;
  PyObject *__pyx_n_s_insig;
  PyObject *__pyx_n_s_int;
  PyObject *__pyx_n_s_int64;
  PyObject *__pyx_n_s_interp;
  PyObject *__pyx_n_s_interp_type;
  PyObject *__pyx_n_s_is_all_pass;
  PyObject *__pyx_n_s_is_all_pass_bank;
  PyObject *__pyx_n_s_is_array_readin;
  PyObject *__pyx_n_s_is_asymmetric_fm;
  PyObject *__pyx_n_s_is_biquad;
  PyObject *__pyx_n_s_is_comb;
  PyObject *__pyx_n_s_is_comb_bank;
  PyObject *__pyx_n_s_is_convolve;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_n_s_is_delay;
  PyObject *__pyx_n_s_is_env;
  PyObject *__pyx_n_s_is_even;
  PyObject *__pyx_n_s_is_file2frample;
  PyObject *__pyx_n_s_is_file2sample;
  PyObject *__pyx_n_s_is_filter;
  PyObject *__pyx_n_s_is_filtered_comb;
  PyObject *__pyx_n_s_is_filtered_comb_bank;
  PyObject *__pyx_n_s_is_fir_filter;
  PyObject *__pyx_n_s_is_firmant;
  PyObject *__pyx_n_s_is_formant;
  PyObject *__pyx_n_s_is_formant_bank;
  PyObject *__pyx_n_s_is_frample2file;
  PyObject *__pyx_n_s_is_granulate;
  PyObject *__pyx_n_s_is_iir_filter;
  PyObject *__pyx_n_s_is_list_or_ndarray;
  PyObject *__pyx_n_s_is_locsig;
  PyObject *__pyx_n_s_is_moving_average;
  PyObject *__pyx_n_s_is_moving_max;
  PyObject *__pyx_n_s_is_moving_norm;
  PyObject *__pyx_n_s_is_ncos;
  PyObject *__pyx_n_s_is_notch;
  PyObject *__pyx_n_s_is_nrxycos;
  PyObject *__pyx_n_s_is_nrxysin;
  PyObject *__pyx_n_s_is_nsin;
  PyObject *__pyx_n_s_is_number;
  PyObject *__pyx_n_s_is_odd;
  PyObject *__pyx_n_s_is_one_pole;
  PyObject *__pyx_n_s_is_one_pole_all_pass;
  PyObject *__pyx_n_s_is_one_zero;
  PyObject *__pyx_n_s_is_oscil;
  PyObject *__pyx_n_s_is_oscil_bank;
  PyObject *__pyx_kp_u_is_out_of_range;
  PyObject *__pyx_n_s_is_phase_vocoder;
  PyObject *__pyx_n_s_is_polyshape;
  PyObject *__pyx_n_s_is_polywave;
  PyObject *__pyx_n_s_is_power_of_2;
  PyObject *__pyx_n_s_is_pulse_train;
  PyObject *__pyx_n_s_is_pulsed_env;
  PyObject *__pyx_n_s_is_rand;
  PyObject *__pyx_n_s_is_rand_interp;
  PyObject *__pyx_n_s_is_readin;
  PyObject *__pyx_n_s_is_rxykcos;
  PyObject *__pyx_n_s_is_rxyksin;
  PyObject *__pyx_n_s_is_sample2file;
  PyObject *__pyx_n_s_is_sawtooth_wave;
  PyObject *__pyx_n_s_is_square_wave;
  PyObject *__pyx_n_s_is_src;
  PyObject *__pyx_n_s_is_ssb_am;
  PyObject *__pyx_n_s_is_table_lookup;
  PyObject *__pyx_n_s_is_tap;
  PyObject *__pyx_n_s_is_triangle_wave;
  PyObject *__pyx_n_s_is_two_pole;
  PyObject *__pyx_n_s_is_two_zero;
  PyObject *__pyx_n_s_is_wave_train;
  PyObject *__pyx_n_s_is_zero;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_isfile;
  PyObject *__pyx_n_s_itemsize;
  PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
  PyObject *__pyx_n_s_jitter;
  PyObject *__pyx_n_s_kind;
  PyObject *__pyx_n_s_kwargs;
  PyObject *__pyx_n_s_length;
  PyObject *__pyx_kp_u_length_2;
  PyObject *__pyx_n_s_linear2db;
  PyObject *__pyx_n_s_linspace;
  PyObject *__pyx_n_u_linux;
  PyObject *__pyx_n_s_list;
  PyObject *__pyx_n_s_lo;
  PyObject *__pyx_n_s_loc;
  PyObject *__pyx_n_s_locsig;
  PyObject *__pyx_n_s_locsig_ref;
  PyObject *__pyx_n_s_locsig_reverb_ref;
  PyObject *__pyx_n_s_locsig_reverb_set;
  PyObject *__pyx_n_s_locsig_set;
  PyObject *__pyx_n_s_locsig_type;
  PyObject *__pyx_n_s_locsigdetourcallback;
  PyObject *__pyx_n_s_log;
  PyObject *__pyx_n_s_loop;
  PyObject *__pyx_n_s_low;
  PyObject *__pyx_n_s_mabs;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_make_all_pass;
  PyObject *__pyx_n_s_make_all_pass_bank;
  PyObject *__pyx_n_s_make_array_readin;
  PyObject *__pyx_n_s_make_asymmetric_fm;
  PyObject *__pyx_n_s_make_biquad;
  PyObject *__pyx_n_s_make_biquad_all_pass;
  PyObject *__pyx_n_s_make_biquad_band_pass;
  PyObject *__pyx_n_s_make_biquad_band_reject;
  PyObject *__pyx_n_s_make_biquad_high_pass;
  PyObject *__pyx_n_s_make_biquad_low_pass;
  PyObject *__pyx_n_s_make_biquad_notch;
  PyObject *__pyx_n_s_make_comb;
  PyObject *__pyx_n_s_make_comb_bank;
  PyObject *__pyx_n_s_make_convolve;
  PyObject *__pyx_n_s_make_convolve_locals_inp_f;
  PyObject *__pyx_n_s_make_dcblock;
  PyObject *__pyx_n_s_make_delay;
  PyObject *__pyx_n_s_make_env;
  PyObject *__pyx_n_s_make_fft_window;
  PyObject *__pyx_n_s_make_file2frample;
  PyObject *__pyx_n_s_make_file2sample;
  PyObject *__pyx_n_s_make_filter;
  PyObject *__pyx_n_s_make_filtered_comb;
  PyObject *__pyx_n_s_make_filtered_comb_bank;
  PyObject *__pyx_n_s_make_fir_coeffs;
  PyObject *__pyx_n_s_make_fir_filter;
  PyObject *__pyx_n_s_make_firmant;
  PyObject *__pyx_n_s_make_formant;
  PyObject *__pyx_n_s_make_formant_bank;
  PyObject *__pyx_n_s_make_frample2file;
  PyObject *__pyx_n_s_make_granulate;
  PyObject *__pyx_n_s_make_granulate_locals_edit_f;
  PyObject *__pyx_n_s_make_granulate_locals_inp_f;
  PyObject *__pyx_n_s_make_iir_filter;
  PyObject *__pyx_n_s_make_locsig;
  PyObject *__pyx_n_s_make_moving_average;
  PyObject *__pyx_n_s_make_moving_max;
  PyObject *__pyx_n_s_make_moving_norm;
  PyObject *__pyx_n_s_make_ncos;
  PyObject *__pyx_n_s_make_notch;
  PyObject *__pyx_n_s_make_nrxycos;
  PyObject *__pyx_n_s_make_nrxysin;
  PyObject *__pyx_n_s_make_nsin;
  PyObject *__pyx_n_s_make_one_pole;
  PyObject *__pyx_n_s_make_one_pole_all_pass;
  PyObject *__pyx_n_s_make_one_zero;
  PyObject *__pyx_n_s_make_oscil;
  PyObject *__pyx_n_s_make_oscil_bank;
  PyObject *__pyx_n_s_make_phase_vocoder;
  PyObject *__pyx_n_s_make_phase_vocoder_locals_analyz;
  PyObject *__pyx_n_s_make_phase_vocoder_locals_edit_f;
  PyObject *__pyx_n_s_make_phase_vocoder_locals_inp_f;
  PyObject *__pyx_n_s_make_phase_vocoder_locals_synthe;
  PyObject *__pyx_n_s_make_polyshape;
  PyObject *__pyx_n_s_make_polywave;
  PyObject *__pyx_n_s_make_pulse_train;
  PyObject *__pyx_n_s_make_pulsed_env;
  PyObject *__pyx_n_s_make_rand;
  PyObject *__pyx_n_s_make_rand_interp;
  PyObject *__pyx_n_s_make_readin;
  PyObject *__pyx_n_s_make_rxykcos;
  PyObject *__pyx_n_s_make_rxyksin;
  PyObject *__pyx_n_s_make_sample2file;
  PyObject *__pyx_n_s_make_sawtooth_wave;
  PyObject *__pyx_n_s_make_square_wave;
  PyObject *__pyx_n_s_make_src;
  PyObject *__pyx_n_s_make_src_locals_inp_f;
  PyObject *__pyx_n_s_make_ssb_am;
  PyObject *__pyx_n_s_make_table_lookup;
  PyObject *__pyx_n_s_make_table_lookup_with_env;
  PyObject *__pyx_n_s_make_triangle_wave;
  PyObject *__pyx_n_s_make_two_pole;
  PyObject *__pyx_n_s_make_two_zero;
  PyObject *__pyx_n_s_make_wave_train;
  PyObject *__pyx_n_s_make_wave_train_with_env;
  PyObject *__pyx_kp_s_many_useful_windows;
  PyObject *__pyx_n_s_map;
  PyObject *__pyx_n_s_math;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_max_size;
  PyObject *__pyx_kp_u_maxamp;
  PyObject *__pyx_n_s_maxamp_2;
  PyObject *__pyx_n_s_maxamp_result;
  PyObject *__pyx_n_s_member_names;
  PyObject *__pyx_n_s_members;
  PyObject *__pyx_n_s_memview;
  PyObject *__pyx_n_s_message;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_module_2;
  PyObject *__pyx_n_s_move_locsig;
  PyObject *__pyx_n_s_moving_average;
  PyObject *__pyx_n_s_moving_max;
  PyObject *__pyx_n_s_moving_norm;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_mus_any;
  PyObject *__pyx_n_s_mus_any___reduce_cython;
  PyObject *__pyx_n_s_mus_any___setstate_cython;
  PyObject *__pyx_n_s_mus_any_array;
  PyObject *__pyx_n_s_mus_any_array___reduce_cython;
  PyObject *__pyx_n_s_mus_any_array___setstate_cython;
  PyObject *__pyx_n_s_mus_any_cache_append;
  PyObject *__pyx_n_s_mus_any_cache_extend;
  PyObject *__pyx_n_s_mus_any_mus_reset;
  PyObject *__pyx_n_s_mus_any_next;
  PyObject *__pyx_n_s_mus_any_set_up_data;
  PyObject *__pyx_n_s_mus_any_set_up_pv_data;
  PyObject *__pyx_n_s_mus_any_set_up_xcoeffs;
  PyObject *__pyx_n_s_mus_any_set_up_ycoeffs;
  PyObject *__pyx_n_s_mus_autocorrelate;
  PyObject *__pyx_n_s_mus_cepstrum;
  PyObject *__pyx_n_s_mus_channels;
  PyObject *__pyx_n_s_mus_close;
  PyObject *__pyx_n_s_mus_convolution;
  PyObject *__pyx_n_s_mus_correlate;
  PyObject *__pyx_kp_u_mus_data_can_not_be_called_on;
  PyObject *__pyx_n_s_mus_fft;
  PyObject *__pyx_n_s_mus_interpolate;
  PyObject *__pyx_n_s_mus_is_input;
  PyObject *__pyx_n_s_mus_is_output;
  PyObject *__pyx_n_s_mus_length;
  PyObject *__pyx_n_s_mus_order;
  PyObject *__pyx_n_s_mus_polar2rectangular;
  PyObject *__pyx_n_s_mus_rectangular2magnitudes;
  PyObject *__pyx_n_s_mus_rectangular2polar;
  PyObject *__pyx_n_s_mus_reset;
  PyObject *__pyx_n_s_mus_spectrum;
  PyObject *__pyx_n_s_mus_xcoeffs;
  PyObject *__pyx_kp_u_mus_xcoeffs_can_not_be_called_on;
  PyObject *__pyx_n_s_mus_ycoeffs;
  PyObject *__pyx_kp_u_mus_ycoeffs_can_not_be_called_on;
  PyObject *__pyx_n_s_n;
  PyObject *__pyx_n_u_n;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_name_2;
  PyObject *__pyx_n_s_ncos;
  PyObject *__pyx_n_s_ndarray2file;
  PyObject *__pyx_kp_u_ndarray_must_have_1_or_2_dimensi;
  PyObject *__pyx_kp_u_ndarrays_of_unequal_shape;
  PyObject *__pyx_n_s_ndim;
  PyObject *__pyx_n_u_ndim;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_new_length;
  PyObject *__pyx_n_s_next;
  PyObject *__pyx_n_s_next_power_of_2;
  PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  PyObject *__pyx_kp_u_no_player_specified;
  PyObject *__pyx_n_s_norm;
  PyObject *__pyx_n_s_norm_type;
  PyObject *__pyx_n_s_normalize;
  PyObject *__pyx_n_s_normalize_partials;
  PyObject *__pyx_kp_u_not_supported;
  PyObject *__pyx_n_s_notch;
  PyObject *__pyx_n_s_notch_unmodulated;
  PyObject *__pyx_n_s_np;
  PyObject *__pyx_kp_s_npt_NDArray_np_float64;
  PyObject *__pyx_n_s_nrxycos;
  PyObject *__pyx_n_s_nrxysin;
  PyObject *__pyx_n_s_nsin;
  PyObject *__pyx_n_s_num;
  PyObject *__pyx_n_s_number;
  PyObject *__pyx_n_s_numpy;
  PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
  PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
  PyObject *__pyx_n_s_obj;
  PyObject *__pyx_n_s_object;
  PyObject *__pyx_kp_u_object_2;
  PyObject *__pyx_n_s_odd_multiple;
  PyObject *__pyx_n_s_odd_weight;
  PyObject *__pyx_n_s_offset;
  PyObject *__pyx_n_s_old_srate;
  PyObject *__pyx_n_s_omega_t;
  PyObject *__pyx_n_s_one_pole;
  PyObject *__pyx_n_s_one_pole_all_pass;
  PyObject *__pyx_n_s_one_zero;
  PyObject *__pyx_n_s_open;
  PyObject *__pyx_n_s_order;
  PyObject *__pyx_n_s_orig_length;
  PyObject *__pyx_n_s_os;
  PyObject *__pyx_n_s_oscil;
  PyObject *__pyx_n_s_oscil_bank;
  PyObject *__pyx_n_s_oscil_unmodulated;
  PyObject *__pyx_n_s_out_any;
  PyObject *__pyx_n_s_out_bank;
  PyObject *__pyx_n_s_outa;
  PyObject *__pyx_n_s_outb;
  PyObject *__pyx_n_s_outc;
  PyObject *__pyx_n_s_outd;
  PyObject *__pyx_n_s_output;
  PyObject *__pyx_kp_u_output_needs_to_be_a_clm_gen_or;
  PyObject *__pyx_n_s_output_to_file;
  PyObject *__pyx_n_s_outputfile;
  PyObject *__pyx_n_s_overlap;
  PyObject *__pyx_n_s_pack;
  PyObject *__pyx_n_s_parents;
  PyObject *__pyx_n_s_partial;
  PyObject *__pyx_n_s_partials;
  PyObject *__pyx_n_s_partials2polynomial;
  PyObject *__pyx_n_s_partials2wave;
  PyObject *__pyx_n_s_path;
  PyObject *__pyx_n_s_perf_counter;
  PyObject *__pyx_n_s_phase;
  PyObject *__pyx_n_s_phase_delay;
  PyObject *__pyx_n_s_phase_partials2wave;
  PyObject *__pyx_n_s_phase_vocoder;
  PyObject *__pyx_n_s_phase_vocoder_amp_increments;
  PyObject *__pyx_n_s_phase_vocoder_amps;
  PyObject *__pyx_n_s_phase_vocoder_freqs;
  PyObject *__pyx_n_s_phase_vocoder_phase_increments;
  PyObject *__pyx_n_s_phase_vocoder_phases;
  PyObject *__pyx_n_s_phases;
  PyObject *__pyx_n_s_pi;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_pitch;
  PyObject *__pyx_n_s_platform;
  PyObject *__pyx_n_s_play;
  PyObject *__pyx_n_s_player;
  PyObject *__pyx_n_s_pm;
  PyObject *__pyx_n_s_polar2rectangular;
  PyObject *__pyx_n_s_polynomial;
  PyObject *__pyx_n_s_polyshape;
  PyObject *__pyx_n_s_polyshape_unmodulated;
  PyObject *__pyx_n_s_polywave;
  PyObject *__pyx_n_s_polywave_unmodulated;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_print;
  PyObject *__pyx_n_s_pulse_train;
  PyObject *__pyx_n_s_pulse_train_unmodulated;
  PyObject *__pyx_n_s_pulsed_env;
  PyObject *__pyx_n_s_pulsed_env_unmodulated;
  PyObject *__pyx_kp_u_pysndlib;
  PyObject *__pyx_n_s_pysndlib_clm;
  PyObject *__pyx_n_s_pysndlib_sndlib;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_Enum;
  PyObject *__pyx_n_s_pyx_unpickle___Pyx_EnumMeta;
  PyObject *__pyx_n_s_pyx_unpickle_array_readin_gen;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_q;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_r;
  PyObject *__pyx_n_u_r;
  PyObject *__pyx_n_s_radians;
  PyObject *__pyx_n_s_radians2degrees;
  PyObject *__pyx_n_s_radians2hz;
  PyObject *__pyx_n_s_radius;
  PyObject *__pyx_n_s_ramp;
  PyObject *__pyx_n_s_rand;
  PyObject *__pyx_n_s_rand_interp;
  PyObject *__pyx_n_s_rand_interp_unmodulated;
  PyObject *__pyx_n_s_rand_unmodulated;
  PyObject *__pyx_n_s_random;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_ratio;
  PyObject *__pyx_n_s_rdat;
  PyObject *__pyx_n_s_read;
  PyObject *__pyx_n_s_reader;
  PyObject *__pyx_kp_u_readin;
  PyObject *__pyx_n_s_readin_2;
  PyObject *__pyx_n_s_real;
  PyObject *__pyx_n_s_rectangular2magnitudes;
  PyObject *__pyx_n_s_rectangular2polar;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_register;
  PyObject *__pyx_n_s_repr;
  PyObject *__pyx_n_s_res;
  PyObject *__pyx_n_s_reshape;
  PyObject *__pyx_n_s_resize;
  PyObject *__pyx_n_s_reverb;
  PyObject *__pyx_n_s_reverb_channels;
  PyObject *__pyx_n_s_reverb_data;
  PyObject *__pyx_n_s_reverb_file_name;
  PyObject *__pyx_n_s_reverb_to_file;
  PyObject *__pyx_n_s_revfile;
  PyObject *__pyx_kp_u_revmax;
  PyObject *__pyx_n_s_revout;
  PyObject *__pyx_n_s_ring_modulate;
  PyObject *__pyx_n_s_rl1;
  PyObject *__pyx_n_s_rl2;
  PyObject *__pyx_n_s_run;
  PyObject *__pyx_n_s_rxykcos;
  PyObject *__pyx_n_s_rxyksin;
  PyObject *__pyx_n_s_s1;
  PyObject *__pyx_n_s_s2;
  PyObject *__pyx_n_s_s3;
  PyObject *__pyx_kp_s_s_s;
  PyObject *__pyx_kp_s_s_s_d;
  PyObject *__pyx_n_s_samp;
  PyObject *__pyx_n_s_sample2file;
  PyObject *__pyx_n_s_sample_type;
  PyObject *__pyx_kp_u_samples;
  PyObject *__pyx_n_s_samples2seconds;
  PyObject *__pyx_n_s_samples_2;
  PyObject *__pyx_n_s_sawtooth_wave;
  PyObject *__pyx_n_s_scaled_by;
  PyObject *__pyx_n_s_scaled_to;
  PyObject *__pyx_n_s_scaler;
  PyObject *__pyx_kp_u_seconds;
  PyObject *__pyx_n_s_seconds2samples;
  PyObject *__pyx_kp_u_seconds_2;
  PyObject *__pyx_n_s_secs;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_send;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_set_srate;
  PyObject *__pyx_n_s_set_up_data;
  PyObject *__pyx_n_s_set_up_pv_data;
  PyObject *__pyx_n_s_set_up_xcoeffs;
  PyObject *__pyx_n_s_set_up_ycoeffs;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_shape;
  PyObject *__pyx_n_s_sign;
  PyObject *__pyx_n_s_sin;
  PyObject *__pyx_n_s_size;
  PyObject *__pyx_n_u_size;
  PyObject *__pyx_kp_u_size_fft;
  PyObject *__pyx_n_s_sndplay;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_spectrum;
  PyObject *__pyx_n_s_sqrt;
  PyObject *__pyx_n_s_square_wave;
  PyObject *__pyx_n_s_sr;
  PyObject *__pyx_n_s_sr_change;
  PyObject *__pyx_n_s_srate;
  PyObject *__pyx_n_u_srate;
  PyObject *__pyx_n_s_src;
  PyObject *__pyx_kp_s_src_pysndlib_clm_pyx;
  PyObject *__pyx_n_s_ssb_am;
  PyObject *__pyx_n_s_ssb_am_unmodulated;
  PyObject *__pyx_n_s_stable;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_u_start;
  PyObject *__pyx_n_s_startswith;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_statistics;
  PyObject *__pyx_n_s_statstr;
  PyObject *__pyx_n_s_step;
  PyObject *__pyx_n_s_stop;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_n_s_str_2;
  PyObject *__pyx_kp_s_strided_and_direct;
  PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
  PyObject *__pyx_kp_s_strided_and_indirect;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_struct;
  PyObject *__pyx_n_s_subprocess;
  PyObject *__pyx_n_s_sum;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_sweep;
  PyObject *__pyx_n_s_synthesize;
  PyObject *__pyx_n_s_synthesize_f;
  PyObject *__pyx_n_s_synthesizecallback;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_table;
  PyObject *__pyx_n_s_table_lookup;
  PyObject *__pyx_n_s_table_lookup_unmodulated;
  PyObject *__pyx_n_s_table_size;
  PyObject *__pyx_n_s_tan;
  PyObject *__pyx_n_s_tap;
  PyObject *__pyx_n_s_tap_unmodulated;
  PyObject *__pyx_n_s_tcoeffs;
  PyObject *__pyx_kp_u_temp;
  PyObject *__pyx_n_s_tempfile;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_kp_u_test_aif;
  PyObject *__pyx_kp_u_test_rev;
  PyObject *__pyx_kp_u_test_wav;
  PyObject *__pyx_kp_u_this_class_cannot_be_instantiate;
  PyObject *__pyx_kp_s_this_is_general_class_to_raise;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_tic;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_n_s_times;
  PyObject *__pyx_n_s_times_view;
  PyObject *__pyx_n_s_to_partials;
  PyObject *__pyx_n_s_toc;
  PyObject *__pyx_n_s_triangle_wave;
  PyObject *__pyx_n_s_triangle_wave_unmodulated;
  PyObject *__pyx_n_s_two_pole;
  PyObject *__pyx_n_s_two_zero;
  PyObject *__pyx_n_s_types;
  PyObject *__pyx_kp_s_types_of_normalizations_when_us;
  PyObject *__pyx_n_s_ucoeffs;
  PyObject *__pyx_kp_s_unable_to_allocate_array_data;
  PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
  PyObject *__pyx_n_s_unpack;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_kp_s_used_for_polynomial_based_gens;
  PyObject *__pyx_n_s_v;
  PyObject *__pyx_n_s_val;
  PyObject *__pyx_n_s_validate_envelope;
  PyObject *__pyx_n_s_validate_envelope_locals_genexpr;
  PyObject *__pyx_n_s_vals;
  PyObject *__pyx_n_s_vals_view;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_values;
  PyObject *__pyx_kp_s_various_interpolation_types;
  PyObject *__pyx_n_s_verbose;
  PyObject *__pyx_n_s_version_info;
  PyObject *__pyx_kp_u_vs;
  PyObject *__pyx_n_s_warn;
  PyObject *__pyx_n_s_warnings;
  PyObject *__pyx_n_s_wave;
  PyObject *__pyx_n_s_wave_train;
  PyObject *__pyx_n_s_wave_train_unmodulated;
  PyObject *__pyx_n_s_width;
  PyObject *__pyx_n_u_width;
  PyObject *__pyx_n_s_window;
  PyObject *__pyx_n_s_window_type;
  PyObject *__pyx_n_s_wrap;
  PyObject *__pyx_n_s_wraps;
  PyObject *__pyx_kp_u_writing_to;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_kp_u_x_values_of_envelope_must_be_inc;
  PyObject *__pyx_n_s_xcoeffs;
  PyObject *__pyx_n_s_y;
  PyObject *__pyx_n_s_y1;
  PyObject *__pyx_n_s_ycoeffs;
  PyObject *__pyx_n_s_zeros;
  PyObject *__pyx_n_s_zip;
  PyObject *__pyx_float__4;
  PyObject *__pyx_float__5;
  PyObject *__pyx_float__6;
  PyObject *__pyx_float_0_;
  PyObject *__pyx_float_1_;
  PyObject *__pyx_float__05;
  PyObject *__pyx_float__15;
  PyObject *__pyx_float_0_0;
  PyObject *__pyx_float_1_0;
  PyObject *__pyx_float_2_0;
  PyObject *__pyx_float_neg__99;
  PyObject *__pyx_float_neg_1_0;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_3;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_40;
  PyObject *__pyx_int_128;
  PyObject *__pyx_int_512;
  PyObject *__pyx_int_44100;
  PyObject *__pyx_int_65536;
  PyObject *__pyx_int_49617724;
  PyObject *__pyx_int_112105877;
  PyObject *__pyx_int_136983863;
  PyObject *__pyx_int_184977713;
  PyObject *__pyx_int_185414130;
  PyObject *__pyx_int_222419149;
  PyObject *__pyx_int_228825662;
  PyObject *__pyx_int_232027208;
  PyObject *__pyx_int_238750788;
  PyObject *__pyx_int_neg_1;
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_k__27;
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_k__28;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_k__29;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__32;
  PyObject *__pyx_k__33;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_k__34;
  PyObject *__pyx_k__35;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_k__36;
  double __pyx_k__37;
  double __pyx_k__38;
  double __pyx_k__39;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__40;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__43;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__44;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__45;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__47;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__48;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_k__61;
  PyObject *__pyx_slice__7;
  PyObject *__pyx_tuple__4;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_slice__21;
  PyObject *__pyx_slice__25;
  PyObject *__pyx_slice__30;
  PyObject *__pyx_slice__31;
  PyObject *__pyx_tuple__10;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__12;
  PyObject *__pyx_tuple__16;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__23;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__41;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__49;
  PyObject *__pyx_tuple__50;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__64;
  PyObject *__pyx_tuple__67;
  PyObject *__pyx_tuple__70;
  PyObject *__pyx_tuple__71;
  PyObject *__pyx_tuple__73;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__78;
  PyObject *__pyx_tuple__84;
  PyObject *__pyx_tuple__86;
  PyObject *__pyx_tuple__87;
  PyObject *__pyx_tuple__88;
  PyObject *__pyx_tuple__89;
  PyObject *__pyx_tuple__90;
  PyObject *__pyx_tuple__91;
  PyObject *__pyx_tuple__92;
  PyObject *__pyx_tuple__93;
  PyObject *__pyx_tuple__94;
  PyObject *__pyx_tuple__96;
  PyObject *__pyx_tuple__97;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__99;
  PyObject *__pyx_tuple__101;
  PyObject *__pyx_tuple__103;
  PyObject *__pyx_tuple__104;
  PyObject *__pyx_tuple__106;
  PyObject *__pyx_tuple__107;
  PyObject *__pyx_tuple__109;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__114;
  PyObject *__pyx_tuple__119;
  PyObject *__pyx_tuple__121;
  PyObject *__pyx_tuple__126;
  PyObject *__pyx_tuple__128;
  PyObject *__pyx_tuple__130;
  PyObject *__pyx_tuple__131;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__133;
  PyObject *__pyx_tuple__135;
  PyObject *__pyx_tuple__138;
  PyObject *__pyx_tuple__140;
  PyObject *__pyx_tuple__144;
  PyObject *__pyx_tuple__146;
  PyObject *__pyx_tuple__156;
  PyObject *__pyx_tuple__157;
  PyObject *__pyx_tuple__160;
  PyObject *__pyx_tuple__164;
  PyObject *__pyx_tuple__166;
  PyObject *__pyx_tuple__168;
  PyObject *__pyx_tuple__173;
  PyObject *__pyx_tuple__178;
  PyObject *__pyx_tuple__180;
  PyObject *__pyx_tuple__182;
  PyObject *__pyx_tuple__184;
  PyObject *__pyx_tuple__186;
  PyObject *__pyx_tuple__188;
  PyObject *__pyx_tuple__190;
  PyObject *__pyx_tuple__191;
  PyObject *__pyx_tuple__193;
  PyObject *__pyx_tuple__195;
  PyObject *__pyx_tuple__198;
  PyObject *__pyx_tuple__200;
  PyObject *__pyx_tuple__201;
  PyObject *__pyx_tuple__203;
  PyObject *__pyx_tuple__204;
  PyObject *__pyx_tuple__207;
  PyObject *__pyx_tuple__214;
  PyObject *__pyx_tuple__217;
  PyObject *__pyx_tuple__219;
  PyObject *__pyx_tuple__221;
  PyObject *__pyx_tuple__228;
  PyObject *__pyx_tuple__230;
  PyObject *__pyx_tuple__232;
  PyObject *__pyx_tuple__233;
  PyObject *__pyx_tuple__235;
  PyObject *__pyx_tuple__237;
  PyObject *__pyx_tuple__239;
  PyObject *__pyx_tuple__241;
  PyObject *__pyx_tuple__243;
  PyObject *__pyx_tuple__245;
  PyObject *__pyx_tuple__246;
  PyObject *__pyx_tuple__248;
  PyObject *__pyx_tuple__251;
  PyObject *__pyx_tuple__253;
  PyObject *__pyx_tuple__256;
  PyObject *__pyx_tuple__258;
  PyObject *__pyx_tuple__261;
  PyObject *__pyx_tuple__265;
  PyObject *__pyx_tuple__267;
  PyObject *__pyx_tuple__269;
  PyObject *__pyx_tuple__271;
  PyObject *__pyx_tuple__274;
  PyObject *__pyx_tuple__277;
  PyObject *__pyx_tuple__280;
  PyObject *__pyx_tuple__282;
  PyObject *__pyx_tuple__285;
  PyObject *__pyx_tuple__288;
  PyObject *__pyx_tuple__290;
  PyObject *__pyx_tuple__292;
  PyObject *__pyx_tuple__293;
  PyObject *__pyx_tuple__295;
  PyObject *__pyx_tuple__297;
  PyObject *__pyx_tuple__300;
  PyObject *__pyx_tuple__304;
  PyObject *__pyx_tuple__306;
  PyObject *__pyx_tuple__310;
  PyObject *__pyx_tuple__314;
  PyObject *__pyx_tuple__317;
  PyObject *__pyx_tuple__320;
  PyObject *__pyx_tuple__324;
  PyObject *__pyx_tuple__326;
  PyObject *__pyx_tuple__328;
  PyObject *__pyx_tuple__330;
  PyObject *__pyx_tuple__333;
  PyObject *__pyx_tuple__335;
  PyObject *__pyx_tuple__337;
  PyObject *__pyx_tuple__339;
  PyObject *__pyx_tuple__341;
  PyObject *__pyx_tuple__344;
  PyObject *__pyx_tuple__346;
  PyObject *__pyx_tuple__348;
  PyObject *__pyx_tuple__350;
  PyObject *__pyx_tuple__351;
  PyObject *__pyx_tuple__353;
  PyObject *__pyx_tuple__354;
  PyObject *__pyx_tuple__357;
  PyObject *__pyx_tuple__360;
  PyObject *__pyx_tuple__364;
  PyObject *__pyx_tuple__366;
  PyObject *__pyx_tuple__367;
  PyObject *__pyx_tuple__369;
  PyObject *__pyx_tuple__373;
  PyObject *__pyx_tuple__375;
  PyObject *__pyx_tuple__378;
  PyObject *__pyx_tuple__382;
  PyObject *__pyx_tuple__386;
  PyObject *__pyx_tuple__390;
  PyObject *__pyx_tuple__394;
  PyObject *__pyx_tuple__396;
  PyObject *__pyx_tuple__398;
  PyObject *__pyx_tuple__400;
  PyObject *__pyx_tuple__402;
  PyObject *__pyx_tuple__407;
  PyObject *__pyx_tuple__409;
  PyObject *__pyx_tuple__413;
  PyObject *__pyx_tuple__417;
  PyObject *__pyx_tuple__421;
  PyObject *__pyx_tuple__423;
  PyObject *__pyx_tuple__425;
  PyObject *__pyx_tuple__427;
  PyObject *__pyx_tuple__430;
  PyObject *__pyx_tuple__432;
  PyObject *__pyx_tuple__436;
  PyObject *__pyx_tuple__440;
  PyObject *__pyx_tuple__444;
  PyObject *__pyx_tuple__447;
  PyObject *__pyx_tuple__450;
  PyObject *__pyx_tuple__454;
  PyObject *__pyx_tuple__457;
  PyObject *__pyx_tuple__460;
  PyObject *__pyx_tuple__464;
  PyObject *__pyx_tuple__468;
  PyObject *__pyx_tuple__472;
  PyObject *__pyx_tuple__474;
  PyObject *__pyx_tuple__478;
  PyObject *__pyx_tuple__481;
  PyObject *__pyx_tuple__483;
  PyObject *__pyx_tuple__486;
  PyObject *__pyx_tuple__488;
  PyObject *__pyx_tuple__490;
  PyObject *__pyx_tuple__493;
  PyObject *__pyx_tuple__495;
  PyObject *__pyx_tuple__498;
  PyObject *__pyx_tuple__500;
  PyObject *__pyx_tuple__501;
  PyObject *__pyx_tuple__504;
  PyObject *__pyx_tuple__507;
  PyObject *__pyx_tuple__511;
  PyObject *__pyx_tuple__515;
  PyObject *__pyx_tuple__517;
  PyObject *__pyx_tuple__520;
  PyObject *__pyx_tuple__522;
  PyObject *__pyx_tuple__524;
  PyObject *__pyx_tuple__526;
  PyObject *__pyx_tuple__530;
  PyObject *__pyx_tuple__532;
  PyObject *__pyx_tuple__534;
  PyObject *__pyx_tuple__536;
  PyObject *__pyx_tuple__538;
  PyObject *__pyx_tuple__546;
  PyObject *__pyx_tuple__548;
  PyObject *__pyx_tuple__553;
  PyObject *__pyx_tuple__555;
  PyObject *__pyx_tuple__557;
  PyObject *__pyx_tuple__560;
  PyObject *__pyx_tuple__562;
  PyObject *__pyx_tuple__565;
  PyObject *__pyx_tuple__567;
  PyObject *__pyx_tuple__571;
  PyObject *__pyx_tuple__573;
  PyObject *__pyx_tuple__575;
  PyObject *__pyx_tuple__578;
  PyObject *__pyx_tuple__582;
  PyObject *__pyx_tuple__584;
  PyObject *__pyx_tuple__590;
  PyObject *__pyx_tuple__592;
  PyObject *__pyx_tuple__597;
  PyObject *__pyx_tuple__599;
  PyObject *__pyx_tuple__602;
  PyObject *__pyx_tuple__605;
  PyObject *__pyx_tuple__607;
  PyObject *__pyx_tuple__609;
  PyObject *__pyx_tuple__610;
  PyObject *__pyx_tuple__612;
  PyObject *__pyx_tuple__614;
  PyObject *__pyx_tuple__616;
  PyObject *__pyx_tuple__618;
  PyObject *__pyx_tuple__622;
  PyObject *__pyx_tuple__627;
  PyObject *__pyx_codeobj__51;
  PyObject *__pyx_codeobj__52;
  PyObject *__pyx_codeobj__53;
  PyObject *__pyx_codeobj__55;
  PyObject *__pyx_codeobj__56;
  PyObject *__pyx_codeobj__57;
  PyObject *__pyx_codeobj__59;
  PyObject *__pyx_codeobj__60;
  PyObject *__pyx_codeobj__65;
  PyObject *__pyx_codeobj__66;
  PyObject *__pyx_codeobj__68;
  PyObject *__pyx_codeobj__69;
  PyObject *__pyx_codeobj__72;
  PyObject *__pyx_codeobj__74;
  PyObject *__pyx_codeobj__76;
  PyObject *__pyx_codeobj__79;
  PyObject *__pyx_codeobj__80;
  PyObject *__pyx_codeobj__81;
  PyObject *__pyx_codeobj__82;
  PyObject *__pyx_codeobj__83;
  PyObject *__pyx_codeobj__85;
  PyObject *__pyx_codeobj__95;
  PyObject *__pyx_codeobj__100;
  PyObject *__pyx_codeobj__102;
  PyObject *__pyx_codeobj__105;
  PyObject *__pyx_codeobj__108;
  PyObject *__pyx_codeobj__110;
  PyObject *__pyx_codeobj__111;
  PyObject *__pyx_codeobj__113;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__116;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__118;
  PyObject *__pyx_codeobj__120;
  PyObject *__pyx_codeobj__122;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__124;
  PyObject *__pyx_codeobj__125;
  PyObject *__pyx_codeobj__127;
  PyObject *__pyx_codeobj__129;
  PyObject *__pyx_codeobj__134;
  PyObject *__pyx_codeobj__136;
  PyObject *__pyx_codeobj__139;
  PyObject *__pyx_codeobj__141;
  PyObject *__pyx_codeobj__142;
  PyObject *__pyx_codeobj__143;
  PyObject *__pyx_codeobj__145;
  PyObject *__pyx_codeobj__147;
  PyObject *__pyx_codeobj__148;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__150;
  PyObject *__pyx_codeobj__151;
  PyObject *__pyx_codeobj__152;
  PyObject *__pyx_codeobj__153;
  PyObject *__pyx_codeobj__154;
  PyObject *__pyx_codeobj__155;
  PyObject *__pyx_codeobj__158;
  PyObject *__pyx_codeobj__159;
  PyObject *__pyx_codeobj__161;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__163;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__167;
  PyObject *__pyx_codeobj__169;
  PyObject *__pyx_codeobj__170;
  PyObject *__pyx_codeobj__171;
  PyObject *__pyx_codeobj__172;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__175;
  PyObject *__pyx_codeobj__176;
  PyObject *__pyx_codeobj__177;
  PyObject *__pyx_codeobj__179;
  PyObject *__pyx_codeobj__181;
  PyObject *__pyx_codeobj__183;
  PyObject *__pyx_codeobj__185;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__189;
  PyObject *__pyx_codeobj__192;
  PyObject *__pyx_codeobj__194;
  PyObject *__pyx_codeobj__196;
  PyObject *__pyx_codeobj__197;
  PyObject *__pyx_codeobj__199;
  PyObject *__pyx_codeobj__202;
  PyObject *__pyx_codeobj__205;
  PyObject *__pyx_codeobj__206;
  PyObject *__pyx_codeobj__208;
  PyObject *__pyx_codeobj__209;
  PyObject *__pyx_codeobj__210;
  PyObject *__pyx_codeobj__211;
  PyObject *__pyx_codeobj__212;
  PyObject *__pyx_codeobj__213;
  PyObject *__pyx_codeobj__215;
  PyObject *__pyx_codeobj__216;
  PyObject *__pyx_codeobj__218;
  PyObject *__pyx_codeobj__220;
  PyObject *__pyx_codeobj__222;
  PyObject *__pyx_codeobj__223;
  PyObject *__pyx_codeobj__224;
  PyObject *__pyx_codeobj__225;
  PyObject *__pyx_codeobj__226;
  PyObject *__pyx_codeobj__227;
  PyObject *__pyx_codeobj__229;
  PyObject *__pyx_codeobj__231;
  PyObject *__pyx_codeobj__234;
  PyObject *__pyx_codeobj__236;
  PyObject *__pyx_codeobj__238;
  PyObject *__pyx_codeobj__240;
  PyObject *__pyx_codeobj__242;
  PyObject *__pyx_codeobj__244;
  PyObject *__pyx_codeobj__247;
  PyObject *__pyx_codeobj__249;
  PyObject *__pyx_codeobj__250;
  PyObject *__pyx_codeobj__252;
  PyObject *__pyx_codeobj__254;
  PyObject *__pyx_codeobj__255;
  PyObject *__pyx_codeobj__257;
  PyObject *__pyx_codeobj__259;
  PyObject *__pyx_codeobj__260;
  PyObject *__pyx_codeobj__262;
  PyObject *__pyx_codeobj__263;
  PyObject *__pyx_codeobj__264;
  PyObject *__pyx_codeobj__266;
  PyObject *__pyx_codeobj__268;
  PyObject *__pyx_codeobj__270;
  PyObject *__pyx_codeobj__272;
  PyObject *__pyx_codeobj__273;
  PyObject *__pyx_codeobj__275;
  PyObject *__pyx_codeobj__276;
  PyObject *__pyx_codeobj__278;
  PyObject *__pyx_codeobj__279;
  PyObject *__pyx_codeobj__281;
  PyObject *__pyx_codeobj__283;
  PyObject *__pyx_codeobj__284;
  PyObject *__pyx_codeobj__286;
  PyObject *__pyx_codeobj__287;
  PyObject *__pyx_codeobj__289;
  PyObject *__pyx_codeobj__291;
  PyObject *__pyx_codeobj__294;
  PyObject *__pyx_codeobj__296;
  PyObject *__pyx_codeobj__298;
  PyObject *__pyx_codeobj__299;
  PyObject *__pyx_codeobj__301;
  PyObject *__pyx_codeobj__302;
  PyObject *__pyx_codeobj__303;
  PyObject *__pyx_codeobj__305;
  PyObject *__pyx_codeobj__307;
  PyObject *__pyx_codeobj__308;
  PyObject *__pyx_codeobj__309;
  PyObject *__pyx_codeobj__311;
  PyObject *__pyx_codeobj__312;
  PyObject *__pyx_codeobj__313;
  PyObject *__pyx_codeobj__315;
  PyObject *__pyx_codeobj__316;
  PyObject *__pyx_codeobj__318;
  PyObject *__pyx_codeobj__319;
  PyObject *__pyx_codeobj__321;
  PyObject *__pyx_codeobj__322;
  PyObject *__pyx_codeobj__323;
  PyObject *__pyx_codeobj__325;
  PyObject *__pyx_codeobj__327;
  PyObject *__pyx_codeobj__329;
  PyObject *__pyx_codeobj__331;
  PyObject *__pyx_codeobj__332;
  PyObject *__pyx_codeobj__334;
  PyObject *__pyx_codeobj__336;
  PyObject *__pyx_codeobj__338;
  PyObject *__pyx_codeobj__340;
  PyObject *__pyx_codeobj__342;
  PyObject *__pyx_codeobj__343;
  PyObject *__pyx_codeobj__345;
  PyObject *__pyx_codeobj__347;
  PyObject *__pyx_codeobj__349;
  PyObject *__pyx_codeobj__352;
  PyObject *__pyx_codeobj__355;
  PyObject *__pyx_codeobj__356;
  PyObject *__pyx_codeobj__358;
  PyObject *__pyx_codeobj__359;
  PyObject *__pyx_codeobj__361;
  PyObject *__pyx_codeobj__362;
  PyObject *__pyx_codeobj__363;
  PyObject *__pyx_codeobj__365;
  PyObject *__pyx_codeobj__368;
  PyObject *__pyx_codeobj__370;
  PyObject *__pyx_codeobj__371;
  PyObject *__pyx_codeobj__372;
  PyObject *__pyx_codeobj__374;
  PyObject *__pyx_codeobj__376;
  PyObject *__pyx_codeobj__377;
  PyObject *__pyx_codeobj__379;
  PyObject *__pyx_codeobj__380;
  PyObject *__pyx_codeobj__381;
  PyObject *__pyx_codeobj__383;
  PyObject *__pyx_codeobj__384;
  PyObject *__pyx_codeobj__385;
  PyObject *__pyx_codeobj__387;
  PyObject *__pyx_codeobj__388;
  PyObject *__pyx_codeobj__389;
  PyObject *__pyx_codeobj__391;
  PyObject *__pyx_codeobj__392;
  PyObject *__pyx_codeobj__393;
  PyObject *__pyx_codeobj__395;
  PyObject *__pyx_codeobj__397;
  PyObject *__pyx_codeobj__399;
  PyObject *__pyx_codeobj__401;
  PyObject *__pyx_codeobj__403;
  PyObject *__pyx_codeobj__404;
  PyObject *__pyx_codeobj__405;
  PyObject *__pyx_codeobj__406;
  PyObject *__pyx_codeobj__408;
  PyObject *__pyx_codeobj__410;
  PyObject *__pyx_codeobj__411;
  PyObject *__pyx_codeobj__412;
  PyObject *__pyx_codeobj__414;
  PyObject *__pyx_codeobj__415;
  PyObject *__pyx_codeobj__416;
  PyObject *__pyx_codeobj__418;
  PyObject *__pyx_codeobj__419;
  PyObject *__pyx_codeobj__420;
  PyObject *__pyx_codeobj__422;
  PyObject *__pyx_codeobj__424;
  PyObject *__pyx_codeobj__426;
  PyObject *__pyx_codeobj__428;
  PyObject *__pyx_codeobj__429;
  PyObject *__pyx_codeobj__431;
  PyObject *__pyx_codeobj__433;
  PyObject *__pyx_codeobj__434;
  PyObject *__pyx_codeobj__435;
  PyObject *__pyx_codeobj__437;
  PyObject *__pyx_codeobj__438;
  PyObject *__pyx_codeobj__439;
  PyObject *__pyx_codeobj__441;
  PyObject *__pyx_codeobj__442;
  PyObject *__pyx_codeobj__443;
  PyObject *__pyx_codeobj__445;
  PyObject *__pyx_codeobj__446;
  PyObject *__pyx_codeobj__448;
  PyObject *__pyx_codeobj__449;
  PyObject *__pyx_codeobj__451;
  PyObject *__pyx_codeobj__452;
  PyObject *__pyx_codeobj__453;
  PyObject *__pyx_codeobj__455;
  PyObject *__pyx_codeobj__456;
  PyObject *__pyx_codeobj__458;
  PyObject *__pyx_codeobj__459;
  PyObject *__pyx_codeobj__461;
  PyObject *__pyx_codeobj__462;
  PyObject *__pyx_codeobj__463;
  PyObject *__pyx_codeobj__465;
  PyObject *__pyx_codeobj__466;
  PyObject *__pyx_codeobj__467;
  PyObject *__pyx_codeobj__469;
  PyObject *__pyx_codeobj__470;
  PyObject *__pyx_codeobj__471;
  PyObject *__pyx_codeobj__473;
  PyObject *__pyx_codeobj__475;
  PyObject *__pyx_codeobj__476;
  PyObject *__pyx_codeobj__477;
  PyObject *__pyx_codeobj__479;
  PyObject *__pyx_codeobj__480;
  PyObject *__pyx_codeobj__482;
  PyObject *__pyx_codeobj__484;
  PyObject *__pyx_codeobj__485;
  PyObject *__pyx_codeobj__487;
  PyObject *__pyx_codeobj__489;
  PyObject *__pyx_codeobj__491;
  PyObject *__pyx_codeobj__492;
  PyObject *__pyx_codeobj__494;
  PyObject *__pyx_codeobj__496;
  PyObject *__pyx_codeobj__497;
  PyObject *__pyx_codeobj__499;
  PyObject *__pyx_codeobj__502;
  PyObject *__pyx_codeobj__503;
  PyObject *__pyx_codeobj__505;
  PyObject *__pyx_codeobj__506;
  PyObject *__pyx_codeobj__508;
  PyObject *__pyx_codeobj__509;
  PyObject *__pyx_codeobj__510;
  PyObject *__pyx_codeobj__512;
  PyObject *__pyx_codeobj__513;
  PyObject *__pyx_codeobj__514;
  PyObject *__pyx_codeobj__516;
  PyObject *__pyx_codeobj__518;
  PyObject *__pyx_codeobj__519;
  PyObject *__pyx_codeobj__521;
  PyObject *__pyx_codeobj__523;
  PyObject *__pyx_codeobj__525;
  PyObject *__pyx_codeobj__527;
  PyObject *__pyx_codeobj__528;
  PyObject *__pyx_codeobj__529;
  PyObject *__pyx_codeobj__531;
  PyObject *__pyx_codeobj__533;
  PyObject *__pyx_codeobj__535;
  PyObject *__pyx_codeobj__537;
  PyObject *__pyx_codeobj__539;
  PyObject *__pyx_codeobj__540;
  PyObject *__pyx_codeobj__541;
  PyObject *__pyx_codeobj__542;
  PyObject *__pyx_codeobj__543;
  PyObject *__pyx_codeobj__544;
  PyObject *__pyx_codeobj__545;
  PyObject *__pyx_codeobj__547;
  PyObject *__pyx_codeobj__549;
  PyObject *__pyx_codeobj__550;
  PyObject *__pyx_codeobj__551;
  PyObject *__pyx_codeobj__552;
  PyObject *__pyx_codeobj__554;
  PyObject *__pyx_codeobj__556;
  PyObject *__pyx_codeobj__558;
  PyObject *__pyx_codeobj__559;
  PyObject *__pyx_codeobj__561;
  PyObject *__pyx_codeobj__563;
  PyObject *__pyx_codeobj__564;
  PyObject *__pyx_codeobj__566;
  PyObject *__pyx_codeobj__568;
  PyObject *__pyx_codeobj__569;
  PyObject *__pyx_codeobj__570;
  PyObject *__pyx_codeobj__572;
  PyObject *__pyx_codeobj__574;
  PyObject *__pyx_codeobj__576;
  PyObject *__pyx_codeobj__577;
  PyObject *__pyx_codeobj__579;
  PyObject *__pyx_codeobj__580;
  PyObject *__pyx_codeobj__581;
  PyObject *__pyx_codeobj__583;
  PyObject *__pyx_codeobj__585;
  PyObject *__pyx_codeobj__586;
  PyObject *__pyx_codeobj__587;
  PyObject *__pyx_codeobj__588;
  PyObject *__pyx_codeobj__589;
  PyObject *__pyx_codeobj__591;
  PyObject *__pyx_codeobj__593;
  PyObject *__pyx_codeobj__594;
  PyObject *__pyx_codeobj__595;
  PyObject *__pyx_codeobj__596;
  PyObject *__pyx_codeobj__598;
  PyObject *__pyx_codeobj__600;
  PyObject *__pyx_codeobj__601;
  PyObject *__pyx_codeobj__603;
  PyObject *__pyx_codeobj__604;
  PyObject *__pyx_codeobj__606;
  PyObject *__pyx_codeobj__608;
  PyObject *__pyx_codeobj__611;
  PyObject *__pyx_codeobj__613;
  PyObject *__pyx_codeobj__615;
  PyObject *__pyx_codeobj__617;
  PyObject *__pyx_codeobj__619;
  PyObject *__pyx_codeobj__620;
  PyObject *__pyx_codeobj__621;
  PyObject *__pyx_codeobj__623;
  PyObject *__pyx_codeobj__624;
  PyObject *__pyx_codeobj__625;
  PyObject *__pyx_codeobj__626;
  PyObject *__pyx_codeobj__628;
  PyObject *__pyx_codeobj__629;
} __pyx_mstate;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm_mus_any);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm_mus_any);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm_mus_any_array);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm_mus_any_array);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm_array_readin_gen);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm_array_readin_gen);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb);
  Py_CLEAR(clear_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator);
  Py_CLEAR(clear_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator);
  Py_CLEAR(clear_module_state->__pyx_ptype___Pyx_EnumMeta);
  Py_CLEAR(clear_module_state->__Pyx_EnumMeta);
  Py_CLEAR(clear_module_state->__pyx_array_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
  Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
  Py_CLEAR(clear_module_state->__pyx_memoryview_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
  Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
  Py_CLEAR(clear_module_state->__pyx_kp_u_);
  Py_CLEAR(clear_module_state->__pyx_kp_u_0_8f);
  Py_CLEAR(clear_module_state->__pyx_n_s_ADC);
  Py_CLEAR(clear_module_state->__pyx_n_s_ADF);
  Py_CLEAR(clear_module_state->__pyx_n_s_AIFC);
  Py_CLEAR(clear_module_state->__pyx_n_s_AIFF);
  Py_CLEAR(clear_module_state->__pyx_n_s_AKAI4);
  Py_CLEAR(clear_module_state->__pyx_n_s_ALAW);
  Py_CLEAR(clear_module_state->__pyx_n_s_ALL_PASS);
  Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
  Py_CLEAR(clear_module_state->__pyx_n_s_ASF);
  Py_CLEAR(clear_module_state->__pyx_n_s_AVI);
  Py_CLEAR(clear_module_state->__pyx_n_s_AVR);
  Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
  Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
  Py_CLEAR(clear_module_state->__pyx_n_s_B24INT);
  Py_CLEAR(clear_module_state->__pyx_n_s_BARTLETT);
  Py_CLEAR(clear_module_state->__pyx_n_s_BARTLETT_HANN);
  Py_CLEAR(clear_module_state->__pyx_n_s_BDOUBLE);
  Py_CLEAR(clear_module_state->__pyx_n_s_BDOUBLE_UNSCALED);
  Py_CLEAR(clear_module_state->__pyx_n_s_BEZIER);
  Py_CLEAR(clear_module_state->__pyx_n_s_BFLOAT);
  Py_CLEAR(clear_module_state->__pyx_n_s_BFLOAT_UNSCALED);
  Py_CLEAR(clear_module_state->__pyx_n_s_BICSF);
  Py_CLEAR(clear_module_state->__pyx_n_s_BINT);
  Py_CLEAR(clear_module_state->__pyx_n_s_BINTN);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN10);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN2);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN3);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN4);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN5);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN6);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN7);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN8);
  Py_CLEAR(clear_module_state->__pyx_n_s_BLACKMAN9);
  Py_CLEAR(clear_module_state->__pyx_n_s_BOHMAN);
  Py_CLEAR(clear_module_state->__pyx_n_s_BOTH_KINDS);
  Py_CLEAR(clear_module_state->__pyx_n_s_BSHORT);
  Py_CLEAR(clear_module_state->__pyx_n_s_BYTE);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
  Py_CLEAR(clear_module_state->__pyx_n_s_CAFF);
  Py_CLEAR(clear_module_state->__pyx_n_s_CAUCHY);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFUNCTYPE);
  Py_CLEAR(clear_module_state->__pyx_n_s_COMDISCO);
  Py_CLEAR(clear_module_state->__pyx_n_s_CONNES);
  Py_CLEAR(clear_module_state->__pyx_n_s_COVOX);
  Py_CLEAR(clear_module_state->__pyx_n_s_CSL);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_FILE_NAME);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_FILE_PLAYER);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_OUTPUT_CHANS);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_OUTPUT_SRATE);
  Py_CLEAR(clear_module_state->__pyx_n_s_DELUSION);
  Py_CLEAR(clear_module_state->__pyx_n_s_DIAMONDWARE);
  Py_CLEAR(clear_module_state->__pyx_n_s_DIGIPLAYER);
  Py_CLEAR(clear_module_state->__pyx_n_s_DOLPH_CHEBYSHEV);
  Py_CLEAR(clear_module_state->__pyx_n_s_DPSS);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
  Py_CLEAR(clear_module_state->__pyx_n_s_EITHER_KIND);
  Py_CLEAR(clear_module_state->__pyx_n_s_ESPS);
  Py_CLEAR(clear_module_state->__pyx_n_s_EXPONENTIAL);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
  Py_CLEAR(clear_module_state->__pyx_n_s_EnumBase);
  Py_CLEAR(clear_module_state->__pyx_n_s_EnumType);
  Py_CLEAR(clear_module_state->__pyx_n_s_FARANDOLE);
  Py_CLEAR(clear_module_state->__pyx_n_s_FILE_SAMP);
  Py_CLEAR(clear_module_state->__pyx_n_s_FIRST_KIND);
  Py_CLEAR(clear_module_state->__pyx_n_s_FLAC);
  Py_CLEAR(clear_module_state->__pyx_n_s_FLAT_TOP);
  Py_CLEAR(clear_module_state->__pyx_n_s_FileNotFoundError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Filter_needs_values_for_a0_a1_a2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Filter_needs_values_for_a0_b1_b2);
  Py_CLEAR(clear_module_state->__pyx_n_s_GAUSSIAN);
  Py_CLEAR(clear_module_state->__pyx_n_s_GOLDWAVE);
  Py_CLEAR(clear_module_state->__pyx_n_s_GRAVIS);
  Py_CLEAR(clear_module_state->__pyx_n_s_GeneratorType);
  Py_CLEAR(clear_module_state->__pyx_n_s_HAMMING);
  Py_CLEAR(clear_module_state->__pyx_n_s_HANN);
  Py_CLEAR(clear_module_state->__pyx_n_s_HANN_POISSON);
  Py_CLEAR(clear_module_state->__pyx_n_s_HCOM);
  Py_CLEAR(clear_module_state->__pyx_n_s_HERMITE);
  Py_CLEAR(clear_module_state->__pyx_n_s_Header);
  Py_CLEAR(clear_module_state->__pyx_n_s_IEEE);
  Py_CLEAR(clear_module_state->__pyx_n_s_IMPULSETRACKER);
  Py_CLEAR(clear_module_state->__pyx_n_s_INRS);
  Py_CLEAR(clear_module_state->__pyx_n_s_IN_DB);
  Py_CLEAR(clear_module_state->__pyx_n_s_IRCAM);
  Py_CLEAR(clear_module_state->__pyx_kp_u_If_not_specifying_coeffs_must_pr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntEnum);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntFlag);
  Py_CLEAR(clear_module_state->__pyx_n_s_Interp);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
  Py_CLEAR(clear_module_state->__pyx_n_s_KAISER);
  Py_CLEAR(clear_module_state->__pyx_n_s_KORG);
  Py_CLEAR(clear_module_state->__pyx_n_s_KURZWEIL_2000);
  Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
  Py_CLEAR(clear_module_state->__pyx_n_s_L24INT);
  Py_CLEAR(clear_module_state->__pyx_n_s_LAGRANGE);
  Py_CLEAR(clear_module_state->__pyx_n_s_LDOUBLE);
  Py_CLEAR(clear_module_state->__pyx_n_s_LDOUBLE_UNSCALED);
  Py_CLEAR(clear_module_state->__pyx_n_s_LFLOAT);
  Py_CLEAR(clear_module_state->__pyx_n_s_LFLOAT_UNSCALED);
  Py_CLEAR(clear_module_state->__pyx_n_s_LINEAR);
  Py_CLEAR(clear_module_state->__pyx_n_s_LINT);
  Py_CLEAR(clear_module_state->__pyx_n_s_LINTN);
  Py_CLEAR(clear_module_state->__pyx_n_s_LSHORT);
  Py_CLEAR(clear_module_state->__pyx_n_s_MATLAB);
  Py_CLEAR(clear_module_state->__pyx_n_s_MAUD);
  Py_CLEAR(clear_module_state->__pyx_n_s_MAUI);
  Py_CLEAR(clear_module_state->__pyx_n_s_MIDI);
  Py_CLEAR(clear_module_state->__pyx_n_s_MIDI_SAMPLE_DUMP);
  Py_CLEAR(clear_module_state->__pyx_n_s_MLT_SINE);
  Py_CLEAR(clear_module_state->__pyx_n_s_MPEG);
  Py_CLEAR(clear_module_state->__pyx_n_s_MULAW);
  Py_CLEAR(clear_module_state->__pyx_n_s_MUS10);
  Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
  Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
  Py_CLEAR(clear_module_state->__pyx_n_s_NEXT);
  Py_CLEAR(clear_module_state->__pyx_n_s_NIST);
  Py_CLEAR(clear_module_state->__pyx_n_s_NONE);
  Py_CLEAR(clear_module_state->__pyx_n_s_NORMALIZED);
  Py_CLEAR(clear_module_state->__pyx_n_s_NUM_HEADERS);
  Py_CLEAR(clear_module_state->__pyx_n_s_NUM_SAMPLES);
  Py_CLEAR(clear_module_state->__pyx_n_s_NVF);
  Py_CLEAR(clear_module_state->__pyx_kp_u_None);
  Py_CLEAR(clear_module_state->__pyx_n_b_O);
  Py_CLEAR(clear_module_state->__pyx_n_s_OGG);
  Py_CLEAR(clear_module_state->__pyx_n_s_OMF);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Optional_float);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Optional_int);
  Py_CLEAR(clear_module_state->__pyx_n_s_OrderedDict);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
  Py_CLEAR(clear_module_state->__pyx_n_s_PAF);
  Py_CLEAR(clear_module_state->__pyx_n_s_PAPOULIS);
  Py_CLEAR(clear_module_state->__pyx_n_s_PARZEN);
  Py_CLEAR(clear_module_state->__pyx_n_s_POISSON);
  Py_CLEAR(clear_module_state->__pyx_n_s_PSION);
  Py_CLEAR(clear_module_state->__pyx_n_s_PVF);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Polynomial);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumBase);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumBase___new);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumBase___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumBase___str);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumMeta___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_EnumMeta___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_FlagBase);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_FlagBase___new);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_FlagBase___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_FlagBase___str);
  Py_CLEAR(clear_module_state->__pyx_n_s_QUICKTIME);
  Py_CLEAR(clear_module_state->__pyx_n_s_RAW);
  Py_CLEAR(clear_module_state->__pyx_n_s_RECTANGULAR);
  Py_CLEAR(clear_module_state->__pyx_n_s_RF64);
  Py_CLEAR(clear_module_state->__pyx_n_s_RIEMANN);
  Py_CLEAR(clear_module_state->__pyx_n_s_RIFF);
  Py_CLEAR(clear_module_state->__pyx_n_s_RV2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RV3);
  Py_CLEAR(clear_module_state->__pyx_n_s_RV4);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_SAMARAKI);
  Py_CLEAR(clear_module_state->__pyx_n_s_SAMPLE_DUMP);
  Py_CLEAR(clear_module_state->__pyx_n_s_SBSTUDIOII);
  Py_CLEAR(clear_module_state->__pyx_n_s_SD1);
  Py_CLEAR(clear_module_state->__pyx_n_s_SDIF);
  Py_CLEAR(clear_module_state->__pyx_n_s_SECOND_KIND);
  Py_CLEAR(clear_module_state->__pyx_n_s_SHORTEN);
  Py_CLEAR(clear_module_state->__pyx_n_s_SINC);
  Py_CLEAR(clear_module_state->__pyx_n_s_SINUSOIDAL);
  Py_CLEAR(clear_module_state->__pyx_n_s_SMP);
  Py_CLEAR(clear_module_state->__pyx_n_s_SNDLibError);
  Py_CLEAR(clear_module_state->__pyx_n_s_SNDLibError____init);
  Py_CLEAR(clear_module_state->__pyx_n_s_SNDT);
  Py_CLEAR(clear_module_state->__pyx_n_s_SOUNDFONT);
  Py_CLEAR(clear_module_state->__pyx_n_s_SOUNDFORGE);
  Py_CLEAR(clear_module_state->__pyx_n_s_SOX);
  Py_CLEAR(clear_module_state->__pyx_n_s_SPEEX);
  Py_CLEAR(clear_module_state->__pyx_n_s_SPPACK);
  Py_CLEAR(clear_module_state->__pyx_n_s_SRFS);
  Py_CLEAR(clear_module_state->__pyx_n_s_SVX);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sample);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_SimpleNamespace);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sound);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sound___enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sound___exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_Sound___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_Spectrum);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_TTA);
  Py_CLEAR(clear_module_state->__pyx_n_s_TUKEY);
  Py_CLEAR(clear_module_state->__pyx_n_s_TWINVQ);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_UBSHORT);
  Py_CLEAR(clear_module_state->__pyx_n_s_UBYTE);
  Py_CLEAR(clear_module_state->__pyx_n_s_ULSHORT);
  Py_CLEAR(clear_module_state->__pyx_n_s_ULTRASPHERICAL);
  Py_CLEAR(clear_module_state->__pyx_n_s_ULTRATRACKER);
  Py_CLEAR(clear_module_state->__pyx_n_s_UNKNOWN_HEADER);
  Py_CLEAR(clear_module_state->__pyx_n_s_UNKNOWN_SAMPLE);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Unknown_enum_value_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_VOC);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
  Py_CLEAR(clear_module_state->__pyx_n_s_WAVPACK);
  Py_CLEAR(clear_module_state->__pyx_n_s_WELCH);
  Py_CLEAR(clear_module_state->__pyx_n_s_Window);
  Py_CLEAR(clear_module_state->__pyx_n_s_YAMAHA_SY85);
  Py_CLEAR(clear_module_state->__pyx_n_s_YAMAHA_SY99);
  Py_CLEAR(clear_module_state->__pyx_n_s_YAMAHA_TX16W);
  Py_CLEAR(clear_module_state->__pyx_kp_u__13);
  Py_CLEAR(clear_module_state->__pyx_n_s__137);
  Py_CLEAR(clear_module_state->__pyx_kp_u__14);
  Py_CLEAR(clear_module_state->__pyx_kp_u__15);
  Py_CLEAR(clear_module_state->__pyx_kp_u__17);
  Py_CLEAR(clear_module_state->__pyx_kp_u__18);
  Py_CLEAR(clear_module_state->__pyx_kp_u__19);
  Py_CLEAR(clear_module_state->__pyx_n_s__2);
  Py_CLEAR(clear_module_state->__pyx_kp_s__3);
  Py_CLEAR(clear_module_state->__pyx_kp_u__3);
  Py_CLEAR(clear_module_state->__pyx_kp_u__5);
  Py_CLEAR(clear_module_state->__pyx_kp_u__62);
  Py_CLEAR(clear_module_state->__pyx_n_s__630);
  Py_CLEAR(clear_module_state->__pyx_kp_u__8);
  Py_CLEAR(clear_module_state->__pyx_kp_u__9);
  Py_CLEAR(clear_module_state->__pyx_n_s_a0);
  Py_CLEAR(clear_module_state->__pyx_n_s_a1);
  Py_CLEAR(clear_module_state->__pyx_kp_u_a1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_a2);
  Py_CLEAR(clear_module_state->__pyx_n_s_a2_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_a_valid_envelope_can_only_contai);
  Py_CLEAR(clear_module_state->__pyx_kp_u_a_valid_envelope_needs_at_least);
  Py_CLEAR(clear_module_state->__pyx_kp_u_a_valid_envelope_needs_even_numb);
  Py_CLEAR(clear_module_state->__pyx_n_s_abc);
  Py_CLEAR(clear_module_state->__pyx_n_s_abs);
  Py_CLEAR(clear_module_state->__pyx_n_s_addressof);
  Py_CLEAR(clear_module_state->__pyx_n_u_afplay);
  Py_CLEAR(clear_module_state->__pyx_n_s_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_pass_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_passes);
  Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
  Py_CLEAR(clear_module_state->__pyx_kp_u_allpass_list_contains_at_least_o);
  Py_CLEAR(clear_module_state->__pyx_n_s_alpha);
  Py_CLEAR(clear_module_state->__pyx_n_s_amax);
  Py_CLEAR(clear_module_state->__pyx_n_s_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_amplitude_modulate);
  Py_CLEAR(clear_module_state->__pyx_n_s_amps);
  Py_CLEAR(clear_module_state->__pyx_n_s_analyze);
  Py_CLEAR(clear_module_state->__pyx_n_s_analyze_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_analyzecallback);
  Py_CLEAR(clear_module_state->__pyx_kp_u_and);
  Py_CLEAR(clear_module_state->__pyx_n_s_any);
  Py_CLEAR(clear_module_state->__pyx_n_u_aplay);
  Py_CLEAR(clear_module_state->__pyx_n_s_arange);
  Py_CLEAR(clear_module_state->__pyx_n_s_arg);
  Py_CLEAR(clear_module_state->__pyx_n_s_arg1);
  Py_CLEAR(clear_module_state->__pyx_n_s_arg2);
  Py_CLEAR(clear_module_state->__pyx_n_s_argmax);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_arr);
  Py_CLEAR(clear_module_state->__pyx_n_s_arr1);
  Py_CLEAR(clear_module_state->__pyx_n_s_arr2);
  Py_CLEAR(clear_module_state->__pyx_n_s_array);
  Py_CLEAR(clear_module_state->__pyx_kp_u_array_has);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_reader);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_reader_locals_reader);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_readin_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_readin_gen___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_readin_gen___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_array_resample);
  Py_CLEAR(clear_module_state->__pyx_n_s_asarray);
  Py_CLEAR(clear_module_state->__pyx_kp_u_asked_for);
  Py_CLEAR(clear_module_state->__pyx_n_s_asymmetric_fm);
  Py_CLEAR(clear_module_state->__pyx_n_s_asymmetric_fm_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_atan2);
  Py_CLEAR(clear_module_state->__pyx_n_s_autocorrelate);
  Py_CLEAR(clear_module_state->__pyx_n_s_b1);
  Py_CLEAR(clear_module_state->__pyx_kp_u_b1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_b2);
  Py_CLEAR(clear_module_state->__pyx_n_s_b2_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_base);
  Py_CLEAR(clear_module_state->__pyx_kp_u_before_scaling);
  Py_CLEAR(clear_module_state->__pyx_n_s_beg);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_i0);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_j0);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_j1);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_jn);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_y0);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_y1);
  Py_CLEAR(clear_module_state->__pyx_n_s_bes_yn);
  Py_CLEAR(clear_module_state->__pyx_n_s_bessi0);
  Py_CLEAR(clear_module_state->__pyx_n_s_beta);
  Py_CLEAR(clear_module_state->__pyx_n_s_biquad);
  Py_CLEAR(clear_module_state->__pyx_n_s_biquad_set_equal_gain_zeroes);
  Py_CLEAR(clear_module_state->__pyx_n_s_biquad_set_resonance);
  Py_CLEAR(clear_module_state->__pyx_n_s_buffer_size);
  Py_CLEAR(clear_module_state->__pyx_n_u_buffer_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_builtins);
  Py_CLEAR(clear_module_state->__pyx_n_s_c);
  Py_CLEAR(clear_module_state->__pyx_n_u_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_bool);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_double);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_int);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_longlong);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_void_p);
  Py_CLEAR(clear_module_state->__pyx_n_s_cache_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_cache_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_call);
  Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_be_converted_to_a_mus_fl);
  Py_CLEAR(clear_module_state->__pyx_n_s_cepstrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_chan);
  Py_CLEAR(clear_module_state->__pyx_n_u_chan);
  Py_CLEAR(clear_module_state->__pyx_n_s_channel);
  Py_CLEAR(clear_module_state->__pyx_n_s_channels);
  Py_CLEAR(clear_module_state->__pyx_kp_u_channels_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_channels_but);
  Py_CLEAR(clear_module_state->__pyx_n_s_chans);
  Py_CLEAR(clear_module_state->__pyx_n_s_chebyshev_t_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_chebyshev_tu_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_chebyshev_u_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_ndim);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_clamp);
  Py_CLEAR(clear_module_state->__pyx_n_s_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_clip);
  Py_CLEAR(clear_module_state->__pyx_n_s_clipped);
  Py_CLEAR(clear_module_state->__pyx_n_s_clm_reverb);
  Py_CLEAR(clear_module_state->__pyx_n_s_clm_reverb_locals_call);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_cls);
  Py_CLEAR(clear_module_state->__pyx_n_s_coeff);
  Py_CLEAR(clear_module_state->__pyx_n_s_coeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_collections);
  Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
  Py_CLEAR(clear_module_state->__pyx_n_s_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_combs);
  Py_CLEAR(clear_module_state->__pyx_n_s_comment);
  Py_CLEAR(clear_module_state->__pyx_n_s_compare_shapes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_compute_ratio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_compute_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_connection_function);
  Py_CLEAR(clear_module_state->__pyx_kp_s_context_manager_which_handles_c);
  Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
  Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
  Py_CLEAR(clear_module_state->__pyx_n_s_continue_frample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_continue_old_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_continue_sample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_contrast_enhancement);
  Py_CLEAR(clear_module_state->__pyx_n_s_convert_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_convolution);
  Py_CLEAR(clear_module_state->__pyx_n_s_convolve);
  Py_CLEAR(clear_module_state->__pyx_n_s_convolve_files);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_copyto);
  Py_CLEAR(clear_module_state->__pyx_n_s_correlate);
  Py_CLEAR(clear_module_state->__pyx_n_s_cos);
  Py_CLEAR(clear_module_state->__pyx_kp_u_count);
  Py_CLEAR(clear_module_state->__pyx_n_s_count_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ctypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_analyze_f_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_edit_f_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_inp_f_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_input_f_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_synthesize_f_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_d);
  Py_CLEAR(clear_module_state->__pyx_n_u_d);
  Py_CLEAR(clear_module_state->__pyx_n_u_darwin);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_data1);
  Py_CLEAR(clear_module_state->__pyx_n_s_data2);
  Py_CLEAR(clear_module_state->__pyx_n_s_db2linear);
  Py_CLEAR(clear_module_state->__pyx_n_s_dcblock);
  Py_CLEAR(clear_module_state->__pyx_n_s_dct);
  Py_CLEAR(clear_module_state->__pyx_n_s_default);
  Py_CLEAR(clear_module_state->__pyx_n_s_degree);
  Py_CLEAR(clear_module_state->__pyx_n_s_degrees);
  Py_CLEAR(clear_module_state->__pyx_n_s_degrees2radians);
  Py_CLEAR(clear_module_state->__pyx_n_s_delay);
  Py_CLEAR(clear_module_state->__pyx_n_s_delay_tick);
  Py_CLEAR(clear_module_state->__pyx_n_s_delay_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_delete_reverb);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_dim);
  Py_CLEAR(clear_module_state->__pyx_kp_u_dimemsions_but_received);
  Py_CLEAR(clear_module_state->__pyx_n_s_direction);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_distance);
  Py_CLEAR(clear_module_state->__pyx_n_s_distribution);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_does_not_exist);
  Py_CLEAR(clear_module_state->__pyx_n_s_dot_product);
  Py_CLEAR(clear_module_state->__pyx_n_s_double);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
  Py_CLEAR(clear_module_state->__pyx_kp_u_duration);
  Py_CLEAR(clear_module_state->__pyx_n_s_duration_2);
  Py_CLEAR(clear_module_state->__pyx_n_u_duration_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_edit);
  Py_CLEAR(clear_module_state->__pyx_n_s_edit_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_editcallback);
  Py_CLEAR(clear_module_state->__pyx_n_s_edot_product);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_enum);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enum_class_Header_not_importable);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enum_class_Sample_not_importable);
  Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
  Py_CLEAR(clear_module_state->__pyx_n_s_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_env_any);
  Py_CLEAR(clear_module_state->__pyx_n_s_env_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_env_rates);
  Py_CLEAR(clear_module_state->__pyx_n_s_envelope);
  Py_CLEAR(clear_module_state->__pyx_n_s_envelope_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_envfunction);
  Py_CLEAR(clear_module_state->__pyx_n_s_error);
  Py_CLEAR(clear_module_state->__pyx_n_s_even_multiple);
  Py_CLEAR(clear_module_state->__pyx_n_s_even_weight);
  Py_CLEAR(clear_module_state->__pyx_n_s_exists);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_exp);
  Py_CLEAR(clear_module_state->__pyx_n_s_expanduser);
  Py_CLEAR(clear_module_state->__pyx_n_s_expansion);
  Py_CLEAR(clear_module_state->__pyx_kp_u_expecting);
  Py_CLEAR(clear_module_state->__pyx_n_s_fabs);
  Py_CLEAR(clear_module_state->__pyx_n_s_fc);
  Py_CLEAR(clear_module_state->__pyx_n_s_fcombs);
  Py_CLEAR(clear_module_state->__pyx_n_s_feedback);
  Py_CLEAR(clear_module_state->__pyx_n_s_feedforward);
  Py_CLEAR(clear_module_state->__pyx_n_s_fft);
  Py_CLEAR(clear_module_state->__pyx_n_s_fft_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_fft_size);
  Py_CLEAR(clear_module_state->__pyx_kp_u_fft_size_must_be_a_positive_numb);
  Py_CLEAR(clear_module_state->__pyx_kp_u_fft_size_must_be_a_positive_numb_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_fft_size_must_be_power_of_2_not);
  Py_CLEAR(clear_module_state->__pyx_kp_u_fft_size_too_large_cannot_alloca);
  Py_CLEAR(clear_module_state->__pyx_n_s_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_file1);
  Py_CLEAR(clear_module_state->__pyx_n_s_file2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_file2frample);
  Py_CLEAR(clear_module_state->__pyx_n_s_file2frample_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_file2ndarray);
  Py_CLEAR(clear_module_state->__pyx_n_s_file2ndarray_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_file2sample);
  Py_CLEAR(clear_module_state->__pyx_n_s_file2sample_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_filename);
  Py_CLEAR(clear_module_state->__pyx_n_s_fill);
  Py_CLEAR(clear_module_state->__pyx_n_s_filt);
  Py_CLEAR(clear_module_state->__pyx_n_s_filt_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter);
  Py_CLEAR(clear_module_state->__pyx_kp_u_filter_list_contains_at_least_on);
  Py_CLEAR(clear_module_state->__pyx_kp_u_filter_list_contains_at_least_on_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_filtered_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_filtered_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_filtered_comb_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_filters);
  Py_CLEAR(clear_module_state->__pyx_n_s_finalize);
  Py_CLEAR(clear_module_state->__pyx_n_s_fir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_firmant);
  Py_CLEAR(clear_module_state->__pyx_n_s_flags);
  Py_CLEAR(clear_module_state->__pyx_n_s_fm);
  Py_CLEAR(clear_module_state->__pyx_n_s_fm_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_fmod);
  Py_CLEAR(clear_module_state->__pyx_n_s_fn);
  Py_CLEAR(clear_module_state->__pyx_n_s_formant);
  Py_CLEAR(clear_module_state->__pyx_n_s_formant_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
  Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
  Py_CLEAR(clear_module_state->__pyx_n_s_frample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_freq);
  Py_CLEAR(clear_module_state->__pyx_n_s_freqs);
  Py_CLEAR(clear_module_state->__pyx_n_s_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_u_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_func);
  Py_CLEAR(clear_module_state->__pyx_n_s_functools);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_channels);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_framples);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_srate);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_gettempdir);
  Py_CLEAR(clear_module_state->__pyx_kp_u_got);
  Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
  Py_CLEAR(clear_module_state->__pyx_n_s_granulate);
  Py_CLEAR(clear_module_state->__pyx_n_s_harms);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_no_meaningful_channels);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_no_meaningful_framples);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_no_meaningful_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_header_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_hi);
  Py_CLEAR(clear_module_state->__pyx_n_s_high);
  Py_CLEAR(clear_module_state->__pyx_n_s_hop);
  Py_CLEAR(clear_module_state->__pyx_n_s_hz);
  Py_CLEAR(clear_module_state->__pyx_n_s_hz2radians);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_idat);
  Py_CLEAR(clear_module_state->__pyx_n_s_iir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_imag);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_impulse_generator);
  Py_CLEAR(clear_module_state->__pyx_n_s_in_any);
  Py_CLEAR(clear_module_state->__pyx_n_s_ina);
  Py_CLEAR(clear_module_state->__pyx_n_s_inb);
  Py_CLEAR(clear_module_state->__pyx_n_s_ind);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_contents);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_element);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_phase);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_inp);
  Py_CLEAR(clear_module_state->__pyx_n_s_inp_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_input);
  Py_CLEAR(clear_module_state->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a);
  Py_CLEAR(clear_module_state->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_inputcallback);
  Py_CLEAR(clear_module_state->__pyx_n_s_inputs);
  Py_CLEAR(clear_module_state->__pyx_n_s_insig);
  Py_CLEAR(clear_module_state->__pyx_n_s_int);
  Py_CLEAR(clear_module_state->__pyx_n_s_int64);
  Py_CLEAR(clear_module_state->__pyx_n_s_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_interp_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_all_pass_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_array_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_asymmetric_fm);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_biquad);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_convolve);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_delay);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_even);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_file2frample);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_file2sample);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_filtered_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_filtered_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_fir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_firmant);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_formant);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_formant_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_frample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_granulate);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_iir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_list_or_ndarray);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_locsig);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_moving_average);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_moving_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_moving_norm);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_ncos);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_notch);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_nrxycos);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_nrxysin);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_nsin);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_odd);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_one_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_one_pole_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_one_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_oscil);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_oscil_bank);
  Py_CLEAR(clear_module_state->__pyx_kp_u_is_out_of_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_phase_vocoder);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_polyshape);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_polywave);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_power_of_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_pulse_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_pulsed_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_rand);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_rand_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_rxykcos);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_rxyksin);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_sample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_sawtooth_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_square_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_src);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_ssb_am);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_table_lookup);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_tap);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_triangle_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_two_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_two_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_wave_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_zero);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_isfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
  Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
  Py_CLEAR(clear_module_state->__pyx_n_s_jitter);
  Py_CLEAR(clear_module_state->__pyx_n_s_kind);
  Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_length);
  Py_CLEAR(clear_module_state->__pyx_kp_u_length_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_linear2db);
  Py_CLEAR(clear_module_state->__pyx_n_s_linspace);
  Py_CLEAR(clear_module_state->__pyx_n_u_linux);
  Py_CLEAR(clear_module_state->__pyx_n_s_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_lo);
  Py_CLEAR(clear_module_state->__pyx_n_s_loc);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig_ref);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig_reverb_ref);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig_reverb_set);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig_set);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsig_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_locsigdetourcallback);
  Py_CLEAR(clear_module_state->__pyx_n_s_log);
  Py_CLEAR(clear_module_state->__pyx_n_s_loop);
  Py_CLEAR(clear_module_state->__pyx_n_s_low);
  Py_CLEAR(clear_module_state->__pyx_n_s_mabs);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_all_pass_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_array_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_asymmetric_fm);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_band_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_band_reject);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_high_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_low_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_biquad_notch);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_convolve);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_convolve_locals_inp_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_dcblock);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_delay);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_fft_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_file2frample);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_file2sample);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_filtered_comb);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_filtered_comb_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_fir_coeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_fir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_firmant);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_formant);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_formant_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_frample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_granulate);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_granulate_locals_edit_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_granulate_locals_inp_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_iir_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_locsig);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_moving_average);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_moving_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_moving_norm);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_ncos);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_notch);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_nrxycos);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_nrxysin);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_nsin);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_one_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_one_pole_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_one_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_oscil);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_oscil_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_phase_vocoder);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_phase_vocoder_locals_analyz);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_phase_vocoder_locals_edit_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_phase_vocoder_locals_inp_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_phase_vocoder_locals_synthe);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_polyshape);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_polywave);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_pulse_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_pulsed_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_rand);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_rand_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_rxykcos);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_rxyksin);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_sample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_sawtooth_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_square_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_src);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_src_locals_inp_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_ssb_am);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_table_lookup);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_table_lookup_with_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_triangle_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_two_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_two_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_wave_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_wave_train_with_env);
  Py_CLEAR(clear_module_state->__pyx_kp_s_many_useful_windows);
  Py_CLEAR(clear_module_state->__pyx_n_s_map);
  Py_CLEAR(clear_module_state->__pyx_n_s_math);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_size);
  Py_CLEAR(clear_module_state->__pyx_kp_u_maxamp);
  Py_CLEAR(clear_module_state->__pyx_n_s_maxamp_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_maxamp_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_member_names);
  Py_CLEAR(clear_module_state->__pyx_n_s_members);
  Py_CLEAR(clear_module_state->__pyx_n_s_memview);
  Py_CLEAR(clear_module_state->__pyx_n_s_message);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_module_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_move_locsig);
  Py_CLEAR(clear_module_state->__pyx_n_s_moving_average);
  Py_CLEAR(clear_module_state->__pyx_n_s_moving_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_moving_norm);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_array);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_array___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_array___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_cache_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_cache_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_mus_reset);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_set_up_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_set_up_pv_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_set_up_xcoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_any_set_up_ycoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_autocorrelate);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_cepstrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_channels);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_convolution);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_correlate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_mus_data_can_not_be_called_on);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_fft);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_interpolate);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_is_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_is_output);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_order);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_polar2rectangular);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_rectangular2magnitudes);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_rectangular2polar);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_reset);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_spectrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_xcoeffs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_mus_xcoeffs_can_not_be_called_on);
  Py_CLEAR(clear_module_state->__pyx_n_s_mus_ycoeffs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_mus_ycoeffs_can_not_be_called_on);
  Py_CLEAR(clear_module_state->__pyx_n_s_n);
  Py_CLEAR(clear_module_state->__pyx_n_u_n);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ncos);
  Py_CLEAR(clear_module_state->__pyx_n_s_ndarray2file);
  Py_CLEAR(clear_module_state->__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_ndarrays_of_unequal_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
  Py_CLEAR(clear_module_state->__pyx_n_u_ndim);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_power_of_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_CLEAR(clear_module_state->__pyx_kp_u_no_player_specified);
  Py_CLEAR(clear_module_state->__pyx_n_s_norm);
  Py_CLEAR(clear_module_state->__pyx_n_s_norm_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_normalize);
  Py_CLEAR(clear_module_state->__pyx_n_s_normalize_partials);
  Py_CLEAR(clear_module_state->__pyx_kp_u_not_supported);
  Py_CLEAR(clear_module_state->__pyx_n_s_notch);
  Py_CLEAR(clear_module_state->__pyx_n_s_notch_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_np);
  Py_CLEAR(clear_module_state->__pyx_kp_s_npt_NDArray_np_float64);
  Py_CLEAR(clear_module_state->__pyx_n_s_nrxycos);
  Py_CLEAR(clear_module_state->__pyx_n_s_nrxysin);
  Py_CLEAR(clear_module_state->__pyx_n_s_nsin);
  Py_CLEAR(clear_module_state->__pyx_n_s_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
  Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to);
  Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj);
  Py_CLEAR(clear_module_state->__pyx_n_s_object);
  Py_CLEAR(clear_module_state->__pyx_kp_u_object_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_odd_multiple);
  Py_CLEAR(clear_module_state->__pyx_n_s_odd_weight);
  Py_CLEAR(clear_module_state->__pyx_n_s_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_old_srate);
  Py_CLEAR(clear_module_state->__pyx_n_s_omega_t);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_pole_all_pass);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_open);
  Py_CLEAR(clear_module_state->__pyx_n_s_order);
  Py_CLEAR(clear_module_state->__pyx_n_s_orig_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_os);
  Py_CLEAR(clear_module_state->__pyx_n_s_oscil);
  Py_CLEAR(clear_module_state->__pyx_n_s_oscil_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_oscil_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_out_any);
  Py_CLEAR(clear_module_state->__pyx_n_s_out_bank);
  Py_CLEAR(clear_module_state->__pyx_n_s_outa);
  Py_CLEAR(clear_module_state->__pyx_n_s_outb);
  Py_CLEAR(clear_module_state->__pyx_n_s_outc);
  Py_CLEAR(clear_module_state->__pyx_n_s_outd);
  Py_CLEAR(clear_module_state->__pyx_n_s_output);
  Py_CLEAR(clear_module_state->__pyx_kp_u_output_needs_to_be_a_clm_gen_or);
  Py_CLEAR(clear_module_state->__pyx_n_s_output_to_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_outputfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_overlap);
  Py_CLEAR(clear_module_state->__pyx_n_s_pack);
  Py_CLEAR(clear_module_state->__pyx_n_s_parents);
  Py_CLEAR(clear_module_state->__pyx_n_s_partial);
  Py_CLEAR(clear_module_state->__pyx_n_s_partials);
  Py_CLEAR(clear_module_state->__pyx_n_s_partials2polynomial);
  Py_CLEAR(clear_module_state->__pyx_n_s_partials2wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_perf_counter);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_delay);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_partials2wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder_amp_increments);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder_amps);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder_freqs);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder_phase_increments);
  Py_CLEAR(clear_module_state->__pyx_n_s_phase_vocoder_phases);
  Py_CLEAR(clear_module_state->__pyx_n_s_phases);
  Py_CLEAR(clear_module_state->__pyx_n_s_pi);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_pitch);
  Py_CLEAR(clear_module_state->__pyx_n_s_platform);
  Py_CLEAR(clear_module_state->__pyx_n_s_play);
  Py_CLEAR(clear_module_state->__pyx_n_s_player);
  Py_CLEAR(clear_module_state->__pyx_n_s_pm);
  Py_CLEAR(clear_module_state->__pyx_n_s_polar2rectangular);
  Py_CLEAR(clear_module_state->__pyx_n_s_polynomial);
  Py_CLEAR(clear_module_state->__pyx_n_s_polyshape);
  Py_CLEAR(clear_module_state->__pyx_n_s_polyshape_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_polywave);
  Py_CLEAR(clear_module_state->__pyx_n_s_polywave_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_print);
  Py_CLEAR(clear_module_state->__pyx_n_s_pulse_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_pulse_train_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_pulsed_env);
  Py_CLEAR(clear_module_state->__pyx_n_s_pulsed_env_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_kp_u_pysndlib);
  Py_CLEAR(clear_module_state->__pyx_n_s_pysndlib_clm);
  Py_CLEAR(clear_module_state->__pyx_n_s_pysndlib_sndlib);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle___Pyx_EnumMeta);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_array_readin_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_q);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_r);
  Py_CLEAR(clear_module_state->__pyx_n_u_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_radians);
  Py_CLEAR(clear_module_state->__pyx_n_s_radians2degrees);
  Py_CLEAR(clear_module_state->__pyx_n_s_radians2hz);
  Py_CLEAR(clear_module_state->__pyx_n_s_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_ramp);
  Py_CLEAR(clear_module_state->__pyx_n_s_rand);
  Py_CLEAR(clear_module_state->__pyx_n_s_rand_interp);
  Py_CLEAR(clear_module_state->__pyx_n_s_rand_interp_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_rand_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_random);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_rdat);
  Py_CLEAR(clear_module_state->__pyx_n_s_read);
  Py_CLEAR(clear_module_state->__pyx_n_s_reader);
  Py_CLEAR(clear_module_state->__pyx_kp_u_readin);
  Py_CLEAR(clear_module_state->__pyx_n_s_readin_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_real);
  Py_CLEAR(clear_module_state->__pyx_n_s_rectangular2magnitudes);
  Py_CLEAR(clear_module_state->__pyx_n_s_rectangular2polar);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_register);
  Py_CLEAR(clear_module_state->__pyx_n_s_repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_res);
  Py_CLEAR(clear_module_state->__pyx_n_s_reshape);
  Py_CLEAR(clear_module_state->__pyx_n_s_resize);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverb);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverb_channels);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverb_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverb_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverb_to_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_revfile);
  Py_CLEAR(clear_module_state->__pyx_kp_u_revmax);
  Py_CLEAR(clear_module_state->__pyx_n_s_revout);
  Py_CLEAR(clear_module_state->__pyx_n_s_ring_modulate);
  Py_CLEAR(clear_module_state->__pyx_n_s_rl1);
  Py_CLEAR(clear_module_state->__pyx_n_s_rl2);
  Py_CLEAR(clear_module_state->__pyx_n_s_run);
  Py_CLEAR(clear_module_state->__pyx_n_s_rxykcos);
  Py_CLEAR(clear_module_state->__pyx_n_s_rxyksin);
  Py_CLEAR(clear_module_state->__pyx_n_s_s1);
  Py_CLEAR(clear_module_state->__pyx_n_s_s2);
  Py_CLEAR(clear_module_state->__pyx_n_s_s3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_samp);
  Py_CLEAR(clear_module_state->__pyx_n_s_sample2file);
  Py_CLEAR(clear_module_state->__pyx_n_s_sample_type);
  Py_CLEAR(clear_module_state->__pyx_kp_u_samples);
  Py_CLEAR(clear_module_state->__pyx_n_s_samples2seconds);
  Py_CLEAR(clear_module_state->__pyx_n_s_samples_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_sawtooth_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_scaled_by);
  Py_CLEAR(clear_module_state->__pyx_n_s_scaled_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_scaler);
  Py_CLEAR(clear_module_state->__pyx_kp_u_seconds);
  Py_CLEAR(clear_module_state->__pyx_n_s_seconds2samples);
  Py_CLEAR(clear_module_state->__pyx_kp_u_seconds_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_secs);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_send);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_srate);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_up_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_up_pv_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_up_xcoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_up_ycoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_sign);
  Py_CLEAR(clear_module_state->__pyx_n_s_sin);
  Py_CLEAR(clear_module_state->__pyx_n_s_size);
  Py_CLEAR(clear_module_state->__pyx_n_u_size);
  Py_CLEAR(clear_module_state->__pyx_kp_u_size_fft);
  Py_CLEAR(clear_module_state->__pyx_n_s_sndplay);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_spectrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_sqrt);
  Py_CLEAR(clear_module_state->__pyx_n_s_square_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_sr);
  Py_CLEAR(clear_module_state->__pyx_n_s_sr_change);
  Py_CLEAR(clear_module_state->__pyx_n_s_srate);
  Py_CLEAR(clear_module_state->__pyx_n_u_srate);
  Py_CLEAR(clear_module_state->__pyx_n_s_src);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pysndlib_clm_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_ssb_am);
  Py_CLEAR(clear_module_state->__pyx_n_s_ssb_am_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_stable);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_u_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_startswith);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_statistics);
  Py_CLEAR(clear_module_state->__pyx_n_s_statstr);
  Py_CLEAR(clear_module_state->__pyx_n_s_step);
  Py_CLEAR(clear_module_state->__pyx_n_s_stop);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_str_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
  Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
  Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_s_struct);
  Py_CLEAR(clear_module_state->__pyx_n_s_subprocess);
  Py_CLEAR(clear_module_state->__pyx_n_s_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_sweep);
  Py_CLEAR(clear_module_state->__pyx_n_s_synthesize);
  Py_CLEAR(clear_module_state->__pyx_n_s_synthesize_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_synthesizecallback);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_lookup);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_lookup_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_tan);
  Py_CLEAR(clear_module_state->__pyx_n_s_tap);
  Py_CLEAR(clear_module_state->__pyx_n_s_tap_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_tcoeffs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_temp);
  Py_CLEAR(clear_module_state->__pyx_n_s_tempfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_kp_u_test_aif);
  Py_CLEAR(clear_module_state->__pyx_kp_u_test_rev);
  Py_CLEAR(clear_module_state->__pyx_kp_u_test_wav);
  Py_CLEAR(clear_module_state->__pyx_kp_u_this_class_cannot_be_instantiate);
  Py_CLEAR(clear_module_state->__pyx_kp_s_this_is_general_class_to_raise);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_tic);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_times);
  Py_CLEAR(clear_module_state->__pyx_n_s_times_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_partials);
  Py_CLEAR(clear_module_state->__pyx_n_s_toc);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangle_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangle_wave_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_two_pole);
  Py_CLEAR(clear_module_state->__pyx_n_s_two_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_types);
  Py_CLEAR(clear_module_state->__pyx_kp_s_types_of_normalizations_when_us);
  Py_CLEAR(clear_module_state->__pyx_n_s_ucoeffs);
  Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
  Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_kp_s_used_for_polynomial_based_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_v);
  Py_CLEAR(clear_module_state->__pyx_n_s_val);
  Py_CLEAR(clear_module_state->__pyx_n_s_validate_envelope);
  Py_CLEAR(clear_module_state->__pyx_n_s_validate_envelope_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_vals);
  Py_CLEAR(clear_module_state->__pyx_n_s_vals_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_values);
  Py_CLEAR(clear_module_state->__pyx_kp_s_various_interpolation_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_verbose);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_vs);
  Py_CLEAR(clear_module_state->__pyx_n_s_warn);
  Py_CLEAR(clear_module_state->__pyx_n_s_warnings);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_train);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_train_unmodulated);
  Py_CLEAR(clear_module_state->__pyx_n_s_width);
  Py_CLEAR(clear_module_state->__pyx_n_u_width);
  Py_CLEAR(clear_module_state->__pyx_n_s_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_window_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_wrap);
  Py_CLEAR(clear_module_state->__pyx_n_s_wraps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_writing_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_kp_u_x_values_of_envelope_must_be_inc);
  Py_CLEAR(clear_module_state->__pyx_n_s_xcoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_y1);
  Py_CLEAR(clear_module_state->__pyx_n_s_ycoeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_zeros);
  Py_CLEAR(clear_module_state->__pyx_n_s_zip);
  Py_CLEAR(clear_module_state->__pyx_float__4);
  Py_CLEAR(clear_module_state->__pyx_float__5);
  Py_CLEAR(clear_module_state->__pyx_float__6);
  Py_CLEAR(clear_module_state->__pyx_float_0_);
  Py_CLEAR(clear_module_state->__pyx_float_1_);
  Py_CLEAR(clear_module_state->__pyx_float__05);
  Py_CLEAR(clear_module_state->__pyx_float__15);
  Py_CLEAR(clear_module_state->__pyx_float_0_0);
  Py_CLEAR(clear_module_state->__pyx_float_1_0);
  Py_CLEAR(clear_module_state->__pyx_float_2_0);
  Py_CLEAR(clear_module_state->__pyx_float_neg__99);
  Py_CLEAR(clear_module_state->__pyx_float_neg_1_0);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_3);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_40);
  Py_CLEAR(clear_module_state->__pyx_int_128);
  Py_CLEAR(clear_module_state->__pyx_int_512);
  Py_CLEAR(clear_module_state->__pyx_int_44100);
  Py_CLEAR(clear_module_state->__pyx_int_65536);
  Py_CLEAR(clear_module_state->__pyx_int_49617724);
  Py_CLEAR(clear_module_state->__pyx_int_112105877);
  Py_CLEAR(clear_module_state->__pyx_int_136983863);
  Py_CLEAR(clear_module_state->__pyx_int_184977713);
  Py_CLEAR(clear_module_state->__pyx_int_185414130);
  Py_CLEAR(clear_module_state->__pyx_int_222419149);
  Py_CLEAR(clear_module_state->__pyx_int_228825662);
  Py_CLEAR(clear_module_state->__pyx_int_232027208);
  Py_CLEAR(clear_module_state->__pyx_int_238750788);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_k__33);
  Py_CLEAR(clear_module_state->__pyx_k__35);
  Py_CLEAR(clear_module_state->__pyx_slice__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__4);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_slice__21);
  Py_CLEAR(clear_module_state->__pyx_slice__25);
  Py_CLEAR(clear_module_state->__pyx_slice__30);
  Py_CLEAR(clear_module_state->__pyx_slice__31);
  Py_CLEAR(clear_module_state->__pyx_tuple__10);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__12);
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__23);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__41);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__49);
  Py_CLEAR(clear_module_state->__pyx_tuple__50);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__64);
  Py_CLEAR(clear_module_state->__pyx_tuple__67);
  Py_CLEAR(clear_module_state->__pyx_tuple__70);
  Py_CLEAR(clear_module_state->__pyx_tuple__71);
  Py_CLEAR(clear_module_state->__pyx_tuple__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__78);
  Py_CLEAR(clear_module_state->__pyx_tuple__84);
  Py_CLEAR(clear_module_state->__pyx_tuple__86);
  Py_CLEAR(clear_module_state->__pyx_tuple__87);
  Py_CLEAR(clear_module_state->__pyx_tuple__88);
  Py_CLEAR(clear_module_state->__pyx_tuple__89);
  Py_CLEAR(clear_module_state->__pyx_tuple__90);
  Py_CLEAR(clear_module_state->__pyx_tuple__91);
  Py_CLEAR(clear_module_state->__pyx_tuple__92);
  Py_CLEAR(clear_module_state->__pyx_tuple__93);
  Py_CLEAR(clear_module_state->__pyx_tuple__94);
  Py_CLEAR(clear_module_state->__pyx_tuple__96);
  Py_CLEAR(clear_module_state->__pyx_tuple__97);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__99);
  Py_CLEAR(clear_module_state->__pyx_tuple__101);
  Py_CLEAR(clear_module_state->__pyx_tuple__103);
  Py_CLEAR(clear_module_state->__pyx_tuple__104);
  Py_CLEAR(clear_module_state->__pyx_tuple__106);
  Py_CLEAR(clear_module_state->__pyx_tuple__107);
  Py_CLEAR(clear_module_state->__pyx_tuple__109);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__114);
  Py_CLEAR(clear_module_state->__pyx_tuple__119);
  Py_CLEAR(clear_module_state->__pyx_tuple__121);
  Py_CLEAR(clear_module_state->__pyx_tuple__126);
  Py_CLEAR(clear_module_state->__pyx_tuple__128);
  Py_CLEAR(clear_module_state->__pyx_tuple__130);
  Py_CLEAR(clear_module_state->__pyx_tuple__131);
  Py_CLEAR(clear_module_state->__pyx_tuple__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__133);
  Py_CLEAR(clear_module_state->__pyx_tuple__135);
  Py_CLEAR(clear_module_state->__pyx_tuple__138);
  Py_CLEAR(clear_module_state->__pyx_tuple__140);
  Py_CLEAR(clear_module_state->__pyx_tuple__144);
  Py_CLEAR(clear_module_state->__pyx_tuple__146);
  Py_CLEAR(clear_module_state->__pyx_tuple__156);
  Py_CLEAR(clear_module_state->__pyx_tuple__157);
  Py_CLEAR(clear_module_state->__pyx_tuple__160);
  Py_CLEAR(clear_module_state->__pyx_tuple__164);
  Py_CLEAR(clear_module_state->__pyx_tuple__166);
  Py_CLEAR(clear_module_state->__pyx_tuple__168);
  Py_CLEAR(clear_module_state->__pyx_tuple__173);
  Py_CLEAR(clear_module_state->__pyx_tuple__178);
  Py_CLEAR(clear_module_state->__pyx_tuple__180);
  Py_CLEAR(clear_module_state->__pyx_tuple__182);
  Py_CLEAR(clear_module_state->__pyx_tuple__184);
  Py_CLEAR(clear_module_state->__pyx_tuple__186);
  Py_CLEAR(clear_module_state->__pyx_tuple__188);
  Py_CLEAR(clear_module_state->__pyx_tuple__190);
  Py_CLEAR(clear_module_state->__pyx_tuple__191);
  Py_CLEAR(clear_module_state->__pyx_tuple__193);
  Py_CLEAR(clear_module_state->__pyx_tuple__195);
  Py_CLEAR(clear_module_state->__pyx_tuple__198);
  Py_CLEAR(clear_module_state->__pyx_tuple__200);
  Py_CLEAR(clear_module_state->__pyx_tuple__201);
  Py_CLEAR(clear_module_state->__pyx_tuple__203);
  Py_CLEAR(clear_module_state->__pyx_tuple__204);
  Py_CLEAR(clear_module_state->__pyx_tuple__207);
  Py_CLEAR(clear_module_state->__pyx_tuple__214);
  Py_CLEAR(clear_module_state->__pyx_tuple__217);
  Py_CLEAR(clear_module_state->__pyx_tuple__219);
  Py_CLEAR(clear_module_state->__pyx_tuple__221);
  Py_CLEAR(clear_module_state->__pyx_tuple__228);
  Py_CLEAR(clear_module_state->__pyx_tuple__230);
  Py_CLEAR(clear_module_state->__pyx_tuple__232);
  Py_CLEAR(clear_module_state->__pyx_tuple__233);
  Py_CLEAR(clear_module_state->__pyx_tuple__235);
  Py_CLEAR(clear_module_state->__pyx_tuple__237);
  Py_CLEAR(clear_module_state->__pyx_tuple__239);
  Py_CLEAR(clear_module_state->__pyx_tuple__241);
  Py_CLEAR(clear_module_state->__pyx_tuple__243);
  Py_CLEAR(clear_module_state->__pyx_tuple__245);
  Py_CLEAR(clear_module_state->__pyx_tuple__246);
  Py_CLEAR(clear_module_state->__pyx_tuple__248);
  Py_CLEAR(clear_module_state->__pyx_tuple__251);
  Py_CLEAR(clear_module_state->__pyx_tuple__253);
  Py_CLEAR(clear_module_state->__pyx_tuple__256);
  Py_CLEAR(clear_module_state->__pyx_tuple__258);
  Py_CLEAR(clear_module_state->__pyx_tuple__261);
  Py_CLEAR(clear_module_state->__pyx_tuple__265);
  Py_CLEAR(clear_module_state->__pyx_tuple__267);
  Py_CLEAR(clear_module_state->__pyx_tuple__269);
  Py_CLEAR(clear_module_state->__pyx_tuple__271);
  Py_CLEAR(clear_module_state->__pyx_tuple__274);
  Py_CLEAR(clear_module_state->__pyx_tuple__277);
  Py_CLEAR(clear_module_state->__pyx_tuple__280);
  Py_CLEAR(clear_module_state->__pyx_tuple__282);
  Py_CLEAR(clear_module_state->__pyx_tuple__285);
  Py_CLEAR(clear_module_state->__pyx_tuple__288);
  Py_CLEAR(clear_module_state->__pyx_tuple__290);
  Py_CLEAR(clear_module_state->__pyx_tuple__292);
  Py_CLEAR(clear_module_state->__pyx_tuple__293);
  Py_CLEAR(clear_module_state->__pyx_tuple__295);
  Py_CLEAR(clear_module_state->__pyx_tuple__297);
  Py_CLEAR(clear_module_state->__pyx_tuple__300);
  Py_CLEAR(clear_module_state->__pyx_tuple__304);
  Py_CLEAR(clear_module_state->__pyx_tuple__306);
  Py_CLEAR(clear_module_state->__pyx_tuple__310);
  Py_CLEAR(clear_module_state->__pyx_tuple__314);
  Py_CLEAR(clear_module_state->__pyx_tuple__317);
  Py_CLEAR(clear_module_state->__pyx_tuple__320);
  Py_CLEAR(clear_module_state->__pyx_tuple__324);
  Py_CLEAR(clear_module_state->__pyx_tuple__326);
  Py_CLEAR(clear_module_state->__pyx_tuple__328);
  Py_CLEAR(clear_module_state->__pyx_tuple__330);
  Py_CLEAR(clear_module_state->__pyx_tuple__333);
  Py_CLEAR(clear_module_state->__pyx_tuple__335);
  Py_CLEAR(clear_module_state->__pyx_tuple__337);
  Py_CLEAR(clear_module_state->__pyx_tuple__339);
  Py_CLEAR(clear_module_state->__pyx_tuple__341);
  Py_CLEAR(clear_module_state->__pyx_tuple__344);
  Py_CLEAR(clear_module_state->__pyx_tuple__346);
  Py_CLEAR(clear_module_state->__pyx_tuple__348);
  Py_CLEAR(clear_module_state->__pyx_tuple__350);
  Py_CLEAR(clear_module_state->__pyx_tuple__351);
  Py_CLEAR(clear_module_state->__pyx_tuple__353);
  Py_CLEAR(clear_module_state->__pyx_tuple__354);
  Py_CLEAR(clear_module_state->__pyx_tuple__357);
  Py_CLEAR(clear_module_state->__pyx_tuple__360);
  Py_CLEAR(clear_module_state->__pyx_tuple__364);
  Py_CLEAR(clear_module_state->__pyx_tuple__366);
  Py_CLEAR(clear_module_state->__pyx_tuple__367);
  Py_CLEAR(clear_module_state->__pyx_tuple__369);
  Py_CLEAR(clear_module_state->__pyx_tuple__373);
  Py_CLEAR(clear_module_state->__pyx_tuple__375);
  Py_CLEAR(clear_module_state->__pyx_tuple__378);
  Py_CLEAR(clear_module_state->__pyx_tuple__382);
  Py_CLEAR(clear_module_state->__pyx_tuple__386);
  Py_CLEAR(clear_module_state->__pyx_tuple__390);
  Py_CLEAR(clear_module_state->__pyx_tuple__394);
  Py_CLEAR(clear_module_state->__pyx_tuple__396);
  Py_CLEAR(clear_module_state->__pyx_tuple__398);
  Py_CLEAR(clear_module_state->__pyx_tuple__400);
  Py_CLEAR(clear_module_state->__pyx_tuple__402);
  Py_CLEAR(clear_module_state->__pyx_tuple__407);
  Py_CLEAR(clear_module_state->__pyx_tuple__409);
  Py_CLEAR(clear_module_state->__pyx_tuple__413);
  Py_CLEAR(clear_module_state->__pyx_tuple__417);
  Py_CLEAR(clear_module_state->__pyx_tuple__421);
  Py_CLEAR(clear_module_state->__pyx_tuple__423);
  Py_CLEAR(clear_module_state->__pyx_tuple__425);
  Py_CLEAR(clear_module_state->__pyx_tuple__427);
  Py_CLEAR(clear_module_state->__pyx_tuple__430);
  Py_CLEAR(clear_module_state->__pyx_tuple__432);
  Py_CLEAR(clear_module_state->__pyx_tuple__436);
  Py_CLEAR(clear_module_state->__pyx_tuple__440);
  Py_CLEAR(clear_module_state->__pyx_tuple__444);
  Py_CLEAR(clear_module_state->__pyx_tuple__447);
  Py_CLEAR(clear_module_state->__pyx_tuple__450);
  Py_CLEAR(clear_module_state->__pyx_tuple__454);
  Py_CLEAR(clear_module_state->__pyx_tuple__457);
  Py_CLEAR(clear_module_state->__pyx_tuple__460);
  Py_CLEAR(clear_module_state->__pyx_tuple__464);
  Py_CLEAR(clear_module_state->__pyx_tuple__468);
  Py_CLEAR(clear_module_state->__pyx_tuple__472);
  Py_CLEAR(clear_module_state->__pyx_tuple__474);
  Py_CLEAR(clear_module_state->__pyx_tuple__478);
  Py_CLEAR(clear_module_state->__pyx_tuple__481);
  Py_CLEAR(clear_module_state->__pyx_tuple__483);
  Py_CLEAR(clear_module_state->__pyx_tuple__486);
  Py_CLEAR(clear_module_state->__pyx_tuple__488);
  Py_CLEAR(clear_module_state->__pyx_tuple__490);
  Py_CLEAR(clear_module_state->__pyx_tuple__493);
  Py_CLEAR(clear_module_state->__pyx_tuple__495);
  Py_CLEAR(clear_module_state->__pyx_tuple__498);
  Py_CLEAR(clear_module_state->__pyx_tuple__500);
  Py_CLEAR(clear_module_state->__pyx_tuple__501);
  Py_CLEAR(clear_module_state->__pyx_tuple__504);
  Py_CLEAR(clear_module_state->__pyx_tuple__507);
  Py_CLEAR(clear_module_state->__pyx_tuple__511);
  Py_CLEAR(clear_module_state->__pyx_tuple__515);
  Py_CLEAR(clear_module_state->__pyx_tuple__517);
  Py_CLEAR(clear_module_state->__pyx_tuple__520);
  Py_CLEAR(clear_module_state->__pyx_tuple__522);
  Py_CLEAR(clear_module_state->__pyx_tuple__524);
  Py_CLEAR(clear_module_state->__pyx_tuple__526);
  Py_CLEAR(clear_module_state->__pyx_tuple__530);
  Py_CLEAR(clear_module_state->__pyx_tuple__532);
  Py_CLEAR(clear_module_state->__pyx_tuple__534);
  Py_CLEAR(clear_module_state->__pyx_tuple__536);
  Py_CLEAR(clear_module_state->__pyx_tuple__538);
  Py_CLEAR(clear_module_state->__pyx_tuple__546);
  Py_CLEAR(clear_module_state->__pyx_tuple__548);
  Py_CLEAR(clear_module_state->__pyx_tuple__553);
  Py_CLEAR(clear_module_state->__pyx_tuple__555);
  Py_CLEAR(clear_module_state->__pyx_tuple__557);
  Py_CLEAR(clear_module_state->__pyx_tuple__560);
  Py_CLEAR(clear_module_state->__pyx_tuple__562);
  Py_CLEAR(clear_module_state->__pyx_tuple__565);
  Py_CLEAR(clear_module_state->__pyx_tuple__567);
  Py_CLEAR(clear_module_state->__pyx_tuple__571);
  Py_CLEAR(clear_module_state->__pyx_tuple__573);
  Py_CLEAR(clear_module_state->__pyx_tuple__575);
  Py_CLEAR(clear_module_state->__pyx_tuple__578);
  Py_CLEAR(clear_module_state->__pyx_tuple__582);
  Py_CLEAR(clear_module_state->__pyx_tuple__584);
  Py_CLEAR(clear_module_state->__pyx_tuple__590);
  Py_CLEAR(clear_module_state->__pyx_tuple__592);
  Py_CLEAR(clear_module_state->__pyx_tuple__597);
  Py_CLEAR(clear_module_state->__pyx_tuple__599);
  Py_CLEAR(clear_module_state->__pyx_tuple__602);
  Py_CLEAR(clear_module_state->__pyx_tuple__605);
  Py_CLEAR(clear_module_state->__pyx_tuple__607);
  Py_CLEAR(clear_module_state->__pyx_tuple__609);
  Py_CLEAR(clear_module_state->__pyx_tuple__610);
  Py_CLEAR(clear_module_state->__pyx_tuple__612);
  Py_CLEAR(clear_module_state->__pyx_tuple__614);
  Py_CLEAR(clear_module_state->__pyx_tuple__616);
  Py_CLEAR(clear_module_state->__pyx_tuple__618);
  Py_CLEAR(clear_module_state->__pyx_tuple__622);
  Py_CLEAR(clear_module_state->__pyx_tuple__627);
  Py_CLEAR(clear_module_state->__pyx_codeobj__51);
  Py_CLEAR(clear_module_state->__pyx_codeobj__52);
  Py_CLEAR(clear_module_state->__pyx_codeobj__53);
  Py_CLEAR(clear_module_state->__pyx_codeobj__55);
  Py_CLEAR(clear_module_state->__pyx_codeobj__56);
  Py_CLEAR(clear_module_state->__pyx_codeobj__57);
  Py_CLEAR(clear_module_state->__pyx_codeobj__59);
  Py_CLEAR(clear_module_state->__pyx_codeobj__60);
  Py_CLEAR(clear_module_state->__pyx_codeobj__65);
  Py_CLEAR(clear_module_state->__pyx_codeobj__66);
  Py_CLEAR(clear_module_state->__pyx_codeobj__68);
  Py_CLEAR(clear_module_state->__pyx_codeobj__69);
  Py_CLEAR(clear_module_state->__pyx_codeobj__72);
  Py_CLEAR(clear_module_state->__pyx_codeobj__74);
  Py_CLEAR(clear_module_state->__pyx_codeobj__76);
  Py_CLEAR(clear_module_state->__pyx_codeobj__79);
  Py_CLEAR(clear_module_state->__pyx_codeobj__80);
  Py_CLEAR(clear_module_state->__pyx_codeobj__81);
  Py_CLEAR(clear_module_state->__pyx_codeobj__82);
  Py_CLEAR(clear_module_state->__pyx_codeobj__83);
  Py_CLEAR(clear_module_state->__pyx_codeobj__85);
  Py_CLEAR(clear_module_state->__pyx_codeobj__95);
  Py_CLEAR(clear_module_state->__pyx_codeobj__100);
  Py_CLEAR(clear_module_state->__pyx_codeobj__102);
  Py_CLEAR(clear_module_state->__pyx_codeobj__105);
  Py_CLEAR(clear_module_state->__pyx_codeobj__108);
  Py_CLEAR(clear_module_state->__pyx_codeobj__110);
  Py_CLEAR(clear_module_state->__pyx_codeobj__111);
  Py_CLEAR(clear_module_state->__pyx_codeobj__113);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__116);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__118);
  Py_CLEAR(clear_module_state->__pyx_codeobj__120);
  Py_CLEAR(clear_module_state->__pyx_codeobj__122);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__124);
  Py_CLEAR(clear_module_state->__pyx_codeobj__125);
  Py_CLEAR(clear_module_state->__pyx_codeobj__127);
  Py_CLEAR(clear_module_state->__pyx_codeobj__129);
  Py_CLEAR(clear_module_state->__pyx_codeobj__134);
  Py_CLEAR(clear_module_state->__pyx_codeobj__136);
  Py_CLEAR(clear_module_state->__pyx_codeobj__139);
  Py_CLEAR(clear_module_state->__pyx_codeobj__141);
  Py_CLEAR(clear_module_state->__pyx_codeobj__142);
  Py_CLEAR(clear_module_state->__pyx_codeobj__143);
  Py_CLEAR(clear_module_state->__pyx_codeobj__145);
  Py_CLEAR(clear_module_state->__pyx_codeobj__147);
  Py_CLEAR(clear_module_state->__pyx_codeobj__148);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__150);
  Py_CLEAR(clear_module_state->__pyx_codeobj__151);
  Py_CLEAR(clear_module_state->__pyx_codeobj__152);
  Py_CLEAR(clear_module_state->__pyx_codeobj__153);
  Py_CLEAR(clear_module_state->__pyx_codeobj__154);
  Py_CLEAR(clear_module_state->__pyx_codeobj__155);
  Py_CLEAR(clear_module_state->__pyx_codeobj__158);
  Py_CLEAR(clear_module_state->__pyx_codeobj__159);
  Py_CLEAR(clear_module_state->__pyx_codeobj__161);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__163);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__167);
  Py_CLEAR(clear_module_state->__pyx_codeobj__169);
  Py_CLEAR(clear_module_state->__pyx_codeobj__170);
  Py_CLEAR(clear_module_state->__pyx_codeobj__171);
  Py_CLEAR(clear_module_state->__pyx_codeobj__172);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__175);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  Py_CLEAR(clear_module_state->__pyx_codeobj__177);
  Py_CLEAR(clear_module_state->__pyx_codeobj__179);
  Py_CLEAR(clear_module_state->__pyx_codeobj__181);
  Py_CLEAR(clear_module_state->__pyx_codeobj__183);
  Py_CLEAR(clear_module_state->__pyx_codeobj__185);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__189);
  Py_CLEAR(clear_module_state->__pyx_codeobj__192);
  Py_CLEAR(clear_module_state->__pyx_codeobj__194);
  Py_CLEAR(clear_module_state->__pyx_codeobj__196);
  Py_CLEAR(clear_module_state->__pyx_codeobj__197);
  Py_CLEAR(clear_module_state->__pyx_codeobj__199);
  Py_CLEAR(clear_module_state->__pyx_codeobj__202);
  Py_CLEAR(clear_module_state->__pyx_codeobj__205);
  Py_CLEAR(clear_module_state->__pyx_codeobj__206);
  Py_CLEAR(clear_module_state->__pyx_codeobj__208);
  Py_CLEAR(clear_module_state->__pyx_codeobj__209);
  Py_CLEAR(clear_module_state->__pyx_codeobj__210);
  Py_CLEAR(clear_module_state->__pyx_codeobj__211);
  Py_CLEAR(clear_module_state->__pyx_codeobj__212);
  Py_CLEAR(clear_module_state->__pyx_codeobj__213);
  Py_CLEAR(clear_module_state->__pyx_codeobj__215);
  Py_CLEAR(clear_module_state->__pyx_codeobj__216);
  Py_CLEAR(clear_module_state->__pyx_codeobj__218);
  Py_CLEAR(clear_module_state->__pyx_codeobj__220);
  Py_CLEAR(clear_module_state->__pyx_codeobj__222);
  Py_CLEAR(clear_module_state->__pyx_codeobj__223);
  Py_CLEAR(clear_module_state->__pyx_codeobj__224);
  Py_CLEAR(clear_module_state->__pyx_codeobj__225);
  Py_CLEAR(clear_module_state->__pyx_codeobj__226);
  Py_CLEAR(clear_module_state->__pyx_codeobj__227);
  Py_CLEAR(clear_module_state->__pyx_codeobj__229);
  Py_CLEAR(clear_module_state->__pyx_codeobj__231);
  Py_CLEAR(clear_module_state->__pyx_codeobj__234);
  Py_CLEAR(clear_module_state->__pyx_codeobj__236);
  Py_CLEAR(clear_module_state->__pyx_codeobj__238);
  Py_CLEAR(clear_module_state->__pyx_codeobj__240);
  Py_CLEAR(clear_module_state->__pyx_codeobj__242);
  Py_CLEAR(clear_module_state->__pyx_codeobj__244);
  Py_CLEAR(clear_module_state->__pyx_codeobj__247);
  Py_CLEAR(clear_module_state->__pyx_codeobj__249);
  Py_CLEAR(clear_module_state->__pyx_codeobj__250);
  Py_CLEAR(clear_module_state->__pyx_codeobj__252);
  Py_CLEAR(clear_module_state->__pyx_codeobj__254);
  Py_CLEAR(clear_module_state->__pyx_codeobj__255);
  Py_CLEAR(clear_module_state->__pyx_codeobj__257);
  Py_CLEAR(clear_module_state->__pyx_codeobj__259);
  Py_CLEAR(clear_module_state->__pyx_codeobj__260);
  Py_CLEAR(clear_module_state->__pyx_codeobj__262);
  Py_CLEAR(clear_module_state->__pyx_codeobj__263);
  Py_CLEAR(clear_module_state->__pyx_codeobj__264);
  Py_CLEAR(clear_module_state->__pyx_codeobj__266);
  Py_CLEAR(clear_module_state->__pyx_codeobj__268);
  Py_CLEAR(clear_module_state->__pyx_codeobj__270);
  Py_CLEAR(clear_module_state->__pyx_codeobj__272);
  Py_CLEAR(clear_module_state->__pyx_codeobj__273);
  Py_CLEAR(clear_module_state->__pyx_codeobj__275);
  Py_CLEAR(clear_module_state->__pyx_codeobj__276);
  Py_CLEAR(clear_module_state->__pyx_codeobj__278);
  Py_CLEAR(clear_module_state->__pyx_codeobj__279);
  Py_CLEAR(clear_module_state->__pyx_codeobj__281);
  Py_CLEAR(clear_module_state->__pyx_codeobj__283);
  Py_CLEAR(clear_module_state->__pyx_codeobj__284);
  Py_CLEAR(clear_module_state->__pyx_codeobj__286);
  Py_CLEAR(clear_module_state->__pyx_codeobj__287);
  Py_CLEAR(clear_module_state->__pyx_codeobj__289);
  Py_CLEAR(clear_module_state->__pyx_codeobj__291);
  Py_CLEAR(clear_module_state->__pyx_codeobj__294);
  Py_CLEAR(clear_module_state->__pyx_codeobj__296);
  Py_CLEAR(clear_module_state->__pyx_codeobj__298);
  Py_CLEAR(clear_module_state->__pyx_codeobj__299);
  Py_CLEAR(clear_module_state->__pyx_codeobj__301);
  Py_CLEAR(clear_module_state->__pyx_codeobj__302);
  Py_CLEAR(clear_module_state->__pyx_codeobj__303);
  Py_CLEAR(clear_module_state->__pyx_codeobj__305);
  Py_CLEAR(clear_module_state->__pyx_codeobj__307);
  Py_CLEAR(clear_module_state->__pyx_codeobj__308);
  Py_CLEAR(clear_module_state->__pyx_codeobj__309);
  Py_CLEAR(clear_module_state->__pyx_codeobj__311);
  Py_CLEAR(clear_module_state->__pyx_codeobj__312);
  Py_CLEAR(clear_module_state->__pyx_codeobj__313);
  Py_CLEAR(clear_module_state->__pyx_codeobj__315);
  Py_CLEAR(clear_module_state->__pyx_codeobj__316);
  Py_CLEAR(clear_module_state->__pyx_codeobj__318);
  Py_CLEAR(clear_module_state->__pyx_codeobj__319);
  Py_CLEAR(clear_module_state->__pyx_codeobj__321);
  Py_CLEAR(clear_module_state->__pyx_codeobj__322);
  Py_CLEAR(clear_module_state->__pyx_codeobj__323);
  Py_CLEAR(clear_module_state->__pyx_codeobj__325);
  Py_CLEAR(clear_module_state->__pyx_codeobj__327);
  Py_CLEAR(clear_module_state->__pyx_codeobj__329);
  Py_CLEAR(clear_module_state->__pyx_codeobj__331);
  Py_CLEAR(clear_module_state->__pyx_codeobj__332);
  Py_CLEAR(clear_module_state->__pyx_codeobj__334);
  Py_CLEAR(clear_module_state->__pyx_codeobj__336);
  Py_CLEAR(clear_module_state->__pyx_codeobj__338);
  Py_CLEAR(clear_module_state->__pyx_codeobj__340);
  Py_CLEAR(clear_module_state->__pyx_codeobj__342);
  Py_CLEAR(clear_module_state->__pyx_codeobj__343);
  Py_CLEAR(clear_module_state->__pyx_codeobj__345);
  Py_CLEAR(clear_module_state->__pyx_codeobj__347);
  Py_CLEAR(clear_module_state->__pyx_codeobj__349);
  Py_CLEAR(clear_module_state->__pyx_codeobj__352);
  Py_CLEAR(clear_module_state->__pyx_codeobj__355);
  Py_CLEAR(clear_module_state->__pyx_codeobj__356);
  Py_CLEAR(clear_module_state->__pyx_codeobj__358);
  Py_CLEAR(clear_module_state->__pyx_codeobj__359);
  Py_CLEAR(clear_module_state->__pyx_codeobj__361);
  Py_CLEAR(clear_module_state->__pyx_codeobj__362);
  Py_CLEAR(clear_module_state->__pyx_codeobj__363);
  Py_CLEAR(clear_module_state->__pyx_codeobj__365);
  Py_CLEAR(clear_module_state->__pyx_codeobj__368);
  Py_CLEAR(clear_module_state->__pyx_codeobj__370);
  Py_CLEAR(clear_module_state->__pyx_codeobj__371);
  Py_CLEAR(clear_module_state->__pyx_codeobj__372);
  Py_CLEAR(clear_module_state->__pyx_codeobj__374);
  Py_CLEAR(clear_module_state->__pyx_codeobj__376);
  Py_CLEAR(clear_module_state->__pyx_codeobj__377);
  Py_CLEAR(clear_module_state->__pyx_codeobj__379);
  Py_CLEAR(clear_module_state->__pyx_codeobj__380);
  Py_CLEAR(clear_module_state->__pyx_codeobj__381);
  Py_CLEAR(clear_module_state->__pyx_codeobj__383);
  Py_CLEAR(clear_module_state->__pyx_codeobj__384);
  Py_CLEAR(clear_module_state->__pyx_codeobj__385);
  Py_CLEAR(clear_module_state->__pyx_codeobj__387);
  Py_CLEAR(clear_module_state->__pyx_codeobj__388);
  Py_CLEAR(clear_module_state->__pyx_codeobj__389);
  Py_CLEAR(clear_module_state->__pyx_codeobj__391);
  Py_CLEAR(clear_module_state->__pyx_codeobj__392);
  Py_CLEAR(clear_module_state->__pyx_codeobj__393);
  Py_CLEAR(clear_module_state->__pyx_codeobj__395);
  Py_CLEAR(clear_module_state->__pyx_codeobj__397);
  Py_CLEAR(clear_module_state->__pyx_codeobj__399);
  Py_CLEAR(clear_module_state->__pyx_codeobj__401);
  Py_CLEAR(clear_module_state->__pyx_codeobj__403);
  Py_CLEAR(clear_module_state->__pyx_codeobj__404);
  Py_CLEAR(clear_module_state->__pyx_codeobj__405);
  Py_CLEAR(clear_module_state->__pyx_codeobj__406);
  Py_CLEAR(clear_module_state->__pyx_codeobj__408);
  Py_CLEAR(clear_module_state->__pyx_codeobj__410);
  Py_CLEAR(clear_module_state->__pyx_codeobj__411);
  Py_CLEAR(clear_module_state->__pyx_codeobj__412);
  Py_CLEAR(clear_module_state->__pyx_codeobj__414);
  Py_CLEAR(clear_module_state->__pyx_codeobj__415);
  Py_CLEAR(clear_module_state->__pyx_codeobj__416);
  Py_CLEAR(clear_module_state->__pyx_codeobj__418);
  Py_CLEAR(clear_module_state->__pyx_codeobj__419);
  Py_CLEAR(clear_module_state->__pyx_codeobj__420);
  Py_CLEAR(clear_module_state->__pyx_codeobj__422);
  Py_CLEAR(clear_module_state->__pyx_codeobj__424);
  Py_CLEAR(clear_module_state->__pyx_codeobj__426);
  Py_CLEAR(clear_module_state->__pyx_codeobj__428);
  Py_CLEAR(clear_module_state->__pyx_codeobj__429);
  Py_CLEAR(clear_module_state->__pyx_codeobj__431);
  Py_CLEAR(clear_module_state->__pyx_codeobj__433);
  Py_CLEAR(clear_module_state->__pyx_codeobj__434);
  Py_CLEAR(clear_module_state->__pyx_codeobj__435);
  Py_CLEAR(clear_module_state->__pyx_codeobj__437);
  Py_CLEAR(clear_module_state->__pyx_codeobj__438);
  Py_CLEAR(clear_module_state->__pyx_codeobj__439);
  Py_CLEAR(clear_module_state->__pyx_codeobj__441);
  Py_CLEAR(clear_module_state->__pyx_codeobj__442);
  Py_CLEAR(clear_module_state->__pyx_codeobj__443);
  Py_CLEAR(clear_module_state->__pyx_codeobj__445);
  Py_CLEAR(clear_module_state->__pyx_codeobj__446);
  Py_CLEAR(clear_module_state->__pyx_codeobj__448);
  Py_CLEAR(clear_module_state->__pyx_codeobj__449);
  Py_CLEAR(clear_module_state->__pyx_codeobj__451);
  Py_CLEAR(clear_module_state->__pyx_codeobj__452);
  Py_CLEAR(clear_module_state->__pyx_codeobj__453);
  Py_CLEAR(clear_module_state->__pyx_codeobj__455);
  Py_CLEAR(clear_module_state->__pyx_codeobj__456);
  Py_CLEAR(clear_module_state->__pyx_codeobj__458);
  Py_CLEAR(clear_module_state->__pyx_codeobj__459);
  Py_CLEAR(clear_module_state->__pyx_codeobj__461);
  Py_CLEAR(clear_module_state->__pyx_codeobj__462);
  Py_CLEAR(clear_module_state->__pyx_codeobj__463);
  Py_CLEAR(clear_module_state->__pyx_codeobj__465);
  Py_CLEAR(clear_module_state->__pyx_codeobj__466);
  Py_CLEAR(clear_module_state->__pyx_codeobj__467);
  Py_CLEAR(clear_module_state->__pyx_codeobj__469);
  Py_CLEAR(clear_module_state->__pyx_codeobj__470);
  Py_CLEAR(clear_module_state->__pyx_codeobj__471);
  Py_CLEAR(clear_module_state->__pyx_codeobj__473);
  Py_CLEAR(clear_module_state->__pyx_codeobj__475);
  Py_CLEAR(clear_module_state->__pyx_codeobj__476);
  Py_CLEAR(clear_module_state->__pyx_codeobj__477);
  Py_CLEAR(clear_module_state->__pyx_codeobj__479);
  Py_CLEAR(clear_module_state->__pyx_codeobj__480);
  Py_CLEAR(clear_module_state->__pyx_codeobj__482);
  Py_CLEAR(clear_module_state->__pyx_codeobj__484);
  Py_CLEAR(clear_module_state->__pyx_codeobj__485);
  Py_CLEAR(clear_module_state->__pyx_codeobj__487);
  Py_CLEAR(clear_module_state->__pyx_codeobj__489);
  Py_CLEAR(clear_module_state->__pyx_codeobj__491);
  Py_CLEAR(clear_module_state->__pyx_codeobj__492);
  Py_CLEAR(clear_module_state->__pyx_codeobj__494);
  Py_CLEAR(clear_module_state->__pyx_codeobj__496);
  Py_CLEAR(clear_module_state->__pyx_codeobj__497);
  Py_CLEAR(clear_module_state->__pyx_codeobj__499);
  Py_CLEAR(clear_module_state->__pyx_codeobj__502);
  Py_CLEAR(clear_module_state->__pyx_codeobj__503);
  Py_CLEAR(clear_module_state->__pyx_codeobj__505);
  Py_CLEAR(clear_module_state->__pyx_codeobj__506);
  Py_CLEAR(clear_module_state->__pyx_codeobj__508);
  Py_CLEAR(clear_module_state->__pyx_codeobj__509);
  Py_CLEAR(clear_module_state->__pyx_codeobj__510);
  Py_CLEAR(clear_module_state->__pyx_codeobj__512);
  Py_CLEAR(clear_module_state->__pyx_codeobj__513);
  Py_CLEAR(clear_module_state->__pyx_codeobj__514);
  Py_CLEAR(clear_module_state->__pyx_codeobj__516);
  Py_CLEAR(clear_module_state->__pyx_codeobj__518);
  Py_CLEAR(clear_module_state->__pyx_codeobj__519);
  Py_CLEAR(clear_module_state->__pyx_codeobj__521);
  Py_CLEAR(clear_module_state->__pyx_codeobj__523);
  Py_CLEAR(clear_module_state->__pyx_codeobj__525);
  Py_CLEAR(clear_module_state->__pyx_codeobj__527);
  Py_CLEAR(clear_module_state->__pyx_codeobj__528);
  Py_CLEAR(clear_module_state->__pyx_codeobj__529);
  Py_CLEAR(clear_module_state->__pyx_codeobj__531);
  Py_CLEAR(clear_module_state->__pyx_codeobj__533);
  Py_CLEAR(clear_module_state->__pyx_codeobj__535);
  Py_CLEAR(clear_module_state->__pyx_codeobj__537);
  Py_CLEAR(clear_module_state->__pyx_codeobj__539);
  Py_CLEAR(clear_module_state->__pyx_codeobj__540);
  Py_CLEAR(clear_module_state->__pyx_codeobj__541);
  Py_CLEAR(clear_module_state->__pyx_codeobj__542);
  Py_CLEAR(clear_module_state->__pyx_codeobj__543);
  Py_CLEAR(clear_module_state->__pyx_codeobj__544);
  Py_CLEAR(clear_module_state->__pyx_codeobj__545);
  Py_CLEAR(clear_module_state->__pyx_codeobj__547);
  Py_CLEAR(clear_module_state->__pyx_codeobj__549);
  Py_CLEAR(clear_module_state->__pyx_codeobj__550);
  Py_CLEAR(clear_module_state->__pyx_codeobj__551);
  Py_CLEAR(clear_module_state->__pyx_codeobj__552);
  Py_CLEAR(clear_module_state->__pyx_codeobj__554);
  Py_CLEAR(clear_module_state->__pyx_codeobj__556);
  Py_CLEAR(clear_module_state->__pyx_codeobj__558);
  Py_CLEAR(clear_module_state->__pyx_codeobj__559);
  Py_CLEAR(clear_module_state->__pyx_codeobj__561);
  Py_CLEAR(clear_module_state->__pyx_codeobj__563);
  Py_CLEAR(clear_module_state->__pyx_codeobj__564);
  Py_CLEAR(clear_module_state->__pyx_codeobj__566);
  Py_CLEAR(clear_module_state->__pyx_codeobj__568);
  Py_CLEAR(clear_module_state->__pyx_codeobj__569);
  Py_CLEAR(clear_module_state->__pyx_codeobj__570);
  Py_CLEAR(clear_module_state->__pyx_codeobj__572);
  Py_CLEAR(clear_module_state->__pyx_codeobj__574);
  Py_CLEAR(clear_module_state->__pyx_codeobj__576);
  Py_CLEAR(clear_module_state->__pyx_codeobj__577);
  Py_CLEAR(clear_module_state->__pyx_codeobj__579);
  Py_CLEAR(clear_module_state->__pyx_codeobj__580);
  Py_CLEAR(clear_module_state->__pyx_codeobj__581);
  Py_CLEAR(clear_module_state->__pyx_codeobj__583);
  Py_CLEAR(clear_module_state->__pyx_codeobj__585);
  Py_CLEAR(clear_module_state->__pyx_codeobj__586);
  Py_CLEAR(clear_module_state->__pyx_codeobj__587);
  Py_CLEAR(clear_module_state->__pyx_codeobj__588);
  Py_CLEAR(clear_module_state->__pyx_codeobj__589);
  Py_CLEAR(clear_module_state->__pyx_codeobj__591);
  Py_CLEAR(clear_module_state->__pyx_codeobj__593);
  Py_CLEAR(clear_module_state->__pyx_codeobj__594);
  Py_CLEAR(clear_module_state->__pyx_codeobj__595);
  Py_CLEAR(clear_module_state->__pyx_codeobj__596);
  Py_CLEAR(clear_module_state->__pyx_codeobj__598);
  Py_CLEAR(clear_module_state->__pyx_codeobj__600);
  Py_CLEAR(clear_module_state->__pyx_codeobj__601);
  Py_CLEAR(clear_module_state->__pyx_codeobj__603);
  Py_CLEAR(clear_module_state->__pyx_codeobj__604);
  Py_CLEAR(clear_module_state->__pyx_codeobj__606);
  Py_CLEAR(clear_module_state->__pyx_codeobj__608);
  Py_CLEAR(clear_module_state->__pyx_codeobj__611);
  Py_CLEAR(clear_module_state->__pyx_codeobj__613);
  Py_CLEAR(clear_module_state->__pyx_codeobj__615);
  Py_CLEAR(clear_module_state->__pyx_codeobj__617);
  Py_CLEAR(clear_module_state->__pyx_codeobj__619);
  Py_CLEAR(clear_module_state->__pyx_codeobj__620);
  Py_CLEAR(clear_module_state->__pyx_codeobj__621);
  Py_CLEAR(clear_module_state->__pyx_codeobj__623);
  Py_CLEAR(clear_module_state->__pyx_codeobj__624);
  Py_CLEAR(clear_module_state->__pyx_codeobj__625);
  Py_CLEAR(clear_module_state->__pyx_codeobj__626);
  Py_CLEAR(clear_module_state->__pyx_codeobj__628);
  Py_CLEAR(clear_module_state->__pyx_codeobj__629);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm_mus_any);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm_mus_any);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm_mus_any_array);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm_mus_any_array);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm_array_readin_gen);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm_array_readin_gen);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb);
  Py_VISIT(traverse_module_state->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator);
  Py_VISIT(traverse_module_state->__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator);
  Py_VISIT(traverse_module_state->__pyx_ptype___Pyx_EnumMeta);
  Py_VISIT(traverse_module_state->__Pyx_EnumMeta);
  Py_VISIT(traverse_module_state->__pyx_array_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
  Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
  Py_VISIT(traverse_module_state->__pyx_memoryview_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
  Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
  Py_VISIT(traverse_module_state->__pyx_kp_u_);
  Py_VISIT(traverse_module_state->__pyx_kp_u_0_8f);
  Py_VISIT(traverse_module_state->__pyx_n_s_ADC);
  Py_VISIT(traverse_module_state->__pyx_n_s_ADF);
  Py_VISIT(traverse_module_state->__pyx_n_s_AIFC);
  Py_VISIT(traverse_module_state->__pyx_n_s_AIFF);
  Py_VISIT(traverse_module_state->__pyx_n_s_AKAI4);
  Py_VISIT(traverse_module_state->__pyx_n_s_ALAW);
  Py_VISIT(traverse_module_state->__pyx_n_s_ALL_PASS);
  Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
  Py_VISIT(traverse_module_state->__pyx_n_s_ASF);
  Py_VISIT(traverse_module_state->__pyx_n_s_AVI);
  Py_VISIT(traverse_module_state->__pyx_n_s_AVR);
  Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
  Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
  Py_VISIT(traverse_module_state->__pyx_n_s_B24INT);
  Py_VISIT(traverse_module_state->__pyx_n_s_BARTLETT);
  Py_VISIT(traverse_module_state->__pyx_n_s_BARTLETT_HANN);
  Py_VISIT(traverse_module_state->__pyx_n_s_BDOUBLE);
  Py_VISIT(traverse_module_state->__pyx_n_s_BDOUBLE_UNSCALED);
  Py_VISIT(traverse_module_state->__pyx_n_s_BEZIER);
  Py_VISIT(traverse_module_state->__pyx_n_s_BFLOAT);
  Py_VISIT(traverse_module_state->__pyx_n_s_BFLOAT_UNSCALED);
  Py_VISIT(traverse_module_state->__pyx_n_s_BICSF);
  Py_VISIT(traverse_module_state->__pyx_n_s_BINT);
  Py_VISIT(traverse_module_state->__pyx_n_s_BINTN);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN10);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN2);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN3);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN4);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN5);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN6);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN7);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN8);
  Py_VISIT(traverse_module_state->__pyx_n_s_BLACKMAN9);
  Py_VISIT(traverse_module_state->__pyx_n_s_BOHMAN);
  Py_VISIT(traverse_module_state->__pyx_n_s_BOTH_KINDS);
  Py_VISIT(traverse_module_state->__pyx_n_s_BSHORT);
  Py_VISIT(traverse_module_state->__pyx_n_s_BYTE);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
  Py_VISIT(traverse_module_state->__pyx_n_s_CAFF);
  Py_VISIT(traverse_module_state->__pyx_n_s_CAUCHY);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFUNCTYPE);
  Py_VISIT(traverse_module_state->__pyx_n_s_COMDISCO);
  Py_VISIT(traverse_module_state->__pyx_n_s_CONNES);
  Py_VISIT(traverse_module_state->__pyx_n_s_COVOX);
  Py_VISIT(traverse_module_state->__pyx_n_s_CSL);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_FILE_NAME);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_FILE_PLAYER);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_OUTPUT_CHANS);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_OUTPUT_SRATE);
  Py_VISIT(traverse_module_state->__pyx_n_s_DELUSION);
  Py_VISIT(traverse_module_state->__pyx_n_s_DIAMONDWARE);
  Py_VISIT(traverse_module_state->__pyx_n_s_DIGIPLAYER);
  Py_VISIT(traverse_module_state->__pyx_n_s_DOLPH_CHEBYSHEV);
  Py_VISIT(traverse_module_state->__pyx_n_s_DPSS);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
  Py_VISIT(traverse_module_state->__pyx_n_s_EITHER_KIND);
  Py_VISIT(traverse_module_state->__pyx_n_s_ESPS);
  Py_VISIT(traverse_module_state->__pyx_n_s_EXPONENTIAL);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
  Py_VISIT(traverse_module_state->__pyx_n_s_EnumBase);
  Py_VISIT(traverse_module_state->__pyx_n_s_EnumType);
  Py_VISIT(traverse_module_state->__pyx_n_s_FARANDOLE);
  Py_VISIT(traverse_module_state->__pyx_n_s_FILE_SAMP);
  Py_VISIT(traverse_module_state->__pyx_n_s_FIRST_KIND);
  Py_VISIT(traverse_module_state->__pyx_n_s_FLAC);
  Py_VISIT(traverse_module_state->__pyx_n_s_FLAT_TOP);
  Py_VISIT(traverse_module_state->__pyx_n_s_FileNotFoundError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Filter_needs_values_for_a0_a1_a2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Filter_needs_values_for_a0_b1_b2);
  Py_VISIT(traverse_module_state->__pyx_n_s_GAUSSIAN);
  Py_VISIT(traverse_module_state->__pyx_n_s_GOLDWAVE);
  Py_VISIT(traverse_module_state->__pyx_n_s_GRAVIS);
  Py_VISIT(traverse_module_state->__pyx_n_s_GeneratorType);
  Py_VISIT(traverse_module_state->__pyx_n_s_HAMMING);
  Py_VISIT(traverse_module_state->__pyx_n_s_HANN);
  Py_VISIT(traverse_module_state->__pyx_n_s_HANN_POISSON);
  Py_VISIT(traverse_module_state->__pyx_n_s_HCOM);
  Py_VISIT(traverse_module_state->__pyx_n_s_HERMITE);
  Py_VISIT(traverse_module_state->__pyx_n_s_Header);
  Py_VISIT(traverse_module_state->__pyx_n_s_IEEE);
  Py_VISIT(traverse_module_state->__pyx_n_s_IMPULSETRACKER);
  Py_VISIT(traverse_module_state->__pyx_n_s_INRS);
  Py_VISIT(traverse_module_state->__pyx_n_s_IN_DB);
  Py_VISIT(traverse_module_state->__pyx_n_s_IRCAM);
  Py_VISIT(traverse_module_state->__pyx_kp_u_If_not_specifying_coeffs_must_pr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntEnum);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntFlag);
  Py_VISIT(traverse_module_state->__pyx_n_s_Interp);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
  Py_VISIT(traverse_module_state->__pyx_n_s_KAISER);
  Py_VISIT(traverse_module_state->__pyx_n_s_KORG);
  Py_VISIT(traverse_module_state->__pyx_n_s_KURZWEIL_2000);
  Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
  Py_VISIT(traverse_module_state->__pyx_n_s_L24INT);
  Py_VISIT(traverse_module_state->__pyx_n_s_LAGRANGE);
  Py_VISIT(traverse_module_state->__pyx_n_s_LDOUBLE);
  Py_VISIT(traverse_module_state->__pyx_n_s_LDOUBLE_UNSCALED);
  Py_VISIT(traverse_module_state->__pyx_n_s_LFLOAT);
  Py_VISIT(traverse_module_state->__pyx_n_s_LFLOAT_UNSCALED);
  Py_VISIT(traverse_module_state->__pyx_n_s_LINEAR);
  Py_VISIT(traverse_module_state->__pyx_n_s_LINT);
  Py_VISIT(traverse_module_state->__pyx_n_s_LINTN);
  Py_VISIT(traverse_module_state->__pyx_n_s_LSHORT);
  Py_VISIT(traverse_module_state->__pyx_n_s_MATLAB);
  Py_VISIT(traverse_module_state->__pyx_n_s_MAUD);
  Py_VISIT(traverse_module_state->__pyx_n_s_MAUI);
  Py_VISIT(traverse_module_state->__pyx_n_s_MIDI);
  Py_VISIT(traverse_module_state->__pyx_n_s_MIDI_SAMPLE_DUMP);
  Py_VISIT(traverse_module_state->__pyx_n_s_MLT_SINE);
  Py_VISIT(traverse_module_state->__pyx_n_s_MPEG);
  Py_VISIT(traverse_module_state->__pyx_n_s_MULAW);
  Py_VISIT(traverse_module_state->__pyx_n_s_MUS10);
  Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
  Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
  Py_VISIT(traverse_module_state->__pyx_n_s_NEXT);
  Py_VISIT(traverse_module_state->__pyx_n_s_NIST);
  Py_VISIT(traverse_module_state->__pyx_n_s_NONE);
  Py_VISIT(traverse_module_state->__pyx_n_s_NORMALIZED);
  Py_VISIT(traverse_module_state->__pyx_n_s_NUM_HEADERS);
  Py_VISIT(traverse_module_state->__pyx_n_s_NUM_SAMPLES);
  Py_VISIT(traverse_module_state->__pyx_n_s_NVF);
  Py_VISIT(traverse_module_state->__pyx_kp_u_None);
  Py_VISIT(traverse_module_state->__pyx_n_b_O);
  Py_VISIT(traverse_module_state->__pyx_n_s_OGG);
  Py_VISIT(traverse_module_state->__pyx_n_s_OMF);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Optional_float);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Optional_int);
  Py_VISIT(traverse_module_state->__pyx_n_s_OrderedDict);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
  Py_VISIT(traverse_module_state->__pyx_n_s_PAF);
  Py_VISIT(traverse_module_state->__pyx_n_s_PAPOULIS);
  Py_VISIT(traverse_module_state->__pyx_n_s_PARZEN);
  Py_VISIT(traverse_module_state->__pyx_n_s_POISSON);
  Py_VISIT(traverse_module_state->__pyx_n_s_PSION);
  Py_VISIT(traverse_module_state->__pyx_n_s_PVF);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Polynomial);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumBase);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumBase___new);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumBase___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumBase___str);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumMeta___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_EnumMeta___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_FlagBase);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_FlagBase___new);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_FlagBase___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_FlagBase___str);
  Py_VISIT(traverse_module_state->__pyx_n_s_QUICKTIME);
  Py_VISIT(traverse_module_state->__pyx_n_s_RAW);
  Py_VISIT(traverse_module_state->__pyx_n_s_RECTANGULAR);
  Py_VISIT(traverse_module_state->__pyx_n_s_RF64);
  Py_VISIT(traverse_module_state->__pyx_n_s_RIEMANN);
  Py_VISIT(traverse_module_state->__pyx_n_s_RIFF);
  Py_VISIT(traverse_module_state->__pyx_n_s_RV2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RV3);
  Py_VISIT(traverse_module_state->__pyx_n_s_RV4);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_SAMARAKI);
  Py_VISIT(traverse_module_state->__pyx_n_s_SAMPLE_DUMP);
  Py_VISIT(traverse_module_state->__pyx_n_s_SBSTUDIOII);
  Py_VISIT(traverse_module_state->__pyx_n_s_SD1);
  Py_VISIT(traverse_module_state->__pyx_n_s_SDIF);
  Py_VISIT(traverse_module_state->__pyx_n_s_SECOND_KIND);
  Py_VISIT(traverse_module_state->__pyx_n_s_SHORTEN);
  Py_VISIT(traverse_module_state->__pyx_n_s_SINC);
  Py_VISIT(traverse_module_state->__pyx_n_s_SINUSOIDAL);
  Py_VISIT(traverse_module_state->__pyx_n_s_SMP);
  Py_VISIT(traverse_module_state->__pyx_n_s_SNDLibError);
  Py_VISIT(traverse_module_state->__pyx_n_s_SNDLibError____init);
  Py_VISIT(traverse_module_state->__pyx_n_s_SNDT);
  Py_VISIT(traverse_module_state->__pyx_n_s_SOUNDFONT);
  Py_VISIT(traverse_module_state->__pyx_n_s_SOUNDFORGE);
  Py_VISIT(traverse_module_state->__pyx_n_s_SOX);
  Py_VISIT(traverse_module_state->__pyx_n_s_SPEEX);
  Py_VISIT(traverse_module_state->__pyx_n_s_SPPACK);
  Py_VISIT(traverse_module_state->__pyx_n_s_SRFS);
  Py_VISIT(traverse_module_state->__pyx_n_s_SVX);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sample);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_SimpleNamespace);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sound);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sound___enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sound___exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_Sound___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_Spectrum);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_TTA);
  Py_VISIT(traverse_module_state->__pyx_n_s_TUKEY);
  Py_VISIT(traverse_module_state->__pyx_n_s_TWINVQ);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_UBSHORT);
  Py_VISIT(traverse_module_state->__pyx_n_s_UBYTE);
  Py_VISIT(traverse_module_state->__pyx_n_s_ULSHORT);
  Py_VISIT(traverse_module_state->__pyx_n_s_ULTRASPHERICAL);
  Py_VISIT(traverse_module_state->__pyx_n_s_ULTRATRACKER);
  Py_VISIT(traverse_module_state->__pyx_n_s_UNKNOWN_HEADER);
  Py_VISIT(traverse_module_state->__pyx_n_s_UNKNOWN_SAMPLE);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Unknown_enum_value_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_VOC);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
  Py_VISIT(traverse_module_state->__pyx_n_s_WAVPACK);
  Py_VISIT(traverse_module_state->__pyx_n_s_WELCH);
  Py_VISIT(traverse_module_state->__pyx_n_s_Window);
  Py_VISIT(traverse_module_state->__pyx_n_s_YAMAHA_SY85);
  Py_VISIT(traverse_module_state->__pyx_n_s_YAMAHA_SY99);
  Py_VISIT(traverse_module_state->__pyx_n_s_YAMAHA_TX16W);
  Py_VISIT(traverse_module_state->__pyx_kp_u__13);
  Py_VISIT(traverse_module_state->__pyx_n_s__137);
  Py_VISIT(traverse_module_state->__pyx_kp_u__14);
  Py_VISIT(traverse_module_state->__pyx_kp_u__15);
  Py_VISIT(traverse_module_state->__pyx_kp_u__17);
  Py_VISIT(traverse_module_state->__pyx_kp_u__18);
  Py_VISIT(traverse_module_state->__pyx_kp_u__19);
  Py_VISIT(traverse_module_state->__pyx_n_s__2);
  Py_VISIT(traverse_module_state->__pyx_kp_s__3);
  Py_VISIT(traverse_module_state->__pyx_kp_u__3);
  Py_VISIT(traverse_module_state->__pyx_kp_u__5);
  Py_VISIT(traverse_module_state->__pyx_kp_u__62);
  Py_VISIT(traverse_module_state->__pyx_n_s__630);
  Py_VISIT(traverse_module_state->__pyx_kp_u__8);
  Py_VISIT(traverse_module_state->__pyx_kp_u__9);
  Py_VISIT(traverse_module_state->__pyx_n_s_a0);
  Py_VISIT(traverse_module_state->__pyx_n_s_a1);
  Py_VISIT(traverse_module_state->__pyx_kp_u_a1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_a2);
  Py_VISIT(traverse_module_state->__pyx_n_s_a2_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_a_valid_envelope_can_only_contai);
  Py_VISIT(traverse_module_state->__pyx_kp_u_a_valid_envelope_needs_at_least);
  Py_VISIT(traverse_module_state->__pyx_kp_u_a_valid_envelope_needs_even_numb);
  Py_VISIT(traverse_module_state->__pyx_n_s_abc);
  Py_VISIT(traverse_module_state->__pyx_n_s_abs);
  Py_VISIT(traverse_module_state->__pyx_n_s_addressof);
  Py_VISIT(traverse_module_state->__pyx_n_u_afplay);
  Py_VISIT(traverse_module_state->__pyx_n_s_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_pass_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_passes);
  Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
  Py_VISIT(traverse_module_state->__pyx_kp_u_allpass_list_contains_at_least_o);
  Py_VISIT(traverse_module_state->__pyx_n_s_alpha);
  Py_VISIT(traverse_module_state->__pyx_n_s_amax);
  Py_VISIT(traverse_module_state->__pyx_n_s_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_amplitude_modulate);
  Py_VISIT(traverse_module_state->__pyx_n_s_amps);
  Py_VISIT(traverse_module_state->__pyx_n_s_analyze);
  Py_VISIT(traverse_module_state->__pyx_n_s_analyze_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_analyzecallback);
  Py_VISIT(traverse_module_state->__pyx_kp_u_and);
  Py_VISIT(traverse_module_state->__pyx_n_s_any);
  Py_VISIT(traverse_module_state->__pyx_n_u_aplay);
  Py_VISIT(traverse_module_state->__pyx_n_s_arange);
  Py_VISIT(traverse_module_state->__pyx_n_s_arg);
  Py_VISIT(traverse_module_state->__pyx_n_s_arg1);
  Py_VISIT(traverse_module_state->__pyx_n_s_arg2);
  Py_VISIT(traverse_module_state->__pyx_n_s_argmax);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_arr);
  Py_VISIT(traverse_module_state->__pyx_n_s_arr1);
  Py_VISIT(traverse_module_state->__pyx_n_s_arr2);
  Py_VISIT(traverse_module_state->__pyx_n_s_array);
  Py_VISIT(traverse_module_state->__pyx_kp_u_array_has);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_reader);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_reader_locals_reader);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_readin_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_readin_gen___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_readin_gen___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_array_resample);
  Py_VISIT(traverse_module_state->__pyx_n_s_asarray);
  Py_VISIT(traverse_module_state->__pyx_kp_u_asked_for);
  Py_VISIT(traverse_module_state->__pyx_n_s_asymmetric_fm);
  Py_VISIT(traverse_module_state->__pyx_n_s_asymmetric_fm_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_atan2);
  Py_VISIT(traverse_module_state->__pyx_n_s_autocorrelate);
  Py_VISIT(traverse_module_state->__pyx_n_s_b1);
  Py_VISIT(traverse_module_state->__pyx_kp_u_b1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_b2);
  Py_VISIT(traverse_module_state->__pyx_n_s_b2_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_base);
  Py_VISIT(traverse_module_state->__pyx_kp_u_before_scaling);
  Py_VISIT(traverse_module_state->__pyx_n_s_beg);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_i0);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_j0);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_j1);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_jn);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_y0);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_y1);
  Py_VISIT(traverse_module_state->__pyx_n_s_bes_yn);
  Py_VISIT(traverse_module_state->__pyx_n_s_bessi0);
  Py_VISIT(traverse_module_state->__pyx_n_s_beta);
  Py_VISIT(traverse_module_state->__pyx_n_s_biquad);
  Py_VISIT(traverse_module_state->__pyx_n_s_biquad_set_equal_gain_zeroes);
  Py_VISIT(traverse_module_state->__pyx_n_s_biquad_set_resonance);
  Py_VISIT(traverse_module_state->__pyx_n_s_buffer_size);
  Py_VISIT(traverse_module_state->__pyx_n_u_buffer_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_builtins);
  Py_VISIT(traverse_module_state->__pyx_n_s_c);
  Py_VISIT(traverse_module_state->__pyx_n_u_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_bool);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_double);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_int);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_longlong);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_void_p);
  Py_VISIT(traverse_module_state->__pyx_n_s_cache_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_cache_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_call);
  Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_be_converted_to_a_mus_fl);
  Py_VISIT(traverse_module_state->__pyx_n_s_cepstrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_chan);
  Py_VISIT(traverse_module_state->__pyx_n_u_chan);
  Py_VISIT(traverse_module_state->__pyx_n_s_channel);
  Py_VISIT(traverse_module_state->__pyx_n_s_channels);
  Py_VISIT(traverse_module_state->__pyx_kp_u_channels_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_channels_but);
  Py_VISIT(traverse_module_state->__pyx_n_s_chans);
  Py_VISIT(traverse_module_state->__pyx_n_s_chebyshev_t_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_chebyshev_tu_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_chebyshev_u_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_ndim);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_clamp);
  Py_VISIT(traverse_module_state->__pyx_n_s_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_clip);
  Py_VISIT(traverse_module_state->__pyx_n_s_clipped);
  Py_VISIT(traverse_module_state->__pyx_n_s_clm_reverb);
  Py_VISIT(traverse_module_state->__pyx_n_s_clm_reverb_locals_call);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_cls);
  Py_VISIT(traverse_module_state->__pyx_n_s_coeff);
  Py_VISIT(traverse_module_state->__pyx_n_s_coeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_collections);
  Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
  Py_VISIT(traverse_module_state->__pyx_n_s_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_combs);
  Py_VISIT(traverse_module_state->__pyx_n_s_comment);
  Py_VISIT(traverse_module_state->__pyx_n_s_compare_shapes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_compute_ratio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_compute_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_connection_function);
  Py_VISIT(traverse_module_state->__pyx_kp_s_context_manager_which_handles_c);
  Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
  Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
  Py_VISIT(traverse_module_state->__pyx_n_s_continue_frample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_continue_old_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_continue_sample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_contrast_enhancement);
  Py_VISIT(traverse_module_state->__pyx_n_s_convert_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_convolution);
  Py_VISIT(traverse_module_state->__pyx_n_s_convolve);
  Py_VISIT(traverse_module_state->__pyx_n_s_convolve_files);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_copyto);
  Py_VISIT(traverse_module_state->__pyx_n_s_correlate);
  Py_VISIT(traverse_module_state->__pyx_n_s_cos);
  Py_VISIT(traverse_module_state->__pyx_kp_u_count);
  Py_VISIT(traverse_module_state->__pyx_n_s_count_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ctypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_analyze_f_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_edit_f_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_inp_f_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_input_f_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_synthesize_f_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_d);
  Py_VISIT(traverse_module_state->__pyx_n_u_d);
  Py_VISIT(traverse_module_state->__pyx_n_u_darwin);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_data1);
  Py_VISIT(traverse_module_state->__pyx_n_s_data2);
  Py_VISIT(traverse_module_state->__pyx_n_s_db2linear);
  Py_VISIT(traverse_module_state->__pyx_n_s_dcblock);
  Py_VISIT(traverse_module_state->__pyx_n_s_dct);
  Py_VISIT(traverse_module_state->__pyx_n_s_default);
  Py_VISIT(traverse_module_state->__pyx_n_s_degree);
  Py_VISIT(traverse_module_state->__pyx_n_s_degrees);
  Py_VISIT(traverse_module_state->__pyx_n_s_degrees2radians);
  Py_VISIT(traverse_module_state->__pyx_n_s_delay);
  Py_VISIT(traverse_module_state->__pyx_n_s_delay_tick);
  Py_VISIT(traverse_module_state->__pyx_n_s_delay_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_delete_reverb);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_dim);
  Py_VISIT(traverse_module_state->__pyx_kp_u_dimemsions_but_received);
  Py_VISIT(traverse_module_state->__pyx_n_s_direction);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_distance);
  Py_VISIT(traverse_module_state->__pyx_n_s_distribution);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_does_not_exist);
  Py_VISIT(traverse_module_state->__pyx_n_s_dot_product);
  Py_VISIT(traverse_module_state->__pyx_n_s_double);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
  Py_VISIT(traverse_module_state->__pyx_kp_u_duration);
  Py_VISIT(traverse_module_state->__pyx_n_s_duration_2);
  Py_VISIT(traverse_module_state->__pyx_n_u_duration_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_edit);
  Py_VISIT(traverse_module_state->__pyx_n_s_edit_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_editcallback);
  Py_VISIT(traverse_module_state->__pyx_n_s_edot_product);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_enum);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enum_class_Header_not_importable);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enum_class_Sample_not_importable);
  Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
  Py_VISIT(traverse_module_state->__pyx_n_s_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_env_any);
  Py_VISIT(traverse_module_state->__pyx_n_s_env_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_env_rates);
  Py_VISIT(traverse_module_state->__pyx_n_s_envelope);
  Py_VISIT(traverse_module_state->__pyx_n_s_envelope_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_envfunction);
  Py_VISIT(traverse_module_state->__pyx_n_s_error);
  Py_VISIT(traverse_module_state->__pyx_n_s_even_multiple);
  Py_VISIT(traverse_module_state->__pyx_n_s_even_weight);
  Py_VISIT(traverse_module_state->__pyx_n_s_exists);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_exp);
  Py_VISIT(traverse_module_state->__pyx_n_s_expanduser);
  Py_VISIT(traverse_module_state->__pyx_n_s_expansion);
  Py_VISIT(traverse_module_state->__pyx_kp_u_expecting);
  Py_VISIT(traverse_module_state->__pyx_n_s_fabs);
  Py_VISIT(traverse_module_state->__pyx_n_s_fc);
  Py_VISIT(traverse_module_state->__pyx_n_s_fcombs);
  Py_VISIT(traverse_module_state->__pyx_n_s_feedback);
  Py_VISIT(traverse_module_state->__pyx_n_s_feedforward);
  Py_VISIT(traverse_module_state->__pyx_n_s_fft);
  Py_VISIT(traverse_module_state->__pyx_n_s_fft_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_fft_size);
  Py_VISIT(traverse_module_state->__pyx_kp_u_fft_size_must_be_a_positive_numb);
  Py_VISIT(traverse_module_state->__pyx_kp_u_fft_size_must_be_a_positive_numb_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_fft_size_must_be_power_of_2_not);
  Py_VISIT(traverse_module_state->__pyx_kp_u_fft_size_too_large_cannot_alloca);
  Py_VISIT(traverse_module_state->__pyx_n_s_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_file1);
  Py_VISIT(traverse_module_state->__pyx_n_s_file2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_file2frample);
  Py_VISIT(traverse_module_state->__pyx_n_s_file2frample_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_file2ndarray);
  Py_VISIT(traverse_module_state->__pyx_n_s_file2ndarray_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_file2sample);
  Py_VISIT(traverse_module_state->__pyx_n_s_file2sample_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_filename);
  Py_VISIT(traverse_module_state->__pyx_n_s_fill);
  Py_VISIT(traverse_module_state->__pyx_n_s_filt);
  Py_VISIT(traverse_module_state->__pyx_n_s_filt_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter);
  Py_VISIT(traverse_module_state->__pyx_kp_u_filter_list_contains_at_least_on);
  Py_VISIT(traverse_module_state->__pyx_kp_u_filter_list_contains_at_least_on_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_filtered_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_filtered_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_filtered_comb_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_filters);
  Py_VISIT(traverse_module_state->__pyx_n_s_finalize);
  Py_VISIT(traverse_module_state->__pyx_n_s_fir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_firmant);
  Py_VISIT(traverse_module_state->__pyx_n_s_flags);
  Py_VISIT(traverse_module_state->__pyx_n_s_fm);
  Py_VISIT(traverse_module_state->__pyx_n_s_fm_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_fmod);
  Py_VISIT(traverse_module_state->__pyx_n_s_fn);
  Py_VISIT(traverse_module_state->__pyx_n_s_formant);
  Py_VISIT(traverse_module_state->__pyx_n_s_formant_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
  Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
  Py_VISIT(traverse_module_state->__pyx_n_s_frample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_freq);
  Py_VISIT(traverse_module_state->__pyx_n_s_freqs);
  Py_VISIT(traverse_module_state->__pyx_n_s_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_u_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_func);
  Py_VISIT(traverse_module_state->__pyx_n_s_functools);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_channels);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_framples);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_srate);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_gettempdir);
  Py_VISIT(traverse_module_state->__pyx_kp_u_got);
  Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
  Py_VISIT(traverse_module_state->__pyx_n_s_granulate);
  Py_VISIT(traverse_module_state->__pyx_n_s_harms);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_no_meaningful_channels);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_no_meaningful_framples);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_no_meaningful_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_header_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_hi);
  Py_VISIT(traverse_module_state->__pyx_n_s_high);
  Py_VISIT(traverse_module_state->__pyx_n_s_hop);
  Py_VISIT(traverse_module_state->__pyx_n_s_hz);
  Py_VISIT(traverse_module_state->__pyx_n_s_hz2radians);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_idat);
  Py_VISIT(traverse_module_state->__pyx_n_s_iir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_imag);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_impulse_generator);
  Py_VISIT(traverse_module_state->__pyx_n_s_in_any);
  Py_VISIT(traverse_module_state->__pyx_n_s_ina);
  Py_VISIT(traverse_module_state->__pyx_n_s_inb);
  Py_VISIT(traverse_module_state->__pyx_n_s_ind);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_contents);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_element);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_phase);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_inp);
  Py_VISIT(traverse_module_state->__pyx_n_s_inp_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_input);
  Py_VISIT(traverse_module_state->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a);
  Py_VISIT(traverse_module_state->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_inputcallback);
  Py_VISIT(traverse_module_state->__pyx_n_s_inputs);
  Py_VISIT(traverse_module_state->__pyx_n_s_insig);
  Py_VISIT(traverse_module_state->__pyx_n_s_int);
  Py_VISIT(traverse_module_state->__pyx_n_s_int64);
  Py_VISIT(traverse_module_state->__pyx_n_s_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_interp_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_all_pass_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_array_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_asymmetric_fm);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_biquad);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_convolve);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_delay);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_even);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_file2frample);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_file2sample);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_filtered_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_filtered_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_fir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_firmant);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_formant);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_formant_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_frample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_granulate);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_iir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_list_or_ndarray);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_locsig);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_moving_average);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_moving_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_moving_norm);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_ncos);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_notch);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_nrxycos);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_nrxysin);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_nsin);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_odd);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_one_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_one_pole_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_one_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_oscil);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_oscil_bank);
  Py_VISIT(traverse_module_state->__pyx_kp_u_is_out_of_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_phase_vocoder);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_polyshape);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_polywave);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_power_of_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_pulse_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_pulsed_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_rand);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_rand_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_rxykcos);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_rxyksin);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_sample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_sawtooth_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_square_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_src);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_ssb_am);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_table_lookup);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_tap);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_triangle_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_two_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_two_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_wave_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_zero);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_isfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
  Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
  Py_VISIT(traverse_module_state->__pyx_n_s_jitter);
  Py_VISIT(traverse_module_state->__pyx_n_s_kind);
  Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_length);
  Py_VISIT(traverse_module_state->__pyx_kp_u_length_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_linear2db);
  Py_VISIT(traverse_module_state->__pyx_n_s_linspace);
  Py_VISIT(traverse_module_state->__pyx_n_u_linux);
  Py_VISIT(traverse_module_state->__pyx_n_s_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_lo);
  Py_VISIT(traverse_module_state->__pyx_n_s_loc);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig_ref);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig_reverb_ref);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig_reverb_set);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig_set);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsig_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_locsigdetourcallback);
  Py_VISIT(traverse_module_state->__pyx_n_s_log);
  Py_VISIT(traverse_module_state->__pyx_n_s_loop);
  Py_VISIT(traverse_module_state->__pyx_n_s_low);
  Py_VISIT(traverse_module_state->__pyx_n_s_mabs);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_all_pass_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_array_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_asymmetric_fm);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_band_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_band_reject);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_high_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_low_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_biquad_notch);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_convolve);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_convolve_locals_inp_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_dcblock);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_delay);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_fft_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_file2frample);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_file2sample);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_filtered_comb);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_filtered_comb_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_fir_coeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_fir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_firmant);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_formant);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_formant_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_frample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_granulate);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_granulate_locals_edit_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_granulate_locals_inp_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_iir_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_locsig);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_moving_average);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_moving_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_moving_norm);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_ncos);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_notch);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_nrxycos);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_nrxysin);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_nsin);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_one_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_one_pole_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_one_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_oscil);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_oscil_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_phase_vocoder);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_phase_vocoder_locals_analyz);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_phase_vocoder_locals_edit_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_phase_vocoder_locals_inp_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_phase_vocoder_locals_synthe);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_polyshape);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_polywave);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_pulse_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_pulsed_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_rand);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_rand_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_rxykcos);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_rxyksin);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_sample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_sawtooth_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_square_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_src);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_src_locals_inp_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_ssb_am);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_table_lookup);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_table_lookup_with_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_triangle_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_two_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_two_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_wave_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_wave_train_with_env);
  Py_VISIT(traverse_module_state->__pyx_kp_s_many_useful_windows);
  Py_VISIT(traverse_module_state->__pyx_n_s_map);
  Py_VISIT(traverse_module_state->__pyx_n_s_math);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_size);
  Py_VISIT(traverse_module_state->__pyx_kp_u_maxamp);
  Py_VISIT(traverse_module_state->__pyx_n_s_maxamp_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_maxamp_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_member_names);
  Py_VISIT(traverse_module_state->__pyx_n_s_members);
  Py_VISIT(traverse_module_state->__pyx_n_s_memview);
  Py_VISIT(traverse_module_state->__pyx_n_s_message);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_module_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_move_locsig);
  Py_VISIT(traverse_module_state->__pyx_n_s_moving_average);
  Py_VISIT(traverse_module_state->__pyx_n_s_moving_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_moving_norm);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_array);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_array___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_array___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_cache_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_cache_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_mus_reset);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_set_up_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_set_up_pv_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_set_up_xcoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_any_set_up_ycoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_autocorrelate);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_cepstrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_channels);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_convolution);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_correlate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_mus_data_can_not_be_called_on);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_fft);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_interpolate);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_is_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_is_output);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_order);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_polar2rectangular);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_rectangular2magnitudes);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_rectangular2polar);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_reset);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_spectrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_xcoeffs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_mus_xcoeffs_can_not_be_called_on);
  Py_VISIT(traverse_module_state->__pyx_n_s_mus_ycoeffs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_mus_ycoeffs_can_not_be_called_on);
  Py_VISIT(traverse_module_state->__pyx_n_s_n);
  Py_VISIT(traverse_module_state->__pyx_n_u_n);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ncos);
  Py_VISIT(traverse_module_state->__pyx_n_s_ndarray2file);
  Py_VISIT(traverse_module_state->__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_ndarrays_of_unequal_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
  Py_VISIT(traverse_module_state->__pyx_n_u_ndim);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_power_of_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_VISIT(traverse_module_state->__pyx_kp_u_no_player_specified);
  Py_VISIT(traverse_module_state->__pyx_n_s_norm);
  Py_VISIT(traverse_module_state->__pyx_n_s_norm_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_normalize);
  Py_VISIT(traverse_module_state->__pyx_n_s_normalize_partials);
  Py_VISIT(traverse_module_state->__pyx_kp_u_not_supported);
  Py_VISIT(traverse_module_state->__pyx_n_s_notch);
  Py_VISIT(traverse_module_state->__pyx_n_s_notch_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_np);
  Py_VISIT(traverse_module_state->__pyx_kp_s_npt_NDArray_np_float64);
  Py_VISIT(traverse_module_state->__pyx_n_s_nrxycos);
  Py_VISIT(traverse_module_state->__pyx_n_s_nrxysin);
  Py_VISIT(traverse_module_state->__pyx_n_s_nsin);
  Py_VISIT(traverse_module_state->__pyx_n_s_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
  Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to);
  Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj);
  Py_VISIT(traverse_module_state->__pyx_n_s_object);
  Py_VISIT(traverse_module_state->__pyx_kp_u_object_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_odd_multiple);
  Py_VISIT(traverse_module_state->__pyx_n_s_odd_weight);
  Py_VISIT(traverse_module_state->__pyx_n_s_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_old_srate);
  Py_VISIT(traverse_module_state->__pyx_n_s_omega_t);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_pole_all_pass);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_open);
  Py_VISIT(traverse_module_state->__pyx_n_s_order);
  Py_VISIT(traverse_module_state->__pyx_n_s_orig_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_os);
  Py_VISIT(traverse_module_state->__pyx_n_s_oscil);
  Py_VISIT(traverse_module_state->__pyx_n_s_oscil_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_oscil_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_out_any);
  Py_VISIT(traverse_module_state->__pyx_n_s_out_bank);
  Py_VISIT(traverse_module_state->__pyx_n_s_outa);
  Py_VISIT(traverse_module_state->__pyx_n_s_outb);
  Py_VISIT(traverse_module_state->__pyx_n_s_outc);
  Py_VISIT(traverse_module_state->__pyx_n_s_outd);
  Py_VISIT(traverse_module_state->__pyx_n_s_output);
  Py_VISIT(traverse_module_state->__pyx_kp_u_output_needs_to_be_a_clm_gen_or);
  Py_VISIT(traverse_module_state->__pyx_n_s_output_to_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_outputfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_overlap);
  Py_VISIT(traverse_module_state->__pyx_n_s_pack);
  Py_VISIT(traverse_module_state->__pyx_n_s_parents);
  Py_VISIT(traverse_module_state->__pyx_n_s_partial);
  Py_VISIT(traverse_module_state->__pyx_n_s_partials);
  Py_VISIT(traverse_module_state->__pyx_n_s_partials2polynomial);
  Py_VISIT(traverse_module_state->__pyx_n_s_partials2wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_perf_counter);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_delay);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_partials2wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder_amp_increments);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder_amps);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder_freqs);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder_phase_increments);
  Py_VISIT(traverse_module_state->__pyx_n_s_phase_vocoder_phases);
  Py_VISIT(traverse_module_state->__pyx_n_s_phases);
  Py_VISIT(traverse_module_state->__pyx_n_s_pi);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_pitch);
  Py_VISIT(traverse_module_state->__pyx_n_s_platform);
  Py_VISIT(traverse_module_state->__pyx_n_s_play);
  Py_VISIT(traverse_module_state->__pyx_n_s_player);
  Py_VISIT(traverse_module_state->__pyx_n_s_pm);
  Py_VISIT(traverse_module_state->__pyx_n_s_polar2rectangular);
  Py_VISIT(traverse_module_state->__pyx_n_s_polynomial);
  Py_VISIT(traverse_module_state->__pyx_n_s_polyshape);
  Py_VISIT(traverse_module_state->__pyx_n_s_polyshape_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_polywave);
  Py_VISIT(traverse_module_state->__pyx_n_s_polywave_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_print);
  Py_VISIT(traverse_module_state->__pyx_n_s_pulse_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_pulse_train_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_pulsed_env);
  Py_VISIT(traverse_module_state->__pyx_n_s_pulsed_env_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_kp_u_pysndlib);
  Py_VISIT(traverse_module_state->__pyx_n_s_pysndlib_clm);
  Py_VISIT(traverse_module_state->__pyx_n_s_pysndlib_sndlib);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle___Pyx_EnumMeta);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_array_readin_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_q);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_r);
  Py_VISIT(traverse_module_state->__pyx_n_u_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_radians);
  Py_VISIT(traverse_module_state->__pyx_n_s_radians2degrees);
  Py_VISIT(traverse_module_state->__pyx_n_s_radians2hz);
  Py_VISIT(traverse_module_state->__pyx_n_s_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_ramp);
  Py_VISIT(traverse_module_state->__pyx_n_s_rand);
  Py_VISIT(traverse_module_state->__pyx_n_s_rand_interp);
  Py_VISIT(traverse_module_state->__pyx_n_s_rand_interp_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_rand_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_random);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_rdat);
  Py_VISIT(traverse_module_state->__pyx_n_s_read);
  Py_VISIT(traverse_module_state->__pyx_n_s_reader);
  Py_VISIT(traverse_module_state->__pyx_kp_u_readin);
  Py_VISIT(traverse_module_state->__pyx_n_s_readin_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_real);
  Py_VISIT(traverse_module_state->__pyx_n_s_rectangular2magnitudes);
  Py_VISIT(traverse_module_state->__pyx_n_s_rectangular2polar);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_register);
  Py_VISIT(traverse_module_state->__pyx_n_s_repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_res);
  Py_VISIT(traverse_module_state->__pyx_n_s_reshape);
  Py_VISIT(traverse_module_state->__pyx_n_s_resize);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverb);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverb_channels);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverb_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverb_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverb_to_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_revfile);
  Py_VISIT(traverse_module_state->__pyx_kp_u_revmax);
  Py_VISIT(traverse_module_state->__pyx_n_s_revout);
  Py_VISIT(traverse_module_state->__pyx_n_s_ring_modulate);
  Py_VISIT(traverse_module_state->__pyx_n_s_rl1);
  Py_VISIT(traverse_module_state->__pyx_n_s_rl2);
  Py_VISIT(traverse_module_state->__pyx_n_s_run);
  Py_VISIT(traverse_module_state->__pyx_n_s_rxykcos);
  Py_VISIT(traverse_module_state->__pyx_n_s_rxyksin);
  Py_VISIT(traverse_module_state->__pyx_n_s_s1);
  Py_VISIT(traverse_module_state->__pyx_n_s_s2);
  Py_VISIT(traverse_module_state->__pyx_n_s_s3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_samp);
  Py_VISIT(traverse_module_state->__pyx_n_s_sample2file);
  Py_VISIT(traverse_module_state->__pyx_n_s_sample_type);
  Py_VISIT(traverse_module_state->__pyx_kp_u_samples);
  Py_VISIT(traverse_module_state->__pyx_n_s_samples2seconds);
  Py_VISIT(traverse_module_state->__pyx_n_s_samples_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_sawtooth_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_scaled_by);
  Py_VISIT(traverse_module_state->__pyx_n_s_scaled_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_scaler);
  Py_VISIT(traverse_module_state->__pyx_kp_u_seconds);
  Py_VISIT(traverse_module_state->__pyx_n_s_seconds2samples);
  Py_VISIT(traverse_module_state->__pyx_kp_u_seconds_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_secs);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_send);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_srate);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_up_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_up_pv_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_up_xcoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_up_ycoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_sign);
  Py_VISIT(traverse_module_state->__pyx_n_s_sin);
  Py_VISIT(traverse_module_state->__pyx_n_s_size);
  Py_VISIT(traverse_module_state->__pyx_n_u_size);
  Py_VISIT(traverse_module_state->__pyx_kp_u_size_fft);
  Py_VISIT(traverse_module_state->__pyx_n_s_sndplay);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_spectrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_sqrt);
  Py_VISIT(traverse_module_state->__pyx_n_s_square_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_sr);
  Py_VISIT(traverse_module_state->__pyx_n_s_sr_change);
  Py_VISIT(traverse_module_state->__pyx_n_s_srate);
  Py_VISIT(traverse_module_state->__pyx_n_u_srate);
  Py_VISIT(traverse_module_state->__pyx_n_s_src);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pysndlib_clm_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_ssb_am);
  Py_VISIT(traverse_module_state->__pyx_n_s_ssb_am_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_stable);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_u_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_startswith);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_statistics);
  Py_VISIT(traverse_module_state->__pyx_n_s_statstr);
  Py_VISIT(traverse_module_state->__pyx_n_s_step);
  Py_VISIT(traverse_module_state->__pyx_n_s_stop);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_str_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
  Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
  Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_s_struct);
  Py_VISIT(traverse_module_state->__pyx_n_s_subprocess);
  Py_VISIT(traverse_module_state->__pyx_n_s_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_sweep);
  Py_VISIT(traverse_module_state->__pyx_n_s_synthesize);
  Py_VISIT(traverse_module_state->__pyx_n_s_synthesize_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_synthesizecallback);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_lookup);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_lookup_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_tan);
  Py_VISIT(traverse_module_state->__pyx_n_s_tap);
  Py_VISIT(traverse_module_state->__pyx_n_s_tap_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_tcoeffs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_temp);
  Py_VISIT(traverse_module_state->__pyx_n_s_tempfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_kp_u_test_aif);
  Py_VISIT(traverse_module_state->__pyx_kp_u_test_rev);
  Py_VISIT(traverse_module_state->__pyx_kp_u_test_wav);
  Py_VISIT(traverse_module_state->__pyx_kp_u_this_class_cannot_be_instantiate);
  Py_VISIT(traverse_module_state->__pyx_kp_s_this_is_general_class_to_raise);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_tic);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_times);
  Py_VISIT(traverse_module_state->__pyx_n_s_times_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_partials);
  Py_VISIT(traverse_module_state->__pyx_n_s_toc);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangle_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangle_wave_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_two_pole);
  Py_VISIT(traverse_module_state->__pyx_n_s_two_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_types);
  Py_VISIT(traverse_module_state->__pyx_kp_s_types_of_normalizations_when_us);
  Py_VISIT(traverse_module_state->__pyx_n_s_ucoeffs);
  Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
  Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_kp_s_used_for_polynomial_based_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_v);
  Py_VISIT(traverse_module_state->__pyx_n_s_val);
  Py_VISIT(traverse_module_state->__pyx_n_s_validate_envelope);
  Py_VISIT(traverse_module_state->__pyx_n_s_validate_envelope_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_vals);
  Py_VISIT(traverse_module_state->__pyx_n_s_vals_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_values);
  Py_VISIT(traverse_module_state->__pyx_kp_s_various_interpolation_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_verbose);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_vs);
  Py_VISIT(traverse_module_state->__pyx_n_s_warn);
  Py_VISIT(traverse_module_state->__pyx_n_s_warnings);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_train);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_train_unmodulated);
  Py_VISIT(traverse_module_state->__pyx_n_s_width);
  Py_VISIT(traverse_module_state->__pyx_n_u_width);
  Py_VISIT(traverse_module_state->__pyx_n_s_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_window_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_wrap);
  Py_VISIT(traverse_module_state->__pyx_n_s_wraps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_writing_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_kp_u_x_values_of_envelope_must_be_inc);
  Py_VISIT(traverse_module_state->__pyx_n_s_xcoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_y1);
  Py_VISIT(traverse_module_state->__pyx_n_s_ycoeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_zeros);
  Py_VISIT(traverse_module_state->__pyx_n_s_zip);
  Py_VISIT(traverse_module_state->__pyx_float__4);
  Py_VISIT(traverse_module_state->__pyx_float__5);
  Py_VISIT(traverse_module_state->__pyx_float__6);
  Py_VISIT(traverse_module_state->__pyx_float_0_);
  Py_VISIT(traverse_module_state->__pyx_float_1_);
  Py_VISIT(traverse_module_state->__pyx_float__05);
  Py_VISIT(traverse_module_state->__pyx_float__15);
  Py_VISIT(traverse_module_state->__pyx_float_0_0);
  Py_VISIT(traverse_module_state->__pyx_float_1_0);
  Py_VISIT(traverse_module_state->__pyx_float_2_0);
  Py_VISIT(traverse_module_state->__pyx_float_neg__99);
  Py_VISIT(traverse_module_state->__pyx_float_neg_1_0);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_3);
  Py_VISIT(traverse_module_state->__pyx_int_4);
  Py_VISIT(traverse_module_state->__pyx_int_40);
  Py_VISIT(traverse_module_state->__pyx_int_128);
  Py_VISIT(traverse_module_state->__pyx_int_512);
  Py_VISIT(traverse_module_state->__pyx_int_44100);
  Py_VISIT(traverse_module_state->__pyx_int_65536);
  Py_VISIT(traverse_module_state->__pyx_int_49617724);
  Py_VISIT(traverse_module_state->__pyx_int_112105877);
  Py_VISIT(traverse_module_state->__pyx_int_136983863);
  Py_VISIT(traverse_module_state->__pyx_int_184977713);
  Py_VISIT(traverse_module_state->__pyx_int_185414130);
  Py_VISIT(traverse_module_state->__pyx_int_222419149);
  Py_VISIT(traverse_module_state->__pyx_int_228825662);
  Py_VISIT(traverse_module_state->__pyx_int_232027208);
  Py_VISIT(traverse_module_state->__pyx_int_238750788);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_k__33);
  Py_VISIT(traverse_module_state->__pyx_k__35);
  Py_VISIT(traverse_module_state->__pyx_slice__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__4);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_slice__21);
  Py_VISIT(traverse_module_state->__pyx_slice__25);
  Py_VISIT(traverse_module_state->__pyx_slice__30);
  Py_VISIT(traverse_module_state->__pyx_slice__31);
  Py_VISIT(traverse_module_state->__pyx_tuple__10);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__12);
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__23);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__41);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__49);
  Py_VISIT(traverse_module_state->__pyx_tuple__50);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__64);
  Py_VISIT(traverse_module_state->__pyx_tuple__67);
  Py_VISIT(traverse_module_state->__pyx_tuple__70);
  Py_VISIT(traverse_module_state->__pyx_tuple__71);
  Py_VISIT(traverse_module_state->__pyx_tuple__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__78);
  Py_VISIT(traverse_module_state->__pyx_tuple__84);
  Py_VISIT(traverse_module_state->__pyx_tuple__86);
  Py_VISIT(traverse_module_state->__pyx_tuple__87);
  Py_VISIT(traverse_module_state->__pyx_tuple__88);
  Py_VISIT(traverse_module_state->__pyx_tuple__89);
  Py_VISIT(traverse_module_state->__pyx_tuple__90);
  Py_VISIT(traverse_module_state->__pyx_tuple__91);
  Py_VISIT(traverse_module_state->__pyx_tuple__92);
  Py_VISIT(traverse_module_state->__pyx_tuple__93);
  Py_VISIT(traverse_module_state->__pyx_tuple__94);
  Py_VISIT(traverse_module_state->__pyx_tuple__96);
  Py_VISIT(traverse_module_state->__pyx_tuple__97);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__99);
  Py_VISIT(traverse_module_state->__pyx_tuple__101);
  Py_VISIT(traverse_module_state->__pyx_tuple__103);
  Py_VISIT(traverse_module_state->__pyx_tuple__104);
  Py_VISIT(traverse_module_state->__pyx_tuple__106);
  Py_VISIT(traverse_module_state->__pyx_tuple__107);
  Py_VISIT(traverse_module_state->__pyx_tuple__109);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__114);
  Py_VISIT(traverse_module_state->__pyx_tuple__119);
  Py_VISIT(traverse_module_state->__pyx_tuple__121);
  Py_VISIT(traverse_module_state->__pyx_tuple__126);
  Py_VISIT(traverse_module_state->__pyx_tuple__128);
  Py_VISIT(traverse_module_state->__pyx_tuple__130);
  Py_VISIT(traverse_module_state->__pyx_tuple__131);
  Py_VISIT(traverse_module_state->__pyx_tuple__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__133);
  Py_VISIT(traverse_module_state->__pyx_tuple__135);
  Py_VISIT(traverse_module_state->__pyx_tuple__138);
  Py_VISIT(traverse_module_state->__pyx_tuple__140);
  Py_VISIT(traverse_module_state->__pyx_tuple__144);
  Py_VISIT(traverse_module_state->__pyx_tuple__146);
  Py_VISIT(traverse_module_state->__pyx_tuple__156);
  Py_VISIT(traverse_module_state->__pyx_tuple__157);
  Py_VISIT(traverse_module_state->__pyx_tuple__160);
  Py_VISIT(traverse_module_state->__pyx_tuple__164);
  Py_VISIT(traverse_module_state->__pyx_tuple__166);
  Py_VISIT(traverse_module_state->__pyx_tuple__168);
  Py_VISIT(traverse_module_state->__pyx_tuple__173);
  Py_VISIT(traverse_module_state->__pyx_tuple__178);
  Py_VISIT(traverse_module_state->__pyx_tuple__180);
  Py_VISIT(traverse_module_state->__pyx_tuple__182);
  Py_VISIT(traverse_module_state->__pyx_tuple__184);
  Py_VISIT(traverse_module_state->__pyx_tuple__186);
  Py_VISIT(traverse_module_state->__pyx_tuple__188);
  Py_VISIT(traverse_module_state->__pyx_tuple__190);
  Py_VISIT(traverse_module_state->__pyx_tuple__191);
  Py_VISIT(traverse_module_state->__pyx_tuple__193);
  Py_VISIT(traverse_module_state->__pyx_tuple__195);
  Py_VISIT(traverse_module_state->__pyx_tuple__198);
  Py_VISIT(traverse_module_state->__pyx_tuple__200);
  Py_VISIT(traverse_module_state->__pyx_tuple__201);
  Py_VISIT(traverse_module_state->__pyx_tuple__203);
  Py_VISIT(traverse_module_state->__pyx_tuple__204);
  Py_VISIT(traverse_module_state->__pyx_tuple__207);
  Py_VISIT(traverse_module_state->__pyx_tuple__214);
  Py_VISIT(traverse_module_state->__pyx_tuple__217);
  Py_VISIT(traverse_module_state->__pyx_tuple__219);
  Py_VISIT(traverse_module_state->__pyx_tuple__221);
  Py_VISIT(traverse_module_state->__pyx_tuple__228);
  Py_VISIT(traverse_module_state->__pyx_tuple__230);
  Py_VISIT(traverse_module_state->__pyx_tuple__232);
  Py_VISIT(traverse_module_state->__pyx_tuple__233);
  Py_VISIT(traverse_module_state->__pyx_tuple__235);
  Py_VISIT(traverse_module_state->__pyx_tuple__237);
  Py_VISIT(traverse_module_state->__pyx_tuple__239);
  Py_VISIT(traverse_module_state->__pyx_tuple__241);
  Py_VISIT(traverse_module_state->__pyx_tuple__243);
  Py_VISIT(traverse_module_state->__pyx_tuple__245);
  Py_VISIT(traverse_module_state->__pyx_tuple__246);
  Py_VISIT(traverse_module_state->__pyx_tuple__248);
  Py_VISIT(traverse_module_state->__pyx_tuple__251);
  Py_VISIT(traverse_module_state->__pyx_tuple__253);
  Py_VISIT(traverse_module_state->__pyx_tuple__256);
  Py_VISIT(traverse_module_state->__pyx_tuple__258);
  Py_VISIT(traverse_module_state->__pyx_tuple__261);
  Py_VISIT(traverse_module_state->__pyx_tuple__265);
  Py_VISIT(traverse_module_state->__pyx_tuple__267);
  Py_VISIT(traverse_module_state->__pyx_tuple__269);
  Py_VISIT(traverse_module_state->__pyx_tuple__271);
  Py_VISIT(traverse_module_state->__pyx_tuple__274);
  Py_VISIT(traverse_module_state->__pyx_tuple__277);
  Py_VISIT(traverse_module_state->__pyx_tuple__280);
  Py_VISIT(traverse_module_state->__pyx_tuple__282);
  Py_VISIT(traverse_module_state->__pyx_tuple__285);
  Py_VISIT(traverse_module_state->__pyx_tuple__288);
  Py_VISIT(traverse_module_state->__pyx_tuple__290);
  Py_VISIT(traverse_module_state->__pyx_tuple__292);
  Py_VISIT(traverse_module_state->__pyx_tuple__293);
  Py_VISIT(traverse_module_state->__pyx_tuple__295);
  Py_VISIT(traverse_module_state->__pyx_tuple__297);
  Py_VISIT(traverse_module_state->__pyx_tuple__300);
  Py_VISIT(traverse_module_state->__pyx_tuple__304);
  Py_VISIT(traverse_module_state->__pyx_tuple__306);
  Py_VISIT(traverse_module_state->__pyx_tuple__310);
  Py_VISIT(traverse_module_state->__pyx_tuple__314);
  Py_VISIT(traverse_module_state->__pyx_tuple__317);
  Py_VISIT(traverse_module_state->__pyx_tuple__320);
  Py_VISIT(traverse_module_state->__pyx_tuple__324);
  Py_VISIT(traverse_module_state->__pyx_tuple__326);
  Py_VISIT(traverse_module_state->__pyx_tuple__328);
  Py_VISIT(traverse_module_state->__pyx_tuple__330);
  Py_VISIT(traverse_module_state->__pyx_tuple__333);
  Py_VISIT(traverse_module_state->__pyx_tuple__335);
  Py_VISIT(traverse_module_state->__pyx_tuple__337);
  Py_VISIT(traverse_module_state->__pyx_tuple__339);
  Py_VISIT(traverse_module_state->__pyx_tuple__341);
  Py_VISIT(traverse_module_state->__pyx_tuple__344);
  Py_VISIT(traverse_module_state->__pyx_tuple__346);
  Py_VISIT(traverse_module_state->__pyx_tuple__348);
  Py_VISIT(traverse_module_state->__pyx_tuple__350);
  Py_VISIT(traverse_module_state->__pyx_tuple__351);
  Py_VISIT(traverse_module_state->__pyx_tuple__353);
  Py_VISIT(traverse_module_state->__pyx_tuple__354);
  Py_VISIT(traverse_module_state->__pyx_tuple__357);
  Py_VISIT(traverse_module_state->__pyx_tuple__360);
  Py_VISIT(traverse_module_state->__pyx_tuple__364);
  Py_VISIT(traverse_module_state->__pyx_tuple__366);
  Py_VISIT(traverse_module_state->__pyx_tuple__367);
  Py_VISIT(traverse_module_state->__pyx_tuple__369);
  Py_VISIT(traverse_module_state->__pyx_tuple__373);
  Py_VISIT(traverse_module_state->__pyx_tuple__375);
  Py_VISIT(traverse_module_state->__pyx_tuple__378);
  Py_VISIT(traverse_module_state->__pyx_tuple__382);
  Py_VISIT(traverse_module_state->__pyx_tuple__386);
  Py_VISIT(traverse_module_state->__pyx_tuple__390);
  Py_VISIT(traverse_module_state->__pyx_tuple__394);
  Py_VISIT(traverse_module_state->__pyx_tuple__396);
  Py_VISIT(traverse_module_state->__pyx_tuple__398);
  Py_VISIT(traverse_module_state->__pyx_tuple__400);
  Py_VISIT(traverse_module_state->__pyx_tuple__402);
  Py_VISIT(traverse_module_state->__pyx_tuple__407);
  Py_VISIT(traverse_module_state->__pyx_tuple__409);
  Py_VISIT(traverse_module_state->__pyx_tuple__413);
  Py_VISIT(traverse_module_state->__pyx_tuple__417);
  Py_VISIT(traverse_module_state->__pyx_tuple__421);
  Py_VISIT(traverse_module_state->__pyx_tuple__423);
  Py_VISIT(traverse_module_state->__pyx_tuple__425);
  Py_VISIT(traverse_module_state->__pyx_tuple__427);
  Py_VISIT(traverse_module_state->__pyx_tuple__430);
  Py_VISIT(traverse_module_state->__pyx_tuple__432);
  Py_VISIT(traverse_module_state->__pyx_tuple__436);
  Py_VISIT(traverse_module_state->__pyx_tuple__440);
  Py_VISIT(traverse_module_state->__pyx_tuple__444);
  Py_VISIT(traverse_module_state->__pyx_tuple__447);
  Py_VISIT(traverse_module_state->__pyx_tuple__450);
  Py_VISIT(traverse_module_state->__pyx_tuple__454);
  Py_VISIT(traverse_module_state->__pyx_tuple__457);
  Py_VISIT(traverse_module_state->__pyx_tuple__460);
  Py_VISIT(traverse_module_state->__pyx_tuple__464);
  Py_VISIT(traverse_module_state->__pyx_tuple__468);
  Py_VISIT(traverse_module_state->__pyx_tuple__472);
  Py_VISIT(traverse_module_state->__pyx_tuple__474);
  Py_VISIT(traverse_module_state->__pyx_tuple__478);
  Py_VISIT(traverse_module_state->__pyx_tuple__481);
  Py_VISIT(traverse_module_state->__pyx_tuple__483);
  Py_VISIT(traverse_module_state->__pyx_tuple__486);
  Py_VISIT(traverse_module_state->__pyx_tuple__488);
  Py_VISIT(traverse_module_state->__pyx_tuple__490);
  Py_VISIT(traverse_module_state->__pyx_tuple__493);
  Py_VISIT(traverse_module_state->__pyx_tuple__495);
  Py_VISIT(traverse_module_state->__pyx_tuple__498);
  Py_VISIT(traverse_module_state->__pyx_tuple__500);
  Py_VISIT(traverse_module_state->__pyx_tuple__501);
  Py_VISIT(traverse_module_state->__pyx_tuple__504);
  Py_VISIT(traverse_module_state->__pyx_tuple__507);
  Py_VISIT(traverse_module_state->__pyx_tuple__511);
  Py_VISIT(traverse_module_state->__pyx_tuple__515);
  Py_VISIT(traverse_module_state->__pyx_tuple__517);
  Py_VISIT(traverse_module_state->__pyx_tuple__520);
  Py_VISIT(traverse_module_state->__pyx_tuple__522);
  Py_VISIT(traverse_module_state->__pyx_tuple__524);
  Py_VISIT(traverse_module_state->__pyx_tuple__526);
  Py_VISIT(traverse_module_state->__pyx_tuple__530);
  Py_VISIT(traverse_module_state->__pyx_tuple__532);
  Py_VISIT(traverse_module_state->__pyx_tuple__534);
  Py_VISIT(traverse_module_state->__pyx_tuple__536);
  Py_VISIT(traverse_module_state->__pyx_tuple__538);
  Py_VISIT(traverse_module_state->__pyx_tuple__546);
  Py_VISIT(traverse_module_state->__pyx_tuple__548);
  Py_VISIT(traverse_module_state->__pyx_tuple__553);
  Py_VISIT(traverse_module_state->__pyx_tuple__555);
  Py_VISIT(traverse_module_state->__pyx_tuple__557);
  Py_VISIT(traverse_module_state->__pyx_tuple__560);
  Py_VISIT(traverse_module_state->__pyx_tuple__562);
  Py_VISIT(traverse_module_state->__pyx_tuple__565);
  Py_VISIT(traverse_module_state->__pyx_tuple__567);
  Py_VISIT(traverse_module_state->__pyx_tuple__571);
  Py_VISIT(traverse_module_state->__pyx_tuple__573);
  Py_VISIT(traverse_module_state->__pyx_tuple__575);
  Py_VISIT(traverse_module_state->__pyx_tuple__578);
  Py_VISIT(traverse_module_state->__pyx_tuple__582);
  Py_VISIT(traverse_module_state->__pyx_tuple__584);
  Py_VISIT(traverse_module_state->__pyx_tuple__590);
  Py_VISIT(traverse_module_state->__pyx_tuple__592);
  Py_VISIT(traverse_module_state->__pyx_tuple__597);
  Py_VISIT(traverse_module_state->__pyx_tuple__599);
  Py_VISIT(traverse_module_state->__pyx_tuple__602);
  Py_VISIT(traverse_module_state->__pyx_tuple__605);
  Py_VISIT(traverse_module_state->__pyx_tuple__607);
  Py_VISIT(traverse_module_state->__pyx_tuple__609);
  Py_VISIT(traverse_module_state->__pyx_tuple__610);
  Py_VISIT(traverse_module_state->__pyx_tuple__612);
  Py_VISIT(traverse_module_state->__pyx_tuple__614);
  Py_VISIT(traverse_module_state->__pyx_tuple__616);
  Py_VISIT(traverse_module_state->__pyx_tuple__618);
  Py_VISIT(traverse_module_state->__pyx_tuple__622);
  Py_VISIT(traverse_module_state->__pyx_tuple__627);
  Py_VISIT(traverse_module_state->__pyx_codeobj__51);
  Py_VISIT(traverse_module_state->__pyx_codeobj__52);
  Py_VISIT(traverse_module_state->__pyx_codeobj__53);
  Py_VISIT(traverse_module_state->__pyx_codeobj__55);
  Py_VISIT(traverse_module_state->__pyx_codeobj__56);
  Py_VISIT(traverse_module_state->__pyx_codeobj__57);
  Py_VISIT(traverse_module_state->__pyx_codeobj__59);
  Py_VISIT(traverse_module_state->__pyx_codeobj__60);
  Py_VISIT(traverse_module_state->__pyx_codeobj__65);
  Py_VISIT(traverse_module_state->__pyx_codeobj__66);
  Py_VISIT(traverse_module_state->__pyx_codeobj__68);
  Py_VISIT(traverse_module_state->__pyx_codeobj__69);
  Py_VISIT(traverse_module_state->__pyx_codeobj__72);
  Py_VISIT(traverse_module_state->__pyx_codeobj__74);
  Py_VISIT(traverse_module_state->__pyx_codeobj__76);
  Py_VISIT(traverse_module_state->__pyx_codeobj__79);
  Py_VISIT(traverse_module_state->__pyx_codeobj__80);
  Py_VISIT(traverse_module_state->__pyx_codeobj__81);
  Py_VISIT(traverse_module_state->__pyx_codeobj__82);
  Py_VISIT(traverse_module_state->__pyx_codeobj__83);
  Py_VISIT(traverse_module_state->__pyx_codeobj__85);
  Py_VISIT(traverse_module_state->__pyx_codeobj__95);
  Py_VISIT(traverse_module_state->__pyx_codeobj__100);
  Py_VISIT(traverse_module_state->__pyx_codeobj__102);
  Py_VISIT(traverse_module_state->__pyx_codeobj__105);
  Py_VISIT(traverse_module_state->__pyx_codeobj__108);
  Py_VISIT(traverse_module_state->__pyx_codeobj__110);
  Py_VISIT(traverse_module_state->__pyx_codeobj__111);
  Py_VISIT(traverse_module_state->__pyx_codeobj__113);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__116);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__118);
  Py_VISIT(traverse_module_state->__pyx_codeobj__120);
  Py_VISIT(traverse_module_state->__pyx_codeobj__122);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__124);
  Py_VISIT(traverse_module_state->__pyx_codeobj__125);
  Py_VISIT(traverse_module_state->__pyx_codeobj__127);
  Py_VISIT(traverse_module_state->__pyx_codeobj__129);
  Py_VISIT(traverse_module_state->__pyx_codeobj__134);
  Py_VISIT(traverse_module_state->__pyx_codeobj__136);
  Py_VISIT(traverse_module_state->__pyx_codeobj__139);
  Py_VISIT(traverse_module_state->__pyx_codeobj__141);
  Py_VISIT(traverse_module_state->__pyx_codeobj__142);
  Py_VISIT(traverse_module_state->__pyx_codeobj__143);
  Py_VISIT(traverse_module_state->__pyx_codeobj__145);
  Py_VISIT(traverse_module_state->__pyx_codeobj__147);
  Py_VISIT(traverse_module_state->__pyx_codeobj__148);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__150);
  Py_VISIT(traverse_module_state->__pyx_codeobj__151);
  Py_VISIT(traverse_module_state->__pyx_codeobj__152);
  Py_VISIT(traverse_module_state->__pyx_codeobj__153);
  Py_VISIT(traverse_module_state->__pyx_codeobj__154);
  Py_VISIT(traverse_module_state->__pyx_codeobj__155);
  Py_VISIT(traverse_module_state->__pyx_codeobj__158);
  Py_VISIT(traverse_module_state->__pyx_codeobj__159);
  Py_VISIT(traverse_module_state->__pyx_codeobj__161);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__163);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__167);
  Py_VISIT(traverse_module_state->__pyx_codeobj__169);
  Py_VISIT(traverse_module_state->__pyx_codeobj__170);
  Py_VISIT(traverse_module_state->__pyx_codeobj__171);
  Py_VISIT(traverse_module_state->__pyx_codeobj__172);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__175);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  Py_VISIT(traverse_module_state->__pyx_codeobj__177);
  Py_VISIT(traverse_module_state->__pyx_codeobj__179);
  Py_VISIT(traverse_module_state->__pyx_codeobj__181);
  Py_VISIT(traverse_module_state->__pyx_codeobj__183);
  Py_VISIT(traverse_module_state->__pyx_codeobj__185);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__189);
  Py_VISIT(traverse_module_state->__pyx_codeobj__192);
  Py_VISIT(traverse_module_state->__pyx_codeobj__194);
  Py_VISIT(traverse_module_state->__pyx_codeobj__196);
  Py_VISIT(traverse_module_state->__pyx_codeobj__197);
  Py_VISIT(traverse_module_state->__pyx_codeobj__199);
  Py_VISIT(traverse_module_state->__pyx_codeobj__202);
  Py_VISIT(traverse_module_state->__pyx_codeobj__205);
  Py_VISIT(traverse_module_state->__pyx_codeobj__206);
  Py_VISIT(traverse_module_state->__pyx_codeobj__208);
  Py_VISIT(traverse_module_state->__pyx_codeobj__209);
  Py_VISIT(traverse_module_state->__pyx_codeobj__210);
  Py_VISIT(traverse_module_state->__pyx_codeobj__211);
  Py_VISIT(traverse_module_state->__pyx_codeobj__212);
  Py_VISIT(traverse_module_state->__pyx_codeobj__213);
  Py_VISIT(traverse_module_state->__pyx_codeobj__215);
  Py_VISIT(traverse_module_state->__pyx_codeobj__216);
  Py_VISIT(traverse_module_state->__pyx_codeobj__218);
  Py_VISIT(traverse_module_state->__pyx_codeobj__220);
  Py_VISIT(traverse_module_state->__pyx_codeobj__222);
  Py_VISIT(traverse_module_state->__pyx_codeobj__223);
  Py_VISIT(traverse_module_state->__pyx_codeobj__224);
  Py_VISIT(traverse_module_state->__pyx_codeobj__225);
  Py_VISIT(traverse_module_state->__pyx_codeobj__226);
  Py_VISIT(traverse_module_state->__pyx_codeobj__227);
  Py_VISIT(traverse_module_state->__pyx_codeobj__229);
  Py_VISIT(traverse_module_state->__pyx_codeobj__231);
  Py_VISIT(traverse_module_state->__pyx_codeobj__234);
  Py_VISIT(traverse_module_state->__pyx_codeobj__236);
  Py_VISIT(traverse_module_state->__pyx_codeobj__238);
  Py_VISIT(traverse_module_state->__pyx_codeobj__240);
  Py_VISIT(traverse_module_state->__pyx_codeobj__242);
  Py_VISIT(traverse_module_state->__pyx_codeobj__244);
  Py_VISIT(traverse_module_state->__pyx_codeobj__247);
  Py_VISIT(traverse_module_state->__pyx_codeobj__249);
  Py_VISIT(traverse_module_state->__pyx_codeobj__250);
  Py_VISIT(traverse_module_state->__pyx_codeobj__252);
  Py_VISIT(traverse_module_state->__pyx_codeobj__254);
  Py_VISIT(traverse_module_state->__pyx_codeobj__255);
  Py_VISIT(traverse_module_state->__pyx_codeobj__257);
  Py_VISIT(traverse_module_state->__pyx_codeobj__259);
  Py_VISIT(traverse_module_state->__pyx_codeobj__260);
  Py_VISIT(traverse_module_state->__pyx_codeobj__262);
  Py_VISIT(traverse_module_state->__pyx_codeobj__263);
  Py_VISIT(traverse_module_state->__pyx_codeobj__264);
  Py_VISIT(traverse_module_state->__pyx_codeobj__266);
  Py_VISIT(traverse_module_state->__pyx_codeobj__268);
  Py_VISIT(traverse_module_state->__pyx_codeobj__270);
  Py_VISIT(traverse_module_state->__pyx_codeobj__272);
  Py_VISIT(traverse_module_state->__pyx_codeobj__273);
  Py_VISIT(traverse_module_state->__pyx_codeobj__275);
  Py_VISIT(traverse_module_state->__pyx_codeobj__276);
  Py_VISIT(traverse_module_state->__pyx_codeobj__278);
  Py_VISIT(traverse_module_state->__pyx_codeobj__279);
  Py_VISIT(traverse_module_state->__pyx_codeobj__281);
  Py_VISIT(traverse_module_state->__pyx_codeobj__283);
  Py_VISIT(traverse_module_state->__pyx_codeobj__284);
  Py_VISIT(traverse_module_state->__pyx_codeobj__286);
  Py_VISIT(traverse_module_state->__pyx_codeobj__287);
  Py_VISIT(traverse_module_state->__pyx_codeobj__289);
  Py_VISIT(traverse_module_state->__pyx_codeobj__291);
  Py_VISIT(traverse_module_state->__pyx_codeobj__294);
  Py_VISIT(traverse_module_state->__pyx_codeobj__296);
  Py_VISIT(traverse_module_state->__pyx_codeobj__298);
  Py_VISIT(traverse_module_state->__pyx_codeobj__299);
  Py_VISIT(traverse_module_state->__pyx_codeobj__301);
  Py_VISIT(traverse_module_state->__pyx_codeobj__302);
  Py_VISIT(traverse_module_state->__pyx_codeobj__303);
  Py_VISIT(traverse_module_state->__pyx_codeobj__305);
  Py_VISIT(traverse_module_state->__pyx_codeobj__307);
  Py_VISIT(traverse_module_state->__pyx_codeobj__308);
  Py_VISIT(traverse_module_state->__pyx_codeobj__309);
  Py_VISIT(traverse_module_state->__pyx_codeobj__311);
  Py_VISIT(traverse_module_state->__pyx_codeobj__312);
  Py_VISIT(traverse_module_state->__pyx_codeobj__313);
  Py_VISIT(traverse_module_state->__pyx_codeobj__315);
  Py_VISIT(traverse_module_state->__pyx_codeobj__316);
  Py_VISIT(traverse_module_state->__pyx_codeobj__318);
  Py_VISIT(traverse_module_state->__pyx_codeobj__319);
  Py_VISIT(traverse_module_state->__pyx_codeobj__321);
  Py_VISIT(traverse_module_state->__pyx_codeobj__322);
  Py_VISIT(traverse_module_state->__pyx_codeobj__323);
  Py_VISIT(traverse_module_state->__pyx_codeobj__325);
  Py_VISIT(traverse_module_state->__pyx_codeobj__327);
  Py_VISIT(traverse_module_state->__pyx_codeobj__329);
  Py_VISIT(traverse_module_state->__pyx_codeobj__331);
  Py_VISIT(traverse_module_state->__pyx_codeobj__332);
  Py_VISIT(traverse_module_state->__pyx_codeobj__334);
  Py_VISIT(traverse_module_state->__pyx_codeobj__336);
  Py_VISIT(traverse_module_state->__pyx_codeobj__338);
  Py_VISIT(traverse_module_state->__pyx_codeobj__340);
  Py_VISIT(traverse_module_state->__pyx_codeobj__342);
  Py_VISIT(traverse_module_state->__pyx_codeobj__343);
  Py_VISIT(traverse_module_state->__pyx_codeobj__345);
  Py_VISIT(traverse_module_state->__pyx_codeobj__347);
  Py_VISIT(traverse_module_state->__pyx_codeobj__349);
  Py_VISIT(traverse_module_state->__pyx_codeobj__352);
  Py_VISIT(traverse_module_state->__pyx_codeobj__355);
  Py_VISIT(traverse_module_state->__pyx_codeobj__356);
  Py_VISIT(traverse_module_state->__pyx_codeobj__358);
  Py_VISIT(traverse_module_state->__pyx_codeobj__359);
  Py_VISIT(traverse_module_state->__pyx_codeobj__361);
  Py_VISIT(traverse_module_state->__pyx_codeobj__362);
  Py_VISIT(traverse_module_state->__pyx_codeobj__363);
  Py_VISIT(traverse_module_state->__pyx_codeobj__365);
  Py_VISIT(traverse_module_state->__pyx_codeobj__368);
  Py_VISIT(traverse_module_state->__pyx_codeobj__370);
  Py_VISIT(traverse_module_state->__pyx_codeobj__371);
  Py_VISIT(traverse_module_state->__pyx_codeobj__372);
  Py_VISIT(traverse_module_state->__pyx_codeobj__374);
  Py_VISIT(traverse_module_state->__pyx_codeobj__376);
  Py_VISIT(traverse_module_state->__pyx_codeobj__377);
  Py_VISIT(traverse_module_state->__pyx_codeobj__379);
  Py_VISIT(traverse_module_state->__pyx_codeobj__380);
  Py_VISIT(traverse_module_state->__pyx_codeobj__381);
  Py_VISIT(traverse_module_state->__pyx_codeobj__383);
  Py_VISIT(traverse_module_state->__pyx_codeobj__384);
  Py_VISIT(traverse_module_state->__pyx_codeobj__385);
  Py_VISIT(traverse_module_state->__pyx_codeobj__387);
  Py_VISIT(traverse_module_state->__pyx_codeobj__388);
  Py_VISIT(traverse_module_state->__pyx_codeobj__389);
  Py_VISIT(traverse_module_state->__pyx_codeobj__391);
  Py_VISIT(traverse_module_state->__pyx_codeobj__392);
  Py_VISIT(traverse_module_state->__pyx_codeobj__393);
  Py_VISIT(traverse_module_state->__pyx_codeobj__395);
  Py_VISIT(traverse_module_state->__pyx_codeobj__397);
  Py_VISIT(traverse_module_state->__pyx_codeobj__399);
  Py_VISIT(traverse_module_state->__pyx_codeobj__401);
  Py_VISIT(traverse_module_state->__pyx_codeobj__403);
  Py_VISIT(traverse_module_state->__pyx_codeobj__404);
  Py_VISIT(traverse_module_state->__pyx_codeobj__405);
  Py_VISIT(traverse_module_state->__pyx_codeobj__406);
  Py_VISIT(traverse_module_state->__pyx_codeobj__408);
  Py_VISIT(traverse_module_state->__pyx_codeobj__410);
  Py_VISIT(traverse_module_state->__pyx_codeobj__411);
  Py_VISIT(traverse_module_state->__pyx_codeobj__412);
  Py_VISIT(traverse_module_state->__pyx_codeobj__414);
  Py_VISIT(traverse_module_state->__pyx_codeobj__415);
  Py_VISIT(traverse_module_state->__pyx_codeobj__416);
  Py_VISIT(traverse_module_state->__pyx_codeobj__418);
  Py_VISIT(traverse_module_state->__pyx_codeobj__419);
  Py_VISIT(traverse_module_state->__pyx_codeobj__420);
  Py_VISIT(traverse_module_state->__pyx_codeobj__422);
  Py_VISIT(traverse_module_state->__pyx_codeobj__424);
  Py_VISIT(traverse_module_state->__pyx_codeobj__426);
  Py_VISIT(traverse_module_state->__pyx_codeobj__428);
  Py_VISIT(traverse_module_state->__pyx_codeobj__429);
  Py_VISIT(traverse_module_state->__pyx_codeobj__431);
  Py_VISIT(traverse_module_state->__pyx_codeobj__433);
  Py_VISIT(traverse_module_state->__pyx_codeobj__434);
  Py_VISIT(traverse_module_state->__pyx_codeobj__435);
  Py_VISIT(traverse_module_state->__pyx_codeobj__437);
  Py_VISIT(traverse_module_state->__pyx_codeobj__438);
  Py_VISIT(traverse_module_state->__pyx_codeobj__439);
  Py_VISIT(traverse_module_state->__pyx_codeobj__441);
  Py_VISIT(traverse_module_state->__pyx_codeobj__442);
  Py_VISIT(traverse_module_state->__pyx_codeobj__443);
  Py_VISIT(traverse_module_state->__pyx_codeobj__445);
  Py_VISIT(traverse_module_state->__pyx_codeobj__446);
  Py_VISIT(traverse_module_state->__pyx_codeobj__448);
  Py_VISIT(traverse_module_state->__pyx_codeobj__449);
  Py_VISIT(traverse_module_state->__pyx_codeobj__451);
  Py_VISIT(traverse_module_state->__pyx_codeobj__452);
  Py_VISIT(traverse_module_state->__pyx_codeobj__453);
  Py_VISIT(traverse_module_state->__pyx_codeobj__455);
  Py_VISIT(traverse_module_state->__pyx_codeobj__456);
  Py_VISIT(traverse_module_state->__pyx_codeobj__458);
  Py_VISIT(traverse_module_state->__pyx_codeobj__459);
  Py_VISIT(traverse_module_state->__pyx_codeobj__461);
  Py_VISIT(traverse_module_state->__pyx_codeobj__462);
  Py_VISIT(traverse_module_state->__pyx_codeobj__463);
  Py_VISIT(traverse_module_state->__pyx_codeobj__465);
  Py_VISIT(traverse_module_state->__pyx_codeobj__466);
  Py_VISIT(traverse_module_state->__pyx_codeobj__467);
  Py_VISIT(traverse_module_state->__pyx_codeobj__469);
  Py_VISIT(traverse_module_state->__pyx_codeobj__470);
  Py_VISIT(traverse_module_state->__pyx_codeobj__471);
  Py_VISIT(traverse_module_state->__pyx_codeobj__473);
  Py_VISIT(traverse_module_state->__pyx_codeobj__475);
  Py_VISIT(traverse_module_state->__pyx_codeobj__476);
  Py_VISIT(traverse_module_state->__pyx_codeobj__477);
  Py_VISIT(traverse_module_state->__pyx_codeobj__479);
  Py_VISIT(traverse_module_state->__pyx_codeobj__480);
  Py_VISIT(traverse_module_state->__pyx_codeobj__482);
  Py_VISIT(traverse_module_state->__pyx_codeobj__484);
  Py_VISIT(traverse_module_state->__pyx_codeobj__485);
  Py_VISIT(traverse_module_state->__pyx_codeobj__487);
  Py_VISIT(traverse_module_state->__pyx_codeobj__489);
  Py_VISIT(traverse_module_state->__pyx_codeobj__491);
  Py_VISIT(traverse_module_state->__pyx_codeobj__492);
  Py_VISIT(traverse_module_state->__pyx_codeobj__494);
  Py_VISIT(traverse_module_state->__pyx_codeobj__496);
  Py_VISIT(traverse_module_state->__pyx_codeobj__497);
  Py_VISIT(traverse_module_state->__pyx_codeobj__499);
  Py_VISIT(traverse_module_state->__pyx_codeobj__502);
  Py_VISIT(traverse_module_state->__pyx_codeobj__503);
  Py_VISIT(traverse_module_state->__pyx_codeobj__505);
  Py_VISIT(traverse_module_state->__pyx_codeobj__506);
  Py_VISIT(traverse_module_state->__pyx_codeobj__508);
  Py_VISIT(traverse_module_state->__pyx_codeobj__509);
  Py_VISIT(traverse_module_state->__pyx_codeobj__510);
  Py_VISIT(traverse_module_state->__pyx_codeobj__512);
  Py_VISIT(traverse_module_state->__pyx_codeobj__513);
  Py_VISIT(traverse_module_state->__pyx_codeobj__514);
  Py_VISIT(traverse_module_state->__pyx_codeobj__516);
  Py_VISIT(traverse_module_state->__pyx_codeobj__518);
  Py_VISIT(traverse_module_state->__pyx_codeobj__519);
  Py_VISIT(traverse_module_state->__pyx_codeobj__521);
  Py_VISIT(traverse_module_state->__pyx_codeobj__523);
  Py_VISIT(traverse_module_state->__pyx_codeobj__525);
  Py_VISIT(traverse_module_state->__pyx_codeobj__527);
  Py_VISIT(traverse_module_state->__pyx_codeobj__528);
  Py_VISIT(traverse_module_state->__pyx_codeobj__529);
  Py_VISIT(traverse_module_state->__pyx_codeobj__531);
  Py_VISIT(traverse_module_state->__pyx_codeobj__533);
  Py_VISIT(traverse_module_state->__pyx_codeobj__535);
  Py_VISIT(traverse_module_state->__pyx_codeobj__537);
  Py_VISIT(traverse_module_state->__pyx_codeobj__539);
  Py_VISIT(traverse_module_state->__pyx_codeobj__540);
  Py_VISIT(traverse_module_state->__pyx_codeobj__541);
  Py_VISIT(traverse_module_state->__pyx_codeobj__542);
  Py_VISIT(traverse_module_state->__pyx_codeobj__543);
  Py_VISIT(traverse_module_state->__pyx_codeobj__544);
  Py_VISIT(traverse_module_state->__pyx_codeobj__545);
  Py_VISIT(traverse_module_state->__pyx_codeobj__547);
  Py_VISIT(traverse_module_state->__pyx_codeobj__549);
  Py_VISIT(traverse_module_state->__pyx_codeobj__550);
  Py_VISIT(traverse_module_state->__pyx_codeobj__551);
  Py_VISIT(traverse_module_state->__pyx_codeobj__552);
  Py_VISIT(traverse_module_state->__pyx_codeobj__554);
  Py_VISIT(traverse_module_state->__pyx_codeobj__556);
  Py_VISIT(traverse_module_state->__pyx_codeobj__558);
  Py_VISIT(traverse_module_state->__pyx_codeobj__559);
  Py_VISIT(traverse_module_state->__pyx_codeobj__561);
  Py_VISIT(traverse_module_state->__pyx_codeobj__563);
  Py_VISIT(traverse_module_state->__pyx_codeobj__564);
  Py_VISIT(traverse_module_state->__pyx_codeobj__566);
  Py_VISIT(traverse_module_state->__pyx_codeobj__568);
  Py_VISIT(traverse_module_state->__pyx_codeobj__569);
  Py_VISIT(traverse_module_state->__pyx_codeobj__570);
  Py_VISIT(traverse_module_state->__pyx_codeobj__572);
  Py_VISIT(traverse_module_state->__pyx_codeobj__574);
  Py_VISIT(traverse_module_state->__pyx_codeobj__576);
  Py_VISIT(traverse_module_state->__pyx_codeobj__577);
  Py_VISIT(traverse_module_state->__pyx_codeobj__579);
  Py_VISIT(traverse_module_state->__pyx_codeobj__580);
  Py_VISIT(traverse_module_state->__pyx_codeobj__581);
  Py_VISIT(traverse_module_state->__pyx_codeobj__583);
  Py_VISIT(traverse_module_state->__pyx_codeobj__585);
  Py_VISIT(traverse_module_state->__pyx_codeobj__586);
  Py_VISIT(traverse_module_state->__pyx_codeobj__587);
  Py_VISIT(traverse_module_state->__pyx_codeobj__588);
  Py_VISIT(traverse_module_state->__pyx_codeobj__589);
  Py_VISIT(traverse_module_state->__pyx_codeobj__591);
  Py_VISIT(traverse_module_state->__pyx_codeobj__593);
  Py_VISIT(traverse_module_state->__pyx_codeobj__594);
  Py_VISIT(traverse_module_state->__pyx_codeobj__595);
  Py_VISIT(traverse_module_state->__pyx_codeobj__596);
  Py_VISIT(traverse_module_state->__pyx_codeobj__598);
  Py_VISIT(traverse_module_state->__pyx_codeobj__600);
  Py_VISIT(traverse_module_state->__pyx_codeobj__601);
  Py_VISIT(traverse_module_state->__pyx_codeobj__603);
  Py_VISIT(traverse_module_state->__pyx_codeobj__604);
  Py_VISIT(traverse_module_state->__pyx_codeobj__606);
  Py_VISIT(traverse_module_state->__pyx_codeobj__608);
  Py_VISIT(traverse_module_state->__pyx_codeobj__611);
  Py_VISIT(traverse_module_state->__pyx_codeobj__613);
  Py_VISIT(traverse_module_state->__pyx_codeobj__615);
  Py_VISIT(traverse_module_state->__pyx_codeobj__617);
  Py_VISIT(traverse_module_state->__pyx_codeobj__619);
  Py_VISIT(traverse_module_state->__pyx_codeobj__620);
  Py_VISIT(traverse_module_state->__pyx_codeobj__621);
  Py_VISIT(traverse_module_state->__pyx_codeobj__623);
  Py_VISIT(traverse_module_state->__pyx_codeobj__624);
  Py_VISIT(traverse_module_state->__pyx_codeobj__625);
  Py_VISIT(traverse_module_state->__pyx_codeobj__626);
  Py_VISIT(traverse_module_state->__pyx_codeobj__628);
  Py_VISIT(traverse_module_state->__pyx_codeobj__629);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
#define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
#define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
#define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
#define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
#define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
#define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
#define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
#define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
#define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
#define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
#define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
#define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
#define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
#define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#define __pyx_type_8pysndlib_3clm_mus_any __pyx_mstate_global->__pyx_type_8pysndlib_3clm_mus_any
#define __pyx_type_8pysndlib_3clm_mus_any_array __pyx_mstate_global->__pyx_type_8pysndlib_3clm_mus_any_array
#define __pyx_type_8pysndlib_3clm_array_readin_gen __pyx_mstate_global->__pyx_type_8pysndlib_3clm_array_readin_gen
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb
#define __pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator __pyx_mstate_global->__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator
#define __Pyx_EnumMeta __pyx_mstate_global->__Pyx_EnumMeta
#define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
#define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
#define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
#define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
#endif
#define __pyx_ptype_8pysndlib_3clm_mus_any __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm_mus_any
#define __pyx_ptype_8pysndlib_3clm_mus_any_array __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm_mus_any_array
#define __pyx_ptype_8pysndlib_3clm_array_readin_gen __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm_array_readin_gen
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb
#define __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator __pyx_mstate_global->__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator
#define __pyx_ptype___Pyx_EnumMeta __pyx_mstate_global->__pyx_ptype___Pyx_EnumMeta
#define __pyx_array_type __pyx_mstate_global->__pyx_array_type
#define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
#define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
#define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
#define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
#define __pyx_kp_u_0_8f __pyx_mstate_global->__pyx_kp_u_0_8f
#define __pyx_n_s_ADC __pyx_mstate_global->__pyx_n_s_ADC
#define __pyx_n_s_ADF __pyx_mstate_global->__pyx_n_s_ADF
#define __pyx_n_s_AIFC __pyx_mstate_global->__pyx_n_s_AIFC
#define __pyx_n_s_AIFF __pyx_mstate_global->__pyx_n_s_AIFF
#define __pyx_n_s_AKAI4 __pyx_mstate_global->__pyx_n_s_AKAI4
#define __pyx_n_s_ALAW __pyx_mstate_global->__pyx_n_s_ALAW
#define __pyx_n_s_ALL_PASS __pyx_mstate_global->__pyx_n_s_ALL_PASS
#define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
#define __pyx_n_s_ASF __pyx_mstate_global->__pyx_n_s_ASF
#define __pyx_n_s_AVI __pyx_mstate_global->__pyx_n_s_AVI
#define __pyx_n_s_AVR __pyx_mstate_global->__pyx_n_s_AVR
#define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
#define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
#define __pyx_n_s_B24INT __pyx_mstate_global->__pyx_n_s_B24INT
#define __pyx_n_s_BARTLETT __pyx_mstate_global->__pyx_n_s_BARTLETT
#define __pyx_n_s_BARTLETT_HANN __pyx_mstate_global->__pyx_n_s_BARTLETT_HANN
#define __pyx_n_s_BDOUBLE __pyx_mstate_global->__pyx_n_s_BDOUBLE
#define __pyx_n_s_BDOUBLE_UNSCALED __pyx_mstate_global->__pyx_n_s_BDOUBLE_UNSCALED
#define __pyx_n_s_BEZIER __pyx_mstate_global->__pyx_n_s_BEZIER
#define __pyx_n_s_BFLOAT __pyx_mstate_global->__pyx_n_s_BFLOAT
#define __pyx_n_s_BFLOAT_UNSCALED __pyx_mstate_global->__pyx_n_s_BFLOAT_UNSCALED
#define __pyx_n_s_BICSF __pyx_mstate_global->__pyx_n_s_BICSF
#define __pyx_n_s_BINT __pyx_mstate_global->__pyx_n_s_BINT
#define __pyx_n_s_BINTN __pyx_mstate_global->__pyx_n_s_BINTN
#define __pyx_n_s_BLACKMAN10 __pyx_mstate_global->__pyx_n_s_BLACKMAN10
#define __pyx_n_s_BLACKMAN2 __pyx_mstate_global->__pyx_n_s_BLACKMAN2
#define __pyx_n_s_BLACKMAN3 __pyx_mstate_global->__pyx_n_s_BLACKMAN3
#define __pyx_n_s_BLACKMAN4 __pyx_mstate_global->__pyx_n_s_BLACKMAN4
#define __pyx_n_s_BLACKMAN5 __pyx_mstate_global->__pyx_n_s_BLACKMAN5
#define __pyx_n_s_BLACKMAN6 __pyx_mstate_global->__pyx_n_s_BLACKMAN6
#define __pyx_n_s_BLACKMAN7 __pyx_mstate_global->__pyx_n_s_BLACKMAN7
#define __pyx_n_s_BLACKMAN8 __pyx_mstate_global->__pyx_n_s_BLACKMAN8
#define __pyx_n_s_BLACKMAN9 __pyx_mstate_global->__pyx_n_s_BLACKMAN9
#define __pyx_n_s_BOHMAN __pyx_mstate_global->__pyx_n_s_BOHMAN
#define __pyx_n_s_BOTH_KINDS __pyx_mstate_global->__pyx_n_s_BOTH_KINDS
#define __pyx_n_s_BSHORT __pyx_mstate_global->__pyx_n_s_BSHORT
#define __pyx_n_s_BYTE __pyx_mstate_global->__pyx_n_s_BYTE
#define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
#define __pyx_n_s_CAFF __pyx_mstate_global->__pyx_n_s_CAFF
#define __pyx_n_s_CAUCHY __pyx_mstate_global->__pyx_n_s_CAUCHY
#define __pyx_n_s_CFUNCTYPE __pyx_mstate_global->__pyx_n_s_CFUNCTYPE
#define __pyx_n_s_COMDISCO __pyx_mstate_global->__pyx_n_s_COMDISCO
#define __pyx_n_s_CONNES __pyx_mstate_global->__pyx_n_s_CONNES
#define __pyx_n_s_COVOX __pyx_mstate_global->__pyx_n_s_COVOX
#define __pyx_n_s_CSL __pyx_mstate_global->__pyx_n_s_CSL
#define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
#define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
#define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
#define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
#define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
#define __pyx_n_s_DEFAULT_FILE_NAME __pyx_mstate_global->__pyx_n_s_DEFAULT_FILE_NAME
#define __pyx_n_s_DEFAULT_FILE_PLAYER __pyx_mstate_global->__pyx_n_s_DEFAULT_FILE_PLAYER
#define __pyx_n_s_DEFAULT_OUTPUT_CHANS __pyx_mstate_global->__pyx_n_s_DEFAULT_OUTPUT_CHANS
#define __pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE __pyx_mstate_global->__pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE
#define __pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE __pyx_mstate_global->__pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE
#define __pyx_n_s_DEFAULT_OUTPUT_SRATE __pyx_mstate_global->__pyx_n_s_DEFAULT_OUTPUT_SRATE
#define __pyx_n_s_DELUSION __pyx_mstate_global->__pyx_n_s_DELUSION
#define __pyx_n_s_DIAMONDWARE __pyx_mstate_global->__pyx_n_s_DIAMONDWARE
#define __pyx_n_s_DIGIPLAYER __pyx_mstate_global->__pyx_n_s_DIGIPLAYER
#define __pyx_n_s_DOLPH_CHEBYSHEV __pyx_mstate_global->__pyx_n_s_DOLPH_CHEBYSHEV
#define __pyx_n_s_DPSS __pyx_mstate_global->__pyx_n_s_DPSS
#define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
#define __pyx_n_s_EITHER_KIND __pyx_mstate_global->__pyx_n_s_EITHER_KIND
#define __pyx_n_s_ESPS __pyx_mstate_global->__pyx_n_s_ESPS
#define __pyx_n_s_EXPONENTIAL __pyx_mstate_global->__pyx_n_s_EXPONENTIAL
#define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
#define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
#define __pyx_n_s_EnumBase __pyx_mstate_global->__pyx_n_s_EnumBase
#define __pyx_n_s_EnumType __pyx_mstate_global->__pyx_n_s_EnumType
#define __pyx_n_s_FARANDOLE __pyx_mstate_global->__pyx_n_s_FARANDOLE
#define __pyx_n_s_FILE_SAMP __pyx_mstate_global->__pyx_n_s_FILE_SAMP
#define __pyx_n_s_FIRST_KIND __pyx_mstate_global->__pyx_n_s_FIRST_KIND
#define __pyx_n_s_FLAC __pyx_mstate_global->__pyx_n_s_FLAC
#define __pyx_n_s_FLAT_TOP __pyx_mstate_global->__pyx_n_s_FLAT_TOP
#define __pyx_n_s_FileNotFoundError __pyx_mstate_global->__pyx_n_s_FileNotFoundError
#define __pyx_kp_u_Filter_needs_values_for_a0_a1_a2 __pyx_mstate_global->__pyx_kp_u_Filter_needs_values_for_a0_a1_a2
#define __pyx_kp_u_Filter_needs_values_for_a0_b1_b2 __pyx_mstate_global->__pyx_kp_u_Filter_needs_values_for_a0_b1_b2
#define __pyx_n_s_GAUSSIAN __pyx_mstate_global->__pyx_n_s_GAUSSIAN
#define __pyx_n_s_GOLDWAVE __pyx_mstate_global->__pyx_n_s_GOLDWAVE
#define __pyx_n_s_GRAVIS __pyx_mstate_global->__pyx_n_s_GRAVIS
#define __pyx_n_s_GeneratorType __pyx_mstate_global->__pyx_n_s_GeneratorType
#define __pyx_n_s_HAMMING __pyx_mstate_global->__pyx_n_s_HAMMING
#define __pyx_n_s_HANN __pyx_mstate_global->__pyx_n_s_HANN
#define __pyx_n_s_HANN_POISSON __pyx_mstate_global->__pyx_n_s_HANN_POISSON
#define __pyx_n_s_HCOM __pyx_mstate_global->__pyx_n_s_HCOM
#define __pyx_n_s_HERMITE __pyx_mstate_global->__pyx_n_s_HERMITE
#define __pyx_n_s_Header __pyx_mstate_global->__pyx_n_s_Header
#define __pyx_n_s_IEEE __pyx_mstate_global->__pyx_n_s_IEEE
#define __pyx_n_s_IMPULSETRACKER __pyx_mstate_global->__pyx_n_s_IMPULSETRACKER
#define __pyx_n_s_INRS __pyx_mstate_global->__pyx_n_s_INRS
#define __pyx_n_s_IN_DB __pyx_mstate_global->__pyx_n_s_IN_DB
#define __pyx_n_s_IRCAM __pyx_mstate_global->__pyx_n_s_IRCAM
#define __pyx_kp_u_If_not_specifying_coeffs_must_pr __pyx_mstate_global->__pyx_kp_u_If_not_specifying_coeffs_must_pr
#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3
#define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
#define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
#define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
#define __pyx_n_s_IntEnum __pyx_mstate_global->__pyx_n_s_IntEnum
#define __pyx_n_s_IntFlag __pyx_mstate_global->__pyx_n_s_IntFlag
#define __pyx_n_s_Interp __pyx_mstate_global->__pyx_n_s_Interp
#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
#define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
#define __pyx_n_s_KAISER __pyx_mstate_global->__pyx_n_s_KAISER
#define __pyx_n_s_KORG __pyx_mstate_global->__pyx_n_s_KORG
#define __pyx_n_s_KURZWEIL_2000 __pyx_mstate_global->__pyx_n_s_KURZWEIL_2000
#define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
#define __pyx_n_s_L24INT __pyx_mstate_global->__pyx_n_s_L24INT
#define __pyx_n_s_LAGRANGE __pyx_mstate_global->__pyx_n_s_LAGRANGE
#define __pyx_n_s_LDOUBLE __pyx_mstate_global->__pyx_n_s_LDOUBLE
#define __pyx_n_s_LDOUBLE_UNSCALED __pyx_mstate_global->__pyx_n_s_LDOUBLE_UNSCALED
#define __pyx_n_s_LFLOAT __pyx_mstate_global->__pyx_n_s_LFLOAT
#define __pyx_n_s_LFLOAT_UNSCALED __pyx_mstate_global->__pyx_n_s_LFLOAT_UNSCALED
#define __pyx_n_s_LINEAR __pyx_mstate_global->__pyx_n_s_LINEAR
#define __pyx_n_s_LINT __pyx_mstate_global->__pyx_n_s_LINT
#define __pyx_n_s_LINTN __pyx_mstate_global->__pyx_n_s_LINTN
#define __pyx_n_s_LSHORT __pyx_mstate_global->__pyx_n_s_LSHORT
#define __pyx_n_s_MATLAB __pyx_mstate_global->__pyx_n_s_MATLAB
#define __pyx_n_s_MAUD __pyx_mstate_global->__pyx_n_s_MAUD
#define __pyx_n_s_MAUI __pyx_mstate_global->__pyx_n_s_MAUI
#define __pyx_n_s_MIDI __pyx_mstate_global->__pyx_n_s_MIDI
#define __pyx_n_s_MIDI_SAMPLE_DUMP __pyx_mstate_global->__pyx_n_s_MIDI_SAMPLE_DUMP
#define __pyx_n_s_MLT_SINE __pyx_mstate_global->__pyx_n_s_MLT_SINE
#define __pyx_n_s_MPEG __pyx_mstate_global->__pyx_n_s_MPEG
#define __pyx_n_s_MULAW __pyx_mstate_global->__pyx_n_s_MULAW
#define __pyx_n_s_MUS10 __pyx_mstate_global->__pyx_n_s_MUS10
#define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
#define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
#define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
#define __pyx_n_s_NEXT __pyx_mstate_global->__pyx_n_s_NEXT
#define __pyx_n_s_NIST __pyx_mstate_global->__pyx_n_s_NIST
#define __pyx_n_s_NONE __pyx_mstate_global->__pyx_n_s_NONE
#define __pyx_n_s_NORMALIZED __pyx_mstate_global->__pyx_n_s_NORMALIZED
#define __pyx_n_s_NUM_HEADERS __pyx_mstate_global->__pyx_n_s_NUM_HEADERS
#define __pyx_n_s_NUM_SAMPLES __pyx_mstate_global->__pyx_n_s_NUM_SAMPLES
#define __pyx_n_s_NVF __pyx_mstate_global->__pyx_n_s_NVF
#define __pyx_kp_u_None __pyx_mstate_global->__pyx_kp_u_None
#define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
#define __pyx_n_s_OGG __pyx_mstate_global->__pyx_n_s_OGG
#define __pyx_n_s_OMF __pyx_mstate_global->__pyx_n_s_OMF
#define __pyx_kp_s_Optional_float __pyx_mstate_global->__pyx_kp_s_Optional_float
#define __pyx_kp_s_Optional_int __pyx_mstate_global->__pyx_kp_s_Optional_int
#define __pyx_n_s_OrderedDict __pyx_mstate_global->__pyx_n_s_OrderedDict
#define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
#define __pyx_n_s_PAF __pyx_mstate_global->__pyx_n_s_PAF
#define __pyx_n_s_PAPOULIS __pyx_mstate_global->__pyx_n_s_PAPOULIS
#define __pyx_n_s_PARZEN __pyx_mstate_global->__pyx_n_s_PARZEN
#define __pyx_n_s_POISSON __pyx_mstate_global->__pyx_n_s_POISSON
#define __pyx_n_s_PSION __pyx_mstate_global->__pyx_n_s_PSION
#define __pyx_n_s_PVF __pyx_mstate_global->__pyx_n_s_PVF
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_n_s_Polynomial __pyx_mstate_global->__pyx_n_s_Polynomial
#define __pyx_n_s_Pyx_EnumBase __pyx_mstate_global->__pyx_n_s_Pyx_EnumBase
#define __pyx_n_s_Pyx_EnumBase___new __pyx_mstate_global->__pyx_n_s_Pyx_EnumBase___new
#define __pyx_n_s_Pyx_EnumBase___repr __pyx_mstate_global->__pyx_n_s_Pyx_EnumBase___repr
#define __pyx_n_s_Pyx_EnumBase___str __pyx_mstate_global->__pyx_n_s_Pyx_EnumBase___str
#define __pyx_n_s_Pyx_EnumMeta___reduce_cython __pyx_mstate_global->__pyx_n_s_Pyx_EnumMeta___reduce_cython
#define __pyx_n_s_Pyx_EnumMeta___setstate_cython __pyx_mstate_global->__pyx_n_s_Pyx_EnumMeta___setstate_cython
#define __pyx_n_s_Pyx_FlagBase __pyx_mstate_global->__pyx_n_s_Pyx_FlagBase
#define __pyx_n_s_Pyx_FlagBase___new __pyx_mstate_global->__pyx_n_s_Pyx_FlagBase___new
#define __pyx_n_s_Pyx_FlagBase___repr __pyx_mstate_global->__pyx_n_s_Pyx_FlagBase___repr
#define __pyx_n_s_Pyx_FlagBase___str __pyx_mstate_global->__pyx_n_s_Pyx_FlagBase___str
#define __pyx_n_s_QUICKTIME __pyx_mstate_global->__pyx_n_s_QUICKTIME
#define __pyx_n_s_RAW __pyx_mstate_global->__pyx_n_s_RAW
#define __pyx_n_s_RECTANGULAR __pyx_mstate_global->__pyx_n_s_RECTANGULAR
#define __pyx_n_s_RF64 __pyx_mstate_global->__pyx_n_s_RF64
#define __pyx_n_s_RIEMANN __pyx_mstate_global->__pyx_n_s_RIEMANN
#define __pyx_n_s_RIFF __pyx_mstate_global->__pyx_n_s_RIFF
#define __pyx_n_s_RV2 __pyx_mstate_global->__pyx_n_s_RV2
#define __pyx_n_s_RV3 __pyx_mstate_global->__pyx_n_s_RV3
#define __pyx_n_s_RV4 __pyx_mstate_global->__pyx_n_s_RV4
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_n_s_SAMARAKI __pyx_mstate_global->__pyx_n_s_SAMARAKI
#define __pyx_n_s_SAMPLE_DUMP __pyx_mstate_global->__pyx_n_s_SAMPLE_DUMP
#define __pyx_n_s_SBSTUDIOII __pyx_mstate_global->__pyx_n_s_SBSTUDIOII
#define __pyx_n_s_SD1 __pyx_mstate_global->__pyx_n_s_SD1
#define __pyx_n_s_SDIF __pyx_mstate_global->__pyx_n_s_SDIF
#define __pyx_n_s_SECOND_KIND __pyx_mstate_global->__pyx_n_s_SECOND_KIND
#define __pyx_n_s_SHORTEN __pyx_mstate_global->__pyx_n_s_SHORTEN
#define __pyx_n_s_SINC __pyx_mstate_global->__pyx_n_s_SINC
#define __pyx_n_s_SINUSOIDAL __pyx_mstate_global->__pyx_n_s_SINUSOIDAL
#define __pyx_n_s_SMP __pyx_mstate_global->__pyx_n_s_SMP
#define __pyx_n_s_SNDLibError __pyx_mstate_global->__pyx_n_s_SNDLibError
#define __pyx_n_s_SNDLibError____init __pyx_mstate_global->__pyx_n_s_SNDLibError____init
#define __pyx_n_s_SNDT __pyx_mstate_global->__pyx_n_s_SNDT
#define __pyx_n_s_SOUNDFONT __pyx_mstate_global->__pyx_n_s_SOUNDFONT
#define __pyx_n_s_SOUNDFORGE __pyx_mstate_global->__pyx_n_s_SOUNDFORGE
#define __pyx_n_s_SOX __pyx_mstate_global->__pyx_n_s_SOX
#define __pyx_n_s_SPEEX __pyx_mstate_global->__pyx_n_s_SPEEX
#define __pyx_n_s_SPPACK __pyx_mstate_global->__pyx_n_s_SPPACK
#define __pyx_n_s_SRFS __pyx_mstate_global->__pyx_n_s_SRFS
#define __pyx_n_s_SVX __pyx_mstate_global->__pyx_n_s_SVX
#define __pyx_n_s_Sample __pyx_mstate_global->__pyx_n_s_Sample
#define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
#define __pyx_n_s_SimpleNamespace __pyx_mstate_global->__pyx_n_s_SimpleNamespace
#define __pyx_n_s_Sound __pyx_mstate_global->__pyx_n_s_Sound
#define __pyx_n_s_Sound___enter __pyx_mstate_global->__pyx_n_s_Sound___enter
#define __pyx_n_s_Sound___exit __pyx_mstate_global->__pyx_n_s_Sound___exit
#define __pyx_n_s_Sound___init __pyx_mstate_global->__pyx_n_s_Sound___init
#define __pyx_n_s_Spectrum __pyx_mstate_global->__pyx_n_s_Spectrum
#define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
#define __pyx_n_s_TTA __pyx_mstate_global->__pyx_n_s_TTA
#define __pyx_n_s_TUKEY __pyx_mstate_global->__pyx_n_s_TUKEY
#define __pyx_n_s_TWINVQ __pyx_mstate_global->__pyx_n_s_TWINVQ
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_UBSHORT __pyx_mstate_global->__pyx_n_s_UBSHORT
#define __pyx_n_s_UBYTE __pyx_mstate_global->__pyx_n_s_UBYTE
#define __pyx_n_s_ULSHORT __pyx_mstate_global->__pyx_n_s_ULSHORT
#define __pyx_n_s_ULTRASPHERICAL __pyx_mstate_global->__pyx_n_s_ULTRASPHERICAL
#define __pyx_n_s_ULTRATRACKER __pyx_mstate_global->__pyx_n_s_ULTRATRACKER
#define __pyx_n_s_UNKNOWN_HEADER __pyx_mstate_global->__pyx_n_s_UNKNOWN_HEADER
#define __pyx_n_s_UNKNOWN_SAMPLE __pyx_mstate_global->__pyx_n_s_UNKNOWN_SAMPLE
#define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
#define __pyx_kp_s_Unknown_enum_value_s __pyx_mstate_global->__pyx_kp_s_Unknown_enum_value_s
#define __pyx_n_s_VOC __pyx_mstate_global->__pyx_n_s_VOC
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
#define __pyx_n_s_WAVPACK __pyx_mstate_global->__pyx_n_s_WAVPACK
#define __pyx_n_s_WELCH __pyx_mstate_global->__pyx_n_s_WELCH
#define __pyx_n_s_Window __pyx_mstate_global->__pyx_n_s_Window
#define __pyx_n_s_YAMAHA_SY85 __pyx_mstate_global->__pyx_n_s_YAMAHA_SY85
#define __pyx_n_s_YAMAHA_SY99 __pyx_mstate_global->__pyx_n_s_YAMAHA_SY99
#define __pyx_n_s_YAMAHA_TX16W __pyx_mstate_global->__pyx_n_s_YAMAHA_TX16W
#define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13
#define __pyx_n_s__137 __pyx_mstate_global->__pyx_n_s__137
#define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14
#define __pyx_kp_u__15 __pyx_mstate_global->__pyx_kp_u__15
#define __pyx_kp_u__17 __pyx_mstate_global->__pyx_kp_u__17
#define __pyx_kp_u__18 __pyx_mstate_global->__pyx_kp_u__18
#define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19
#define __pyx_n_s__2 __pyx_mstate_global->__pyx_n_s__2
#define __pyx_kp_s__3 __pyx_mstate_global->__pyx_kp_s__3
#define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3
#define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5
#define __pyx_kp_u__62 __pyx_mstate_global->__pyx_kp_u__62
#define __pyx_n_s__630 __pyx_mstate_global->__pyx_n_s__630
#define __pyx_kp_u__8 __pyx_mstate_global->__pyx_kp_u__8
#define __pyx_kp_u__9 __pyx_mstate_global->__pyx_kp_u__9
#define __pyx_n_s_a0 __pyx_mstate_global->__pyx_n_s_a0
#define __pyx_n_s_a1 __pyx_mstate_global->__pyx_n_s_a1
#define __pyx_kp_u_a1_2 __pyx_mstate_global->__pyx_kp_u_a1_2
#define __pyx_kp_u_a2 __pyx_mstate_global->__pyx_kp_u_a2
#define __pyx_n_s_a2_2 __pyx_mstate_global->__pyx_n_s_a2_2
#define __pyx_kp_u_a_valid_envelope_can_only_contai __pyx_mstate_global->__pyx_kp_u_a_valid_envelope_can_only_contai
#define __pyx_kp_u_a_valid_envelope_needs_at_least __pyx_mstate_global->__pyx_kp_u_a_valid_envelope_needs_at_least
#define __pyx_kp_u_a_valid_envelope_needs_even_numb __pyx_mstate_global->__pyx_kp_u_a_valid_envelope_needs_even_numb
#define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
#define __pyx_n_s_abs __pyx_mstate_global->__pyx_n_s_abs
#define __pyx_n_s_addressof __pyx_mstate_global->__pyx_n_s_addressof
#define __pyx_n_u_afplay __pyx_mstate_global->__pyx_n_u_afplay
#define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
#define __pyx_n_s_all_pass __pyx_mstate_global->__pyx_n_s_all_pass
#define __pyx_n_s_all_pass_bank __pyx_mstate_global->__pyx_n_s_all_pass_bank
#define __pyx_n_s_all_passes __pyx_mstate_global->__pyx_n_s_all_passes
#define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
#define __pyx_kp_u_allpass_list_contains_at_least_o __pyx_mstate_global->__pyx_kp_u_allpass_list_contains_at_least_o
#define __pyx_n_s_alpha __pyx_mstate_global->__pyx_n_s_alpha
#define __pyx_n_s_amax __pyx_mstate_global->__pyx_n_s_amax
#define __pyx_n_s_amplitude __pyx_mstate_global->__pyx_n_s_amplitude
#define __pyx_n_s_amplitude_modulate __pyx_mstate_global->__pyx_n_s_amplitude_modulate
#define __pyx_n_s_amps __pyx_mstate_global->__pyx_n_s_amps
#define __pyx_n_s_analyze __pyx_mstate_global->__pyx_n_s_analyze
#define __pyx_n_s_analyze_f __pyx_mstate_global->__pyx_n_s_analyze_f
#define __pyx_n_s_analyzecallback __pyx_mstate_global->__pyx_n_s_analyzecallback
#define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
#define __pyx_n_s_any __pyx_mstate_global->__pyx_n_s_any
#define __pyx_n_u_aplay __pyx_mstate_global->__pyx_n_u_aplay
#define __pyx_n_s_arange __pyx_mstate_global->__pyx_n_s_arange
#define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg
#define __pyx_n_s_arg1 __pyx_mstate_global->__pyx_n_s_arg1
#define __pyx_n_s_arg2 __pyx_mstate_global->__pyx_n_s_arg2
#define __pyx_n_s_argmax __pyx_mstate_global->__pyx_n_s_argmax
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_arr __pyx_mstate_global->__pyx_n_s_arr
#define __pyx_n_s_arr1 __pyx_mstate_global->__pyx_n_s_arr1
#define __pyx_n_s_arr2 __pyx_mstate_global->__pyx_n_s_arr2
#define __pyx_n_s_array __pyx_mstate_global->__pyx_n_s_array
#define __pyx_kp_u_array_has __pyx_mstate_global->__pyx_kp_u_array_has
#define __pyx_n_s_array_interp __pyx_mstate_global->__pyx_n_s_array_interp
#define __pyx_n_s_array_reader __pyx_mstate_global->__pyx_n_s_array_reader
#define __pyx_n_s_array_reader_locals_reader __pyx_mstate_global->__pyx_n_s_array_reader_locals_reader
#define __pyx_n_s_array_readin __pyx_mstate_global->__pyx_n_s_array_readin
#define __pyx_n_s_array_readin_gen __pyx_mstate_global->__pyx_n_s_array_readin_gen
#define __pyx_n_s_array_readin_gen___reduce_cython __pyx_mstate_global->__pyx_n_s_array_readin_gen___reduce_cython
#define __pyx_n_s_array_readin_gen___setstate_cyth __pyx_mstate_global->__pyx_n_s_array_readin_gen___setstate_cyth
#define __pyx_n_s_array_resample __pyx_mstate_global->__pyx_n_s_array_resample
#define __pyx_n_s_asarray __pyx_mstate_global->__pyx_n_s_asarray
#define __pyx_kp_u_asked_for __pyx_mstate_global->__pyx_kp_u_asked_for
#define __pyx_n_s_asymmetric_fm __pyx_mstate_global->__pyx_n_s_asymmetric_fm
#define __pyx_n_s_asymmetric_fm_unmodulated __pyx_mstate_global->__pyx_n_s_asymmetric_fm_unmodulated
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_atan2 __pyx_mstate_global->__pyx_n_s_atan2
#define __pyx_n_s_autocorrelate __pyx_mstate_global->__pyx_n_s_autocorrelate
#define __pyx_n_s_b1 __pyx_mstate_global->__pyx_n_s_b1
#define __pyx_kp_u_b1_2 __pyx_mstate_global->__pyx_kp_u_b1_2
#define __pyx_kp_u_b2 __pyx_mstate_global->__pyx_kp_u_b2
#define __pyx_n_s_b2_2 __pyx_mstate_global->__pyx_n_s_b2_2
#define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
#define __pyx_kp_u_before_scaling __pyx_mstate_global->__pyx_kp_u_before_scaling
#define __pyx_n_s_beg __pyx_mstate_global->__pyx_n_s_beg
#define __pyx_n_s_bes_i0 __pyx_mstate_global->__pyx_n_s_bes_i0
#define __pyx_n_s_bes_j0 __pyx_mstate_global->__pyx_n_s_bes_j0
#define __pyx_n_s_bes_j1 __pyx_mstate_global->__pyx_n_s_bes_j1
#define __pyx_n_s_bes_jn __pyx_mstate_global->__pyx_n_s_bes_jn
#define __pyx_n_s_bes_y0 __pyx_mstate_global->__pyx_n_s_bes_y0
#define __pyx_n_s_bes_y1 __pyx_mstate_global->__pyx_n_s_bes_y1
#define __pyx_n_s_bes_yn __pyx_mstate_global->__pyx_n_s_bes_yn
#define __pyx_n_s_bessi0 __pyx_mstate_global->__pyx_n_s_bessi0
#define __pyx_n_s_beta __pyx_mstate_global->__pyx_n_s_beta
#define __pyx_n_s_biquad __pyx_mstate_global->__pyx_n_s_biquad
#define __pyx_n_s_biquad_set_equal_gain_zeroes __pyx_mstate_global->__pyx_n_s_biquad_set_equal_gain_zeroes
#define __pyx_n_s_biquad_set_resonance __pyx_mstate_global->__pyx_n_s_biquad_set_resonance
#define __pyx_n_s_buffer_size __pyx_mstate_global->__pyx_n_s_buffer_size
#define __pyx_n_u_buffer_size __pyx_mstate_global->__pyx_n_u_buffer_size
#define __pyx_n_s_builtins __pyx_mstate_global->__pyx_n_s_builtins
#define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
#define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
#define __pyx_n_s_c_bool __pyx_mstate_global->__pyx_n_s_c_bool
#define __pyx_n_s_c_double __pyx_mstate_global->__pyx_n_s_c_double
#define __pyx_n_s_c_int __pyx_mstate_global->__pyx_n_s_c_int
#define __pyx_n_s_c_longlong __pyx_mstate_global->__pyx_n_s_c_longlong
#define __pyx_n_s_c_void_p __pyx_mstate_global->__pyx_n_s_c_void_p
#define __pyx_n_s_cache_append __pyx_mstate_global->__pyx_n_s_cache_append
#define __pyx_n_s_cache_extend __pyx_mstate_global->__pyx_n_s_cache_extend
#define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call
#define __pyx_kp_u_cannot_be_converted_to_a_mus_fl __pyx_mstate_global->__pyx_kp_u_cannot_be_converted_to_a_mus_fl
#define __pyx_n_s_cepstrum __pyx_mstate_global->__pyx_n_s_cepstrum
#define __pyx_n_s_chan __pyx_mstate_global->__pyx_n_s_chan
#define __pyx_n_u_chan __pyx_mstate_global->__pyx_n_u_chan
#define __pyx_n_s_channel __pyx_mstate_global->__pyx_n_s_channel
#define __pyx_n_s_channels __pyx_mstate_global->__pyx_n_s_channels
#define __pyx_kp_u_channels_2 __pyx_mstate_global->__pyx_kp_u_channels_2
#define __pyx_kp_u_channels_but __pyx_mstate_global->__pyx_kp_u_channels_but
#define __pyx_n_s_chans __pyx_mstate_global->__pyx_n_s_chans
#define __pyx_n_s_chebyshev_t_sum __pyx_mstate_global->__pyx_n_s_chebyshev_t_sum
#define __pyx_n_s_chebyshev_tu_sum __pyx_mstate_global->__pyx_n_s_chebyshev_tu_sum
#define __pyx_n_s_chebyshev_u_sum __pyx_mstate_global->__pyx_n_s_chebyshev_u_sum
#define __pyx_n_s_check_ndim __pyx_mstate_global->__pyx_n_s_check_ndim
#define __pyx_n_s_check_range __pyx_mstate_global->__pyx_n_s_check_range
#define __pyx_n_s_clamp __pyx_mstate_global->__pyx_n_s_clamp
#define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_clip __pyx_mstate_global->__pyx_n_s_clip
#define __pyx_n_s_clipped __pyx_mstate_global->__pyx_n_s_clipped
#define __pyx_n_s_clm_reverb __pyx_mstate_global->__pyx_n_s_clm_reverb
#define __pyx_n_s_clm_reverb_locals_call __pyx_mstate_global->__pyx_n_s_clm_reverb_locals_call
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_cls __pyx_mstate_global->__pyx_n_s_cls
#define __pyx_n_s_coeff __pyx_mstate_global->__pyx_n_s_coeff
#define __pyx_n_s_coeffs __pyx_mstate_global->__pyx_n_s_coeffs
#define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
#define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
#define __pyx_n_s_comb __pyx_mstate_global->__pyx_n_s_comb
#define __pyx_n_s_comb_bank __pyx_mstate_global->__pyx_n_s_comb_bank
#define __pyx_n_s_combs __pyx_mstate_global->__pyx_n_s_combs
#define __pyx_n_s_comment __pyx_mstate_global->__pyx_n_s_comment
#define __pyx_n_s_compare_shapes __pyx_mstate_global->__pyx_n_s_compare_shapes
#define __pyx_kp_u_compute_ratio __pyx_mstate_global->__pyx_kp_u_compute_ratio
#define __pyx_kp_u_compute_time __pyx_mstate_global->__pyx_kp_u_compute_time
#define __pyx_n_s_connection_function __pyx_mstate_global->__pyx_n_s_connection_function
#define __pyx_kp_s_context_manager_which_handles_c __pyx_mstate_global->__pyx_kp_s_context_manager_which_handles_c
#define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
#define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
#define __pyx_n_s_continue_frample2file __pyx_mstate_global->__pyx_n_s_continue_frample2file
#define __pyx_n_s_continue_old_file __pyx_mstate_global->__pyx_n_s_continue_old_file
#define __pyx_n_s_continue_sample2file __pyx_mstate_global->__pyx_n_s_continue_sample2file
#define __pyx_n_s_contrast_enhancement __pyx_mstate_global->__pyx_n_s_contrast_enhancement
#define __pyx_n_s_convert_frequency __pyx_mstate_global->__pyx_n_s_convert_frequency
#define __pyx_n_s_convolution __pyx_mstate_global->__pyx_n_s_convolution
#define __pyx_n_s_convolve __pyx_mstate_global->__pyx_n_s_convolve
#define __pyx_n_s_convolve_files __pyx_mstate_global->__pyx_n_s_convolve_files
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_copyto __pyx_mstate_global->__pyx_n_s_copyto
#define __pyx_n_s_correlate __pyx_mstate_global->__pyx_n_s_correlate
#define __pyx_n_s_cos __pyx_mstate_global->__pyx_n_s_cos
#define __pyx_kp_u_count __pyx_mstate_global->__pyx_kp_u_count
#define __pyx_n_s_count_2 __pyx_mstate_global->__pyx_n_s_count_2
#define __pyx_n_s_ctypes __pyx_mstate_global->__pyx_n_s_ctypes
#define __pyx_n_s_cy_analyze_f_ptr __pyx_mstate_global->__pyx_n_s_cy_analyze_f_ptr
#define __pyx_n_s_cy_edit_f_ptr __pyx_mstate_global->__pyx_n_s_cy_edit_f_ptr
#define __pyx_n_s_cy_inp_f_ptr __pyx_mstate_global->__pyx_n_s_cy_inp_f_ptr
#define __pyx_n_s_cy_input_f_ptr __pyx_mstate_global->__pyx_n_s_cy_input_f_ptr
#define __pyx_n_s_cy_synthesize_f_ptr __pyx_mstate_global->__pyx_n_s_cy_synthesize_f_ptr
#define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d
#define __pyx_n_u_d __pyx_mstate_global->__pyx_n_u_d
#define __pyx_n_u_darwin __pyx_mstate_global->__pyx_n_u_darwin
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_data1 __pyx_mstate_global->__pyx_n_s_data1
#define __pyx_n_s_data2 __pyx_mstate_global->__pyx_n_s_data2
#define __pyx_n_s_db2linear __pyx_mstate_global->__pyx_n_s_db2linear
#define __pyx_n_s_dcblock __pyx_mstate_global->__pyx_n_s_dcblock
#define __pyx_n_s_dct __pyx_mstate_global->__pyx_n_s_dct
#define __pyx_n_s_default __pyx_mstate_global->__pyx_n_s_default
#define __pyx_n_s_degree __pyx_mstate_global->__pyx_n_s_degree
#define __pyx_n_s_degrees __pyx_mstate_global->__pyx_n_s_degrees
#define __pyx_n_s_degrees2radians __pyx_mstate_global->__pyx_n_s_degrees2radians
#define __pyx_n_s_delay __pyx_mstate_global->__pyx_n_s_delay
#define __pyx_n_s_delay_tick __pyx_mstate_global->__pyx_n_s_delay_tick
#define __pyx_n_s_delay_unmodulated __pyx_mstate_global->__pyx_n_s_delay_unmodulated
#define __pyx_n_s_delete_reverb __pyx_mstate_global->__pyx_n_s_delete_reverb
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_n_s_dim __pyx_mstate_global->__pyx_n_s_dim
#define __pyx_kp_u_dimemsions_but_received __pyx_mstate_global->__pyx_kp_u_dimemsions_but_received
#define __pyx_n_s_direction __pyx_mstate_global->__pyx_n_s_direction
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_distance __pyx_mstate_global->__pyx_n_s_distance
#define __pyx_n_s_distribution __pyx_mstate_global->__pyx_n_s_distribution
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_kp_u_does_not_exist __pyx_mstate_global->__pyx_kp_u_does_not_exist
#define __pyx_n_s_dot_product __pyx_mstate_global->__pyx_n_s_dot_product
#define __pyx_n_s_double __pyx_mstate_global->__pyx_n_s_double
#define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
#define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
#define __pyx_kp_u_duration __pyx_mstate_global->__pyx_kp_u_duration
#define __pyx_n_s_duration_2 __pyx_mstate_global->__pyx_n_s_duration_2
#define __pyx_n_u_duration_2 __pyx_mstate_global->__pyx_n_u_duration_2
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_edit __pyx_mstate_global->__pyx_n_s_edit
#define __pyx_n_s_edit_f __pyx_mstate_global->__pyx_n_s_edit_f
#define __pyx_n_s_editcallback __pyx_mstate_global->__pyx_n_s_editcallback
#define __pyx_n_s_edot_product __pyx_mstate_global->__pyx_n_s_edot_product
#define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_enum __pyx_mstate_global->__pyx_n_s_enum
#define __pyx_kp_u_enum_class_Header_not_importable __pyx_mstate_global->__pyx_kp_u_enum_class_Header_not_importable
#define __pyx_kp_u_enum_class_Sample_not_importable __pyx_mstate_global->__pyx_kp_u_enum_class_Sample_not_importable
#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
#define __pyx_n_s_env __pyx_mstate_global->__pyx_n_s_env
#define __pyx_n_s_env_any __pyx_mstate_global->__pyx_n_s_env_any
#define __pyx_n_s_env_interp __pyx_mstate_global->__pyx_n_s_env_interp
#define __pyx_n_s_env_rates __pyx_mstate_global->__pyx_n_s_env_rates
#define __pyx_n_s_envelope __pyx_mstate_global->__pyx_n_s_envelope
#define __pyx_n_s_envelope_interp __pyx_mstate_global->__pyx_n_s_envelope_interp
#define __pyx_n_s_envfunction __pyx_mstate_global->__pyx_n_s_envfunction
#define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
#define __pyx_n_s_even_multiple __pyx_mstate_global->__pyx_n_s_even_multiple
#define __pyx_n_s_even_weight __pyx_mstate_global->__pyx_n_s_even_weight
#define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_exp __pyx_mstate_global->__pyx_n_s_exp
#define __pyx_n_s_expanduser __pyx_mstate_global->__pyx_n_s_expanduser
#define __pyx_n_s_expansion __pyx_mstate_global->__pyx_n_s_expansion
#define __pyx_kp_u_expecting __pyx_mstate_global->__pyx_kp_u_expecting
#define __pyx_n_s_fabs __pyx_mstate_global->__pyx_n_s_fabs
#define __pyx_n_s_fc __pyx_mstate_global->__pyx_n_s_fc
#define __pyx_n_s_fcombs __pyx_mstate_global->__pyx_n_s_fcombs
#define __pyx_n_s_feedback __pyx_mstate_global->__pyx_n_s_feedback
#define __pyx_n_s_feedforward __pyx_mstate_global->__pyx_n_s_feedforward
#define __pyx_n_s_fft __pyx_mstate_global->__pyx_n_s_fft
#define __pyx_n_s_fft_len __pyx_mstate_global->__pyx_n_s_fft_len
#define __pyx_n_s_fft_size __pyx_mstate_global->__pyx_n_s_fft_size
#define __pyx_kp_u_fft_size_must_be_a_positive_numb __pyx_mstate_global->__pyx_kp_u_fft_size_must_be_a_positive_numb
#define __pyx_kp_u_fft_size_must_be_a_positive_numb_2 __pyx_mstate_global->__pyx_kp_u_fft_size_must_be_a_positive_numb_2
#define __pyx_kp_u_fft_size_must_be_power_of_2_not __pyx_mstate_global->__pyx_kp_u_fft_size_must_be_power_of_2_not
#define __pyx_kp_u_fft_size_too_large_cannot_alloca __pyx_mstate_global->__pyx_kp_u_fft_size_too_large_cannot_alloca
#define __pyx_n_s_file __pyx_mstate_global->__pyx_n_s_file
#define __pyx_n_s_file1 __pyx_mstate_global->__pyx_n_s_file1
#define __pyx_n_s_file2 __pyx_mstate_global->__pyx_n_s_file2
#define __pyx_kp_u_file2frample __pyx_mstate_global->__pyx_kp_u_file2frample
#define __pyx_n_s_file2frample_2 __pyx_mstate_global->__pyx_n_s_file2frample_2
#define __pyx_kp_u_file2ndarray __pyx_mstate_global->__pyx_kp_u_file2ndarray
#define __pyx_n_s_file2ndarray_2 __pyx_mstate_global->__pyx_n_s_file2ndarray_2
#define __pyx_kp_u_file2sample __pyx_mstate_global->__pyx_kp_u_file2sample
#define __pyx_n_s_file2sample_2 __pyx_mstate_global->__pyx_n_s_file2sample_2
#define __pyx_n_s_file_name __pyx_mstate_global->__pyx_n_s_file_name
#define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
#define __pyx_n_s_fill __pyx_mstate_global->__pyx_n_s_fill
#define __pyx_n_s_filt __pyx_mstate_global->__pyx_n_s_filt
#define __pyx_n_s_filt_view __pyx_mstate_global->__pyx_n_s_filt_view
#define __pyx_n_s_filter __pyx_mstate_global->__pyx_n_s_filter
#define __pyx_kp_u_filter_list_contains_at_least_on __pyx_mstate_global->__pyx_kp_u_filter_list_contains_at_least_on
#define __pyx_kp_u_filter_list_contains_at_least_on_2 __pyx_mstate_global->__pyx_kp_u_filter_list_contains_at_least_on_2
#define __pyx_n_s_filter_size __pyx_mstate_global->__pyx_n_s_filter_size
#define __pyx_n_s_filtered_comb __pyx_mstate_global->__pyx_n_s_filtered_comb
#define __pyx_n_s_filtered_comb_bank __pyx_mstate_global->__pyx_n_s_filtered_comb_bank
#define __pyx_n_s_filtered_comb_unmodulated __pyx_mstate_global->__pyx_n_s_filtered_comb_unmodulated
#define __pyx_n_s_filters __pyx_mstate_global->__pyx_n_s_filters
#define __pyx_n_s_finalize __pyx_mstate_global->__pyx_n_s_finalize
#define __pyx_n_s_fir_filter __pyx_mstate_global->__pyx_n_s_fir_filter
#define __pyx_n_s_firmant __pyx_mstate_global->__pyx_n_s_firmant
#define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
#define __pyx_n_s_fm __pyx_mstate_global->__pyx_n_s_fm
#define __pyx_n_s_fm_index __pyx_mstate_global->__pyx_n_s_fm_index
#define __pyx_n_s_fmod __pyx_mstate_global->__pyx_n_s_fmod
#define __pyx_n_s_fn __pyx_mstate_global->__pyx_n_s_fn
#define __pyx_n_s_formant __pyx_mstate_global->__pyx_n_s_formant
#define __pyx_n_s_formant_bank __pyx_mstate_global->__pyx_n_s_formant_bank
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
#define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
#define __pyx_n_s_frample2file __pyx_mstate_global->__pyx_n_s_frample2file
#define __pyx_n_s_freq __pyx_mstate_global->__pyx_n_s_freq
#define __pyx_n_s_freqs __pyx_mstate_global->__pyx_n_s_freqs
#define __pyx_n_s_frequency __pyx_mstate_global->__pyx_n_s_frequency
#define __pyx_n_u_frequency __pyx_mstate_global->__pyx_n_u_frequency
#define __pyx_n_s_func __pyx_mstate_global->__pyx_n_s_func
#define __pyx_n_s_functools __pyx_mstate_global->__pyx_n_s_functools
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_gen __pyx_mstate_global->__pyx_n_s_gen
#define __pyx_n_s_genexpr __pyx_mstate_global->__pyx_n_s_genexpr
#define __pyx_n_s_gens __pyx_mstate_global->__pyx_n_s_gens
#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
#define __pyx_n_s_get_channels __pyx_mstate_global->__pyx_n_s_get_channels
#define __pyx_n_s_get_framples __pyx_mstate_global->__pyx_n_s_get_framples
#define __pyx_n_s_get_length __pyx_mstate_global->__pyx_n_s_get_length
#define __pyx_n_s_get_srate __pyx_mstate_global->__pyx_n_s_get_srate
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_gettempdir __pyx_mstate_global->__pyx_n_s_gettempdir
#define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
#define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
#define __pyx_n_s_granulate __pyx_mstate_global->__pyx_n_s_granulate
#define __pyx_n_s_harms __pyx_mstate_global->__pyx_n_s_harms
#define __pyx_kp_u_has_no_meaningful_channels __pyx_mstate_global->__pyx_kp_u_has_no_meaningful_channels
#define __pyx_kp_u_has_no_meaningful_framples __pyx_mstate_global->__pyx_kp_u_has_no_meaningful_framples
#define __pyx_kp_u_has_no_meaningful_length __pyx_mstate_global->__pyx_kp_u_has_no_meaningful_length
#define __pyx_n_s_header_type __pyx_mstate_global->__pyx_n_s_header_type
#define __pyx_n_s_hi __pyx_mstate_global->__pyx_n_s_hi
#define __pyx_n_s_high __pyx_mstate_global->__pyx_n_s_high
#define __pyx_n_s_hop __pyx_mstate_global->__pyx_n_s_hop
#define __pyx_n_s_hz __pyx_mstate_global->__pyx_n_s_hz
#define __pyx_n_s_hz2radians __pyx_mstate_global->__pyx_n_s_hz2radians
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
#define __pyx_n_s_idat __pyx_mstate_global->__pyx_n_s_idat
#define __pyx_n_s_iir_filter __pyx_mstate_global->__pyx_n_s_iir_filter
#define __pyx_n_s_imag __pyx_mstate_global->__pyx_n_s_imag
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_impulse_generator __pyx_mstate_global->__pyx_n_s_impulse_generator
#define __pyx_n_s_in_any __pyx_mstate_global->__pyx_n_s_in_any
#define __pyx_n_s_ina __pyx_mstate_global->__pyx_n_s_ina
#define __pyx_n_s_inb __pyx_mstate_global->__pyx_n_s_inb
#define __pyx_n_s_ind __pyx_mstate_global->__pyx_n_s_ind
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_indices __pyx_mstate_global->__pyx_n_s_indices
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_init_2 __pyx_mstate_global->__pyx_n_s_init_2
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initial_contents __pyx_mstate_global->__pyx_n_s_initial_contents
#define __pyx_n_s_initial_element __pyx_mstate_global->__pyx_n_s_initial_element
#define __pyx_n_s_initial_phase __pyx_mstate_global->__pyx_n_s_initial_phase
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_inp __pyx_mstate_global->__pyx_n_s_inp
#define __pyx_n_s_inp_f __pyx_mstate_global->__pyx_n_s_inp_f
#define __pyx_n_s_input __pyx_mstate_global->__pyx_n_s_input
#define __pyx_kp_u_input_needs_to_be_a_clm_gen_or_a __pyx_mstate_global->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a
#define __pyx_kp_u_input_needs_to_be_a_clm_gen_or_f __pyx_mstate_global->__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f
#define __pyx_n_s_inputcallback __pyx_mstate_global->__pyx_n_s_inputcallback
#define __pyx_n_s_inputs __pyx_mstate_global->__pyx_n_s_inputs
#define __pyx_n_s_insig __pyx_mstate_global->__pyx_n_s_insig
#define __pyx_n_s_int __pyx_mstate_global->__pyx_n_s_int
#define __pyx_n_s_int64 __pyx_mstate_global->__pyx_n_s_int64
#define __pyx_n_s_interp __pyx_mstate_global->__pyx_n_s_interp
#define __pyx_n_s_interp_type __pyx_mstate_global->__pyx_n_s_interp_type
#define __pyx_n_s_is_all_pass __pyx_mstate_global->__pyx_n_s_is_all_pass
#define __pyx_n_s_is_all_pass_bank __pyx_mstate_global->__pyx_n_s_is_all_pass_bank
#define __pyx_n_s_is_array_readin __pyx_mstate_global->__pyx_n_s_is_array_readin
#define __pyx_n_s_is_asymmetric_fm __pyx_mstate_global->__pyx_n_s_is_asymmetric_fm
#define __pyx_n_s_is_biquad __pyx_mstate_global->__pyx_n_s_is_biquad
#define __pyx_n_s_is_comb __pyx_mstate_global->__pyx_n_s_is_comb
#define __pyx_n_s_is_comb_bank __pyx_mstate_global->__pyx_n_s_is_comb_bank
#define __pyx_n_s_is_convolve __pyx_mstate_global->__pyx_n_s_is_convolve
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_is_delay __pyx_mstate_global->__pyx_n_s_is_delay
#define __pyx_n_s_is_env __pyx_mstate_global->__pyx_n_s_is_env
#define __pyx_n_s_is_even __pyx_mstate_global->__pyx_n_s_is_even
#define __pyx_n_s_is_file2frample __pyx_mstate_global->__pyx_n_s_is_file2frample
#define __pyx_n_s_is_file2sample __pyx_mstate_global->__pyx_n_s_is_file2sample
#define __pyx_n_s_is_filter __pyx_mstate_global->__pyx_n_s_is_filter
#define __pyx_n_s_is_filtered_comb __pyx_mstate_global->__pyx_n_s_is_filtered_comb
#define __pyx_n_s_is_filtered_comb_bank __pyx_mstate_global->__pyx_n_s_is_filtered_comb_bank
#define __pyx_n_s_is_fir_filter __pyx_mstate_global->__pyx_n_s_is_fir_filter
#define __pyx_n_s_is_firmant __pyx_mstate_global->__pyx_n_s_is_firmant
#define __pyx_n_s_is_formant __pyx_mstate_global->__pyx_n_s_is_formant
#define __pyx_n_s_is_formant_bank __pyx_mstate_global->__pyx_n_s_is_formant_bank
#define __pyx_n_s_is_frample2file __pyx_mstate_global->__pyx_n_s_is_frample2file
#define __pyx_n_s_is_granulate __pyx_mstate_global->__pyx_n_s_is_granulate
#define __pyx_n_s_is_iir_filter __pyx_mstate_global->__pyx_n_s_is_iir_filter
#define __pyx_n_s_is_list_or_ndarray __pyx_mstate_global->__pyx_n_s_is_list_or_ndarray
#define __pyx_n_s_is_locsig __pyx_mstate_global->__pyx_n_s_is_locsig
#define __pyx_n_s_is_moving_average __pyx_mstate_global->__pyx_n_s_is_moving_average
#define __pyx_n_s_is_moving_max __pyx_mstate_global->__pyx_n_s_is_moving_max
#define __pyx_n_s_is_moving_norm __pyx_mstate_global->__pyx_n_s_is_moving_norm
#define __pyx_n_s_is_ncos __pyx_mstate_global->__pyx_n_s_is_ncos
#define __pyx_n_s_is_notch __pyx_mstate_global->__pyx_n_s_is_notch
#define __pyx_n_s_is_nrxycos __pyx_mstate_global->__pyx_n_s_is_nrxycos
#define __pyx_n_s_is_nrxysin __pyx_mstate_global->__pyx_n_s_is_nrxysin
#define __pyx_n_s_is_nsin __pyx_mstate_global->__pyx_n_s_is_nsin
#define __pyx_n_s_is_number __pyx_mstate_global->__pyx_n_s_is_number
#define __pyx_n_s_is_odd __pyx_mstate_global->__pyx_n_s_is_odd
#define __pyx_n_s_is_one_pole __pyx_mstate_global->__pyx_n_s_is_one_pole
#define __pyx_n_s_is_one_pole_all_pass __pyx_mstate_global->__pyx_n_s_is_one_pole_all_pass
#define __pyx_n_s_is_one_zero __pyx_mstate_global->__pyx_n_s_is_one_zero
#define __pyx_n_s_is_oscil __pyx_mstate_global->__pyx_n_s_is_oscil
#define __pyx_n_s_is_oscil_bank __pyx_mstate_global->__pyx_n_s_is_oscil_bank
#define __pyx_kp_u_is_out_of_range __pyx_mstate_global->__pyx_kp_u_is_out_of_range
#define __pyx_n_s_is_phase_vocoder __pyx_mstate_global->__pyx_n_s_is_phase_vocoder
#define __pyx_n_s_is_polyshape __pyx_mstate_global->__pyx_n_s_is_polyshape
#define __pyx_n_s_is_polywave __pyx_mstate_global->__pyx_n_s_is_polywave
#define __pyx_n_s_is_power_of_2 __pyx_mstate_global->__pyx_n_s_is_power_of_2
#define __pyx_n_s_is_pulse_train __pyx_mstate_global->__pyx_n_s_is_pulse_train
#define __pyx_n_s_is_pulsed_env __pyx_mstate_global->__pyx_n_s_is_pulsed_env
#define __pyx_n_s_is_rand __pyx_mstate_global->__pyx_n_s_is_rand
#define __pyx_n_s_is_rand_interp __pyx_mstate_global->__pyx_n_s_is_rand_interp
#define __pyx_n_s_is_readin __pyx_mstate_global->__pyx_n_s_is_readin
#define __pyx_n_s_is_rxykcos __pyx_mstate_global->__pyx_n_s_is_rxykcos
#define __pyx_n_s_is_rxyksin __pyx_mstate_global->__pyx_n_s_is_rxyksin
#define __pyx_n_s_is_sample2file __pyx_mstate_global->__pyx_n_s_is_sample2file
#define __pyx_n_s_is_sawtooth_wave __pyx_mstate_global->__pyx_n_s_is_sawtooth_wave
#define __pyx_n_s_is_square_wave __pyx_mstate_global->__pyx_n_s_is_square_wave
#define __pyx_n_s_is_src __pyx_mstate_global->__pyx_n_s_is_src
#define __pyx_n_s_is_ssb_am __pyx_mstate_global->__pyx_n_s_is_ssb_am
#define __pyx_n_s_is_table_lookup __pyx_mstate_global->__pyx_n_s_is_table_lookup
#define __pyx_n_s_is_tap __pyx_mstate_global->__pyx_n_s_is_tap
#define __pyx_n_s_is_triangle_wave __pyx_mstate_global->__pyx_n_s_is_triangle_wave
#define __pyx_n_s_is_two_pole __pyx_mstate_global->__pyx_n_s_is_two_pole
#define __pyx_n_s_is_two_zero __pyx_mstate_global->__pyx_n_s_is_two_zero
#define __pyx_n_s_is_wave_train __pyx_mstate_global->__pyx_n_s_is_wave_train
#define __pyx_n_s_is_zero __pyx_mstate_global->__pyx_n_s_is_zero
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_isfile __pyx_mstate_global->__pyx_n_s_isfile
#define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
#define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
#define __pyx_n_s_jitter __pyx_mstate_global->__pyx_n_s_jitter
#define __pyx_n_s_kind __pyx_mstate_global->__pyx_n_s_kind
#define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
#define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
#define __pyx_kp_u_length_2 __pyx_mstate_global->__pyx_kp_u_length_2
#define __pyx_n_s_linear2db __pyx_mstate_global->__pyx_n_s_linear2db
#define __pyx_n_s_linspace __pyx_mstate_global->__pyx_n_s_linspace
#define __pyx_n_u_linux __pyx_mstate_global->__pyx_n_u_linux
#define __pyx_n_s_list __pyx_mstate_global->__pyx_n_s_list
#define __pyx_n_s_lo __pyx_mstate_global->__pyx_n_s_lo
#define __pyx_n_s_loc __pyx_mstate_global->__pyx_n_s_loc
#define __pyx_n_s_locsig __pyx_mstate_global->__pyx_n_s_locsig
#define __pyx_n_s_locsig_ref __pyx_mstate_global->__pyx_n_s_locsig_ref
#define __pyx_n_s_locsig_reverb_ref __pyx_mstate_global->__pyx_n_s_locsig_reverb_ref
#define __pyx_n_s_locsig_reverb_set __pyx_mstate_global->__pyx_n_s_locsig_reverb_set
#define __pyx_n_s_locsig_set __pyx_mstate_global->__pyx_n_s_locsig_set
#define __pyx_n_s_locsig_type __pyx_mstate_global->__pyx_n_s_locsig_type
#define __pyx_n_s_locsigdetourcallback __pyx_mstate_global->__pyx_n_s_locsigdetourcallback
#define __pyx_n_s_log __pyx_mstate_global->__pyx_n_s_log
#define __pyx_n_s_loop __pyx_mstate_global->__pyx_n_s_loop
#define __pyx_n_s_low __pyx_mstate_global->__pyx_n_s_low
#define __pyx_n_s_mabs __pyx_mstate_global->__pyx_n_s_mabs
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_make_all_pass __pyx_mstate_global->__pyx_n_s_make_all_pass
#define __pyx_n_s_make_all_pass_bank __pyx_mstate_global->__pyx_n_s_make_all_pass_bank
#define __pyx_n_s_make_array_readin __pyx_mstate_global->__pyx_n_s_make_array_readin
#define __pyx_n_s_make_asymmetric_fm __pyx_mstate_global->__pyx_n_s_make_asymmetric_fm
#define __pyx_n_s_make_biquad __pyx_mstate_global->__pyx_n_s_make_biquad
#define __pyx_n_s_make_biquad_all_pass __pyx_mstate_global->__pyx_n_s_make_biquad_all_pass
#define __pyx_n_s_make_biquad_band_pass __pyx_mstate_global->__pyx_n_s_make_biquad_band_pass
#define __pyx_n_s_make_biquad_band_reject __pyx_mstate_global->__pyx_n_s_make_biquad_band_reject
#define __pyx_n_s_make_biquad_high_pass __pyx_mstate_global->__pyx_n_s_make_biquad_high_pass
#define __pyx_n_s_make_biquad_low_pass __pyx_mstate_global->__pyx_n_s_make_biquad_low_pass
#define __pyx_n_s_make_biquad_notch __pyx_mstate_global->__pyx_n_s_make_biquad_notch
#define __pyx_n_s_make_comb __pyx_mstate_global->__pyx_n_s_make_comb
#define __pyx_n_s_make_comb_bank __pyx_mstate_global->__pyx_n_s_make_comb_bank
#define __pyx_n_s_make_convolve __pyx_mstate_global->__pyx_n_s_make_convolve
#define __pyx_n_s_make_convolve_locals_inp_f __pyx_mstate_global->__pyx_n_s_make_convolve_locals_inp_f
#define __pyx_n_s_make_dcblock __pyx_mstate_global->__pyx_n_s_make_dcblock
#define __pyx_n_s_make_delay __pyx_mstate_global->__pyx_n_s_make_delay
#define __pyx_n_s_make_env __pyx_mstate_global->__pyx_n_s_make_env
#define __pyx_n_s_make_fft_window __pyx_mstate_global->__pyx_n_s_make_fft_window
#define __pyx_n_s_make_file2frample __pyx_mstate_global->__pyx_n_s_make_file2frample
#define __pyx_n_s_make_file2sample __pyx_mstate_global->__pyx_n_s_make_file2sample
#define __pyx_n_s_make_filter __pyx_mstate_global->__pyx_n_s_make_filter
#define __pyx_n_s_make_filtered_comb __pyx_mstate_global->__pyx_n_s_make_filtered_comb
#define __pyx_n_s_make_filtered_comb_bank __pyx_mstate_global->__pyx_n_s_make_filtered_comb_bank
#define __pyx_n_s_make_fir_coeffs __pyx_mstate_global->__pyx_n_s_make_fir_coeffs
#define __pyx_n_s_make_fir_filter __pyx_mstate_global->__pyx_n_s_make_fir_filter
#define __pyx_n_s_make_firmant __pyx_mstate_global->__pyx_n_s_make_firmant
#define __pyx_n_s_make_formant __pyx_mstate_global->__pyx_n_s_make_formant
#define __pyx_n_s_make_formant_bank __pyx_mstate_global->__pyx_n_s_make_formant_bank
#define __pyx_n_s_make_frample2file __pyx_mstate_global->__pyx_n_s_make_frample2file
#define __pyx_n_s_make_granulate __pyx_mstate_global->__pyx_n_s_make_granulate
#define __pyx_n_s_make_granulate_locals_edit_f __pyx_mstate_global->__pyx_n_s_make_granulate_locals_edit_f
#define __pyx_n_s_make_granulate_locals_inp_f __pyx_mstate_global->__pyx_n_s_make_granulate_locals_inp_f
#define __pyx_n_s_make_iir_filter __pyx_mstate_global->__pyx_n_s_make_iir_filter
#define __pyx_n_s_make_locsig __pyx_mstate_global->__pyx_n_s_make_locsig
#define __pyx_n_s_make_moving_average __pyx_mstate_global->__pyx_n_s_make_moving_average
#define __pyx_n_s_make_moving_max __pyx_mstate_global->__pyx_n_s_make_moving_max
#define __pyx_n_s_make_moving_norm __pyx_mstate_global->__pyx_n_s_make_moving_norm
#define __pyx_n_s_make_ncos __pyx_mstate_global->__pyx_n_s_make_ncos
#define __pyx_n_s_make_notch __pyx_mstate_global->__pyx_n_s_make_notch
#define __pyx_n_s_make_nrxycos __pyx_mstate_global->__pyx_n_s_make_nrxycos
#define __pyx_n_s_make_nrxysin __pyx_mstate_global->__pyx_n_s_make_nrxysin
#define __pyx_n_s_make_nsin __pyx_mstate_global->__pyx_n_s_make_nsin
#define __pyx_n_s_make_one_pole __pyx_mstate_global->__pyx_n_s_make_one_pole
#define __pyx_n_s_make_one_pole_all_pass __pyx_mstate_global->__pyx_n_s_make_one_pole_all_pass
#define __pyx_n_s_make_one_zero __pyx_mstate_global->__pyx_n_s_make_one_zero
#define __pyx_n_s_make_oscil __pyx_mstate_global->__pyx_n_s_make_oscil
#define __pyx_n_s_make_oscil_bank __pyx_mstate_global->__pyx_n_s_make_oscil_bank
#define __pyx_n_s_make_phase_vocoder __pyx_mstate_global->__pyx_n_s_make_phase_vocoder
#define __pyx_n_s_make_phase_vocoder_locals_analyz __pyx_mstate_global->__pyx_n_s_make_phase_vocoder_locals_analyz
#define __pyx_n_s_make_phase_vocoder_locals_edit_f __pyx_mstate_global->__pyx_n_s_make_phase_vocoder_locals_edit_f
#define __pyx_n_s_make_phase_vocoder_locals_inp_f __pyx_mstate_global->__pyx_n_s_make_phase_vocoder_locals_inp_f
#define __pyx_n_s_make_phase_vocoder_locals_synthe __pyx_mstate_global->__pyx_n_s_make_phase_vocoder_locals_synthe
#define __pyx_n_s_make_polyshape __pyx_mstate_global->__pyx_n_s_make_polyshape
#define __pyx_n_s_make_polywave __pyx_mstate_global->__pyx_n_s_make_polywave
#define __pyx_n_s_make_pulse_train __pyx_mstate_global->__pyx_n_s_make_pulse_train
#define __pyx_n_s_make_pulsed_env __pyx_mstate_global->__pyx_n_s_make_pulsed_env
#define __pyx_n_s_make_rand __pyx_mstate_global->__pyx_n_s_make_rand
#define __pyx_n_s_make_rand_interp __pyx_mstate_global->__pyx_n_s_make_rand_interp
#define __pyx_n_s_make_readin __pyx_mstate_global->__pyx_n_s_make_readin
#define __pyx_n_s_make_rxykcos __pyx_mstate_global->__pyx_n_s_make_rxykcos
#define __pyx_n_s_make_rxyksin __pyx_mstate_global->__pyx_n_s_make_rxyksin
#define __pyx_n_s_make_sample2file __pyx_mstate_global->__pyx_n_s_make_sample2file
#define __pyx_n_s_make_sawtooth_wave __pyx_mstate_global->__pyx_n_s_make_sawtooth_wave
#define __pyx_n_s_make_square_wave __pyx_mstate_global->__pyx_n_s_make_square_wave
#define __pyx_n_s_make_src __pyx_mstate_global->__pyx_n_s_make_src
#define __pyx_n_s_make_src_locals_inp_f __pyx_mstate_global->__pyx_n_s_make_src_locals_inp_f
#define __pyx_n_s_make_ssb_am __pyx_mstate_global->__pyx_n_s_make_ssb_am
#define __pyx_n_s_make_table_lookup __pyx_mstate_global->__pyx_n_s_make_table_lookup
#define __pyx_n_s_make_table_lookup_with_env __pyx_mstate_global->__pyx_n_s_make_table_lookup_with_env
#define __pyx_n_s_make_triangle_wave __pyx_mstate_global->__pyx_n_s_make_triangle_wave
#define __pyx_n_s_make_two_pole __pyx_mstate_global->__pyx_n_s_make_two_pole
#define __pyx_n_s_make_two_zero __pyx_mstate_global->__pyx_n_s_make_two_zero
#define __pyx_n_s_make_wave_train __pyx_mstate_global->__pyx_n_s_make_wave_train
#define __pyx_n_s_make_wave_train_with_env __pyx_mstate_global->__pyx_n_s_make_wave_train_with_env
#define __pyx_kp_s_many_useful_windows __pyx_mstate_global->__pyx_kp_s_many_useful_windows
#define __pyx_n_s_map __pyx_mstate_global->__pyx_n_s_map
#define __pyx_n_s_math __pyx_mstate_global->__pyx_n_s_math
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_max_size __pyx_mstate_global->__pyx_n_s_max_size
#define __pyx_kp_u_maxamp __pyx_mstate_global->__pyx_kp_u_maxamp
#define __pyx_n_s_maxamp_2 __pyx_mstate_global->__pyx_n_s_maxamp_2
#define __pyx_n_s_maxamp_result __pyx_mstate_global->__pyx_n_s_maxamp_result
#define __pyx_n_s_member_names __pyx_mstate_global->__pyx_n_s_member_names
#define __pyx_n_s_members __pyx_mstate_global->__pyx_n_s_members
#define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
#define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_module_2 __pyx_mstate_global->__pyx_n_s_module_2
#define __pyx_n_s_move_locsig __pyx_mstate_global->__pyx_n_s_move_locsig
#define __pyx_n_s_moving_average __pyx_mstate_global->__pyx_n_s_moving_average
#define __pyx_n_s_moving_max __pyx_mstate_global->__pyx_n_s_moving_max
#define __pyx_n_s_moving_norm __pyx_mstate_global->__pyx_n_s_moving_norm
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_mus_any __pyx_mstate_global->__pyx_n_s_mus_any
#define __pyx_n_s_mus_any___reduce_cython __pyx_mstate_global->__pyx_n_s_mus_any___reduce_cython
#define __pyx_n_s_mus_any___setstate_cython __pyx_mstate_global->__pyx_n_s_mus_any___setstate_cython
#define __pyx_n_s_mus_any_array __pyx_mstate_global->__pyx_n_s_mus_any_array
#define __pyx_n_s_mus_any_array___reduce_cython __pyx_mstate_global->__pyx_n_s_mus_any_array___reduce_cython
#define __pyx_n_s_mus_any_array___setstate_cython __pyx_mstate_global->__pyx_n_s_mus_any_array___setstate_cython
#define __pyx_n_s_mus_any_cache_append __pyx_mstate_global->__pyx_n_s_mus_any_cache_append
#define __pyx_n_s_mus_any_cache_extend __pyx_mstate_global->__pyx_n_s_mus_any_cache_extend
#define __pyx_n_s_mus_any_mus_reset __pyx_mstate_global->__pyx_n_s_mus_any_mus_reset
#define __pyx_n_s_mus_any_next __pyx_mstate_global->__pyx_n_s_mus_any_next
#define __pyx_n_s_mus_any_set_up_data __pyx_mstate_global->__pyx_n_s_mus_any_set_up_data
#define __pyx_n_s_mus_any_set_up_pv_data __pyx_mstate_global->__pyx_n_s_mus_any_set_up_pv_data
#define __pyx_n_s_mus_any_set_up_xcoeffs __pyx_mstate_global->__pyx_n_s_mus_any_set_up_xcoeffs
#define __pyx_n_s_mus_any_set_up_ycoeffs __pyx_mstate_global->__pyx_n_s_mus_any_set_up_ycoeffs
#define __pyx_n_s_mus_autocorrelate __pyx_mstate_global->__pyx_n_s_mus_autocorrelate
#define __pyx_n_s_mus_cepstrum __pyx_mstate_global->__pyx_n_s_mus_cepstrum
#define __pyx_n_s_mus_channels __pyx_mstate_global->__pyx_n_s_mus_channels
#define __pyx_n_s_mus_close __pyx_mstate_global->__pyx_n_s_mus_close
#define __pyx_n_s_mus_convolution __pyx_mstate_global->__pyx_n_s_mus_convolution
#define __pyx_n_s_mus_correlate __pyx_mstate_global->__pyx_n_s_mus_correlate
#define __pyx_kp_u_mus_data_can_not_be_called_on __pyx_mstate_global->__pyx_kp_u_mus_data_can_not_be_called_on
#define __pyx_n_s_mus_fft __pyx_mstate_global->__pyx_n_s_mus_fft
#define __pyx_n_s_mus_interpolate __pyx_mstate_global->__pyx_n_s_mus_interpolate
#define __pyx_n_s_mus_is_input __pyx_mstate_global->__pyx_n_s_mus_is_input
#define __pyx_n_s_mus_is_output __pyx_mstate_global->__pyx_n_s_mus_is_output
#define __pyx_n_s_mus_length __pyx_mstate_global->__pyx_n_s_mus_length
#define __pyx_n_s_mus_order __pyx_mstate_global->__pyx_n_s_mus_order
#define __pyx_n_s_mus_polar2rectangular __pyx_mstate_global->__pyx_n_s_mus_polar2rectangular
#define __pyx_n_s_mus_rectangular2magnitudes __pyx_mstate_global->__pyx_n_s_mus_rectangular2magnitudes
#define __pyx_n_s_mus_rectangular2polar __pyx_mstate_global->__pyx_n_s_mus_rectangular2polar
#define __pyx_n_s_mus_reset __pyx_mstate_global->__pyx_n_s_mus_reset
#define __pyx_n_s_mus_spectrum __pyx_mstate_global->__pyx_n_s_mus_spectrum
#define __pyx_n_s_mus_xcoeffs __pyx_mstate_global->__pyx_n_s_mus_xcoeffs
#define __pyx_kp_u_mus_xcoeffs_can_not_be_called_on __pyx_mstate_global->__pyx_kp_u_mus_xcoeffs_can_not_be_called_on
#define __pyx_n_s_mus_ycoeffs __pyx_mstate_global->__pyx_n_s_mus_ycoeffs
#define __pyx_kp_u_mus_ycoeffs_can_not_be_called_on __pyx_mstate_global->__pyx_kp_u_mus_ycoeffs_can_not_be_called_on
#define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n
#define __pyx_n_u_n __pyx_mstate_global->__pyx_n_u_n
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
#define __pyx_n_s_ncos __pyx_mstate_global->__pyx_n_s_ncos
#define __pyx_n_s_ndarray2file __pyx_mstate_global->__pyx_n_s_ndarray2file
#define __pyx_kp_u_ndarray_must_have_1_or_2_dimensi __pyx_mstate_global->__pyx_kp_u_ndarray_must_have_1_or_2_dimensi
#define __pyx_kp_u_ndarrays_of_unequal_shape __pyx_mstate_global->__pyx_kp_u_ndarrays_of_unequal_shape
#define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
#define __pyx_n_u_ndim __pyx_mstate_global->__pyx_n_u_ndim
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_new_length __pyx_mstate_global->__pyx_n_s_new_length
#define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
#define __pyx_n_s_next_power_of_2 __pyx_mstate_global->__pyx_n_s_next_power_of_2
#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
#define __pyx_kp_u_no_player_specified __pyx_mstate_global->__pyx_kp_u_no_player_specified
#define __pyx_n_s_norm __pyx_mstate_global->__pyx_n_s_norm
#define __pyx_n_s_norm_type __pyx_mstate_global->__pyx_n_s_norm_type
#define __pyx_n_s_normalize __pyx_mstate_global->__pyx_n_s_normalize
#define __pyx_n_s_normalize_partials __pyx_mstate_global->__pyx_n_s_normalize_partials
#define __pyx_kp_u_not_supported __pyx_mstate_global->__pyx_kp_u_not_supported
#define __pyx_n_s_notch __pyx_mstate_global->__pyx_n_s_notch
#define __pyx_n_s_notch_unmodulated __pyx_mstate_global->__pyx_n_s_notch_unmodulated
#define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
#define __pyx_kp_s_npt_NDArray_np_float64 __pyx_mstate_global->__pyx_kp_s_npt_NDArray_np_float64
#define __pyx_n_s_nrxycos __pyx_mstate_global->__pyx_n_s_nrxycos
#define __pyx_n_s_nrxysin __pyx_mstate_global->__pyx_n_s_nrxysin
#define __pyx_n_s_nsin __pyx_mstate_global->__pyx_n_s_nsin
#define __pyx_n_s_num __pyx_mstate_global->__pyx_n_s_num
#define __pyx_n_s_number __pyx_mstate_global->__pyx_n_s_number
#define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
#define __pyx_kp_u_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy_core_multiarray_failed_to
#define __pyx_kp_u_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_u_numpy_core_umath_failed_to_impor
#define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
#define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object
#define __pyx_kp_u_object_2 __pyx_mstate_global->__pyx_kp_u_object_2
#define __pyx_n_s_odd_multiple __pyx_mstate_global->__pyx_n_s_odd_multiple
#define __pyx_n_s_odd_weight __pyx_mstate_global->__pyx_n_s_odd_weight
#define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset
#define __pyx_n_s_old_srate __pyx_mstate_global->__pyx_n_s_old_srate
#define __pyx_n_s_omega_t __pyx_mstate_global->__pyx_n_s_omega_t
#define __pyx_n_s_one_pole __pyx_mstate_global->__pyx_n_s_one_pole
#define __pyx_n_s_one_pole_all_pass __pyx_mstate_global->__pyx_n_s_one_pole_all_pass
#define __pyx_n_s_one_zero __pyx_mstate_global->__pyx_n_s_one_zero
#define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
#define __pyx_n_s_order __pyx_mstate_global->__pyx_n_s_order
#define __pyx_n_s_orig_length __pyx_mstate_global->__pyx_n_s_orig_length
#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
#define __pyx_n_s_oscil __pyx_mstate_global->__pyx_n_s_oscil
#define __pyx_n_s_oscil_bank __pyx_mstate_global->__pyx_n_s_oscil_bank
#define __pyx_n_s_oscil_unmodulated __pyx_mstate_global->__pyx_n_s_oscil_unmodulated
#define __pyx_n_s_out_any __pyx_mstate_global->__pyx_n_s_out_any
#define __pyx_n_s_out_bank __pyx_mstate_global->__pyx_n_s_out_bank
#define __pyx_n_s_outa __pyx_mstate_global->__pyx_n_s_outa
#define __pyx_n_s_outb __pyx_mstate_global->__pyx_n_s_outb
#define __pyx_n_s_outc __pyx_mstate_global->__pyx_n_s_outc
#define __pyx_n_s_outd __pyx_mstate_global->__pyx_n_s_outd
#define __pyx_n_s_output __pyx_mstate_global->__pyx_n_s_output
#define __pyx_kp_u_output_needs_to_be_a_clm_gen_or __pyx_mstate_global->__pyx_kp_u_output_needs_to_be_a_clm_gen_or
#define __pyx_n_s_output_to_file __pyx_mstate_global->__pyx_n_s_output_to_file
#define __pyx_n_s_outputfile __pyx_mstate_global->__pyx_n_s_outputfile
#define __pyx_n_s_overlap __pyx_mstate_global->__pyx_n_s_overlap
#define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
#define __pyx_n_s_parents __pyx_mstate_global->__pyx_n_s_parents
#define __pyx_n_s_partial __pyx_mstate_global->__pyx_n_s_partial
#define __pyx_n_s_partials __pyx_mstate_global->__pyx_n_s_partials
#define __pyx_n_s_partials2polynomial __pyx_mstate_global->__pyx_n_s_partials2polynomial
#define __pyx_n_s_partials2wave __pyx_mstate_global->__pyx_n_s_partials2wave
#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
#define __pyx_n_s_perf_counter __pyx_mstate_global->__pyx_n_s_perf_counter
#define __pyx_n_s_phase __pyx_mstate_global->__pyx_n_s_phase
#define __pyx_n_s_phase_delay __pyx_mstate_global->__pyx_n_s_phase_delay
#define __pyx_n_s_phase_partials2wave __pyx_mstate_global->__pyx_n_s_phase_partials2wave
#define __pyx_n_s_phase_vocoder __pyx_mstate_global->__pyx_n_s_phase_vocoder
#define __pyx_n_s_phase_vocoder_amp_increments __pyx_mstate_global->__pyx_n_s_phase_vocoder_amp_increments
#define __pyx_n_s_phase_vocoder_amps __pyx_mstate_global->__pyx_n_s_phase_vocoder_amps
#define __pyx_n_s_phase_vocoder_freqs __pyx_mstate_global->__pyx_n_s_phase_vocoder_freqs
#define __pyx_n_s_phase_vocoder_phase_increments __pyx_mstate_global->__pyx_n_s_phase_vocoder_phase_increments
#define __pyx_n_s_phase_vocoder_phases __pyx_mstate_global->__pyx_n_s_phase_vocoder_phases
#define __pyx_n_s_phases __pyx_mstate_global->__pyx_n_s_phases
#define __pyx_n_s_pi __pyx_mstate_global->__pyx_n_s_pi
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_pitch __pyx_mstate_global->__pyx_n_s_pitch
#define __pyx_n_s_platform __pyx_mstate_global->__pyx_n_s_platform
#define __pyx_n_s_play __pyx_mstate_global->__pyx_n_s_play
#define __pyx_n_s_player __pyx_mstate_global->__pyx_n_s_player
#define __pyx_n_s_pm __pyx_mstate_global->__pyx_n_s_pm
#define __pyx_n_s_polar2rectangular __pyx_mstate_global->__pyx_n_s_polar2rectangular
#define __pyx_n_s_polynomial __pyx_mstate_global->__pyx_n_s_polynomial
#define __pyx_n_s_polyshape __pyx_mstate_global->__pyx_n_s_polyshape
#define __pyx_n_s_polyshape_unmodulated __pyx_mstate_global->__pyx_n_s_polyshape_unmodulated
#define __pyx_n_s_polywave __pyx_mstate_global->__pyx_n_s_polywave
#define __pyx_n_s_polywave_unmodulated __pyx_mstate_global->__pyx_n_s_polywave_unmodulated
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
#define __pyx_n_s_pulse_train __pyx_mstate_global->__pyx_n_s_pulse_train
#define __pyx_n_s_pulse_train_unmodulated __pyx_mstate_global->__pyx_n_s_pulse_train_unmodulated
#define __pyx_n_s_pulsed_env __pyx_mstate_global->__pyx_n_s_pulsed_env
#define __pyx_n_s_pulsed_env_unmodulated __pyx_mstate_global->__pyx_n_s_pulsed_env_unmodulated
#define __pyx_kp_u_pysndlib __pyx_mstate_global->__pyx_kp_u_pysndlib
#define __pyx_n_s_pysndlib_clm __pyx_mstate_global->__pyx_n_s_pysndlib_clm
#define __pyx_n_s_pysndlib_sndlib __pyx_mstate_global->__pyx_n_s_pysndlib_sndlib
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
#define __pyx_n_s_pyx_unpickle___Pyx_EnumMeta __pyx_mstate_global->__pyx_n_s_pyx_unpickle___Pyx_EnumMeta
#define __pyx_n_s_pyx_unpickle_array_readin_gen __pyx_mstate_global->__pyx_n_s_pyx_unpickle_array_readin_gen
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_q __pyx_mstate_global->__pyx_n_s_q
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
#define __pyx_n_u_r __pyx_mstate_global->__pyx_n_u_r
#define __pyx_n_s_radians __pyx_mstate_global->__pyx_n_s_radians
#define __pyx_n_s_radians2degrees __pyx_mstate_global->__pyx_n_s_radians2degrees
#define __pyx_n_s_radians2hz __pyx_mstate_global->__pyx_n_s_radians2hz
#define __pyx_n_s_radius __pyx_mstate_global->__pyx_n_s_radius
#define __pyx_n_s_ramp __pyx_mstate_global->__pyx_n_s_ramp
#define __pyx_n_s_rand __pyx_mstate_global->__pyx_n_s_rand
#define __pyx_n_s_rand_interp __pyx_mstate_global->__pyx_n_s_rand_interp
#define __pyx_n_s_rand_interp_unmodulated __pyx_mstate_global->__pyx_n_s_rand_interp_unmodulated
#define __pyx_n_s_rand_unmodulated __pyx_mstate_global->__pyx_n_s_rand_unmodulated
#define __pyx_n_s_random __pyx_mstate_global->__pyx_n_s_random
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_ratio __pyx_mstate_global->__pyx_n_s_ratio
#define __pyx_n_s_rdat __pyx_mstate_global->__pyx_n_s_rdat
#define __pyx_n_s_read __pyx_mstate_global->__pyx_n_s_read
#define __pyx_n_s_reader __pyx_mstate_global->__pyx_n_s_reader
#define __pyx_kp_u_readin __pyx_mstate_global->__pyx_kp_u_readin
#define __pyx_n_s_readin_2 __pyx_mstate_global->__pyx_n_s_readin_2
#define __pyx_n_s_real __pyx_mstate_global->__pyx_n_s_real
#define __pyx_n_s_rectangular2magnitudes __pyx_mstate_global->__pyx_n_s_rectangular2magnitudes
#define __pyx_n_s_rectangular2polar __pyx_mstate_global->__pyx_n_s_rectangular2polar
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
#define __pyx_n_s_repr __pyx_mstate_global->__pyx_n_s_repr
#define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res
#define __pyx_n_s_reshape __pyx_mstate_global->__pyx_n_s_reshape
#define __pyx_n_s_resize __pyx_mstate_global->__pyx_n_s_resize
#define __pyx_n_s_reverb __pyx_mstate_global->__pyx_n_s_reverb
#define __pyx_n_s_reverb_channels __pyx_mstate_global->__pyx_n_s_reverb_channels
#define __pyx_n_s_reverb_data __pyx_mstate_global->__pyx_n_s_reverb_data
#define __pyx_n_s_reverb_file_name __pyx_mstate_global->__pyx_n_s_reverb_file_name
#define __pyx_n_s_reverb_to_file __pyx_mstate_global->__pyx_n_s_reverb_to_file
#define __pyx_n_s_revfile __pyx_mstate_global->__pyx_n_s_revfile
#define __pyx_kp_u_revmax __pyx_mstate_global->__pyx_kp_u_revmax
#define __pyx_n_s_revout __pyx_mstate_global->__pyx_n_s_revout
#define __pyx_n_s_ring_modulate __pyx_mstate_global->__pyx_n_s_ring_modulate
#define __pyx_n_s_rl1 __pyx_mstate_global->__pyx_n_s_rl1
#define __pyx_n_s_rl2 __pyx_mstate_global->__pyx_n_s_rl2
#define __pyx_n_s_run __pyx_mstate_global->__pyx_n_s_run
#define __pyx_n_s_rxykcos __pyx_mstate_global->__pyx_n_s_rxykcos
#define __pyx_n_s_rxyksin __pyx_mstate_global->__pyx_n_s_rxyksin
#define __pyx_n_s_s1 __pyx_mstate_global->__pyx_n_s_s1
#define __pyx_n_s_s2 __pyx_mstate_global->__pyx_n_s_s2
#define __pyx_n_s_s3 __pyx_mstate_global->__pyx_n_s_s3
#define __pyx_kp_s_s_s __pyx_mstate_global->__pyx_kp_s_s_s
#define __pyx_kp_s_s_s_d __pyx_mstate_global->__pyx_kp_s_s_s_d
#define __pyx_n_s_samp __pyx_mstate_global->__pyx_n_s_samp
#define __pyx_n_s_sample2file __pyx_mstate_global->__pyx_n_s_sample2file
#define __pyx_n_s_sample_type __pyx_mstate_global->__pyx_n_s_sample_type
#define __pyx_kp_u_samples __pyx_mstate_global->__pyx_kp_u_samples
#define __pyx_n_s_samples2seconds __pyx_mstate_global->__pyx_n_s_samples2seconds
#define __pyx_n_s_samples_2 __pyx_mstate_global->__pyx_n_s_samples_2
#define __pyx_n_s_sawtooth_wave __pyx_mstate_global->__pyx_n_s_sawtooth_wave
#define __pyx_n_s_scaled_by __pyx_mstate_global->__pyx_n_s_scaled_by
#define __pyx_n_s_scaled_to __pyx_mstate_global->__pyx_n_s_scaled_to
#define __pyx_n_s_scaler __pyx_mstate_global->__pyx_n_s_scaler
#define __pyx_kp_u_seconds __pyx_mstate_global->__pyx_kp_u_seconds
#define __pyx_n_s_seconds2samples __pyx_mstate_global->__pyx_n_s_seconds2samples
#define __pyx_kp_u_seconds_2 __pyx_mstate_global->__pyx_kp_u_seconds_2
#define __pyx_n_s_secs __pyx_mstate_global->__pyx_n_s_secs
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_set_srate __pyx_mstate_global->__pyx_n_s_set_srate
#define __pyx_n_s_set_up_data __pyx_mstate_global->__pyx_n_s_set_up_data
#define __pyx_n_s_set_up_pv_data __pyx_mstate_global->__pyx_n_s_set_up_pv_data
#define __pyx_n_s_set_up_xcoeffs __pyx_mstate_global->__pyx_n_s_set_up_xcoeffs
#define __pyx_n_s_set_up_ycoeffs __pyx_mstate_global->__pyx_n_s_set_up_ycoeffs
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
#define __pyx_n_s_sign __pyx_mstate_global->__pyx_n_s_sign
#define __pyx_n_s_sin __pyx_mstate_global->__pyx_n_s_sin
#define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
#define __pyx_n_u_size __pyx_mstate_global->__pyx_n_u_size
#define __pyx_kp_u_size_fft __pyx_mstate_global->__pyx_kp_u_size_fft
#define __pyx_n_s_sndplay __pyx_mstate_global->__pyx_n_s_sndplay
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_spectrum __pyx_mstate_global->__pyx_n_s_spectrum
#define __pyx_n_s_sqrt __pyx_mstate_global->__pyx_n_s_sqrt
#define __pyx_n_s_square_wave __pyx_mstate_global->__pyx_n_s_square_wave
#define __pyx_n_s_sr __pyx_mstate_global->__pyx_n_s_sr
#define __pyx_n_s_sr_change __pyx_mstate_global->__pyx_n_s_sr_change
#define __pyx_n_s_srate __pyx_mstate_global->__pyx_n_s_srate
#define __pyx_n_u_srate __pyx_mstate_global->__pyx_n_u_srate
#define __pyx_n_s_src __pyx_mstate_global->__pyx_n_s_src
#define __pyx_kp_s_src_pysndlib_clm_pyx __pyx_mstate_global->__pyx_kp_s_src_pysndlib_clm_pyx
#define __pyx_n_s_ssb_am __pyx_mstate_global->__pyx_n_s_ssb_am
#define __pyx_n_s_ssb_am_unmodulated __pyx_mstate_global->__pyx_n_s_ssb_am_unmodulated
#define __pyx_n_s_stable __pyx_mstate_global->__pyx_n_s_stable
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_u_start __pyx_mstate_global->__pyx_n_u_start
#define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_statistics __pyx_mstate_global->__pyx_n_s_statistics
#define __pyx_n_s_statstr __pyx_mstate_global->__pyx_n_s_statstr
#define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
#define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_n_s_str_2 __pyx_mstate_global->__pyx_n_s_str_2
#define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
#define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
#define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
#define __pyx_n_s_subprocess __pyx_mstate_global->__pyx_n_s_subprocess
#define __pyx_n_s_sum __pyx_mstate_global->__pyx_n_s_sum
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_sweep __pyx_mstate_global->__pyx_n_s_sweep
#define __pyx_n_s_synthesize __pyx_mstate_global->__pyx_n_s_synthesize
#define __pyx_n_s_synthesize_f __pyx_mstate_global->__pyx_n_s_synthesize_f
#define __pyx_n_s_synthesizecallback __pyx_mstate_global->__pyx_n_s_synthesizecallback
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_table __pyx_mstate_global->__pyx_n_s_table
#define __pyx_n_s_table_lookup __pyx_mstate_global->__pyx_n_s_table_lookup
#define __pyx_n_s_table_lookup_unmodulated __pyx_mstate_global->__pyx_n_s_table_lookup_unmodulated
#define __pyx_n_s_table_size __pyx_mstate_global->__pyx_n_s_table_size
#define __pyx_n_s_tan __pyx_mstate_global->__pyx_n_s_tan
#define __pyx_n_s_tap __pyx_mstate_global->__pyx_n_s_tap
#define __pyx_n_s_tap_unmodulated __pyx_mstate_global->__pyx_n_s_tap_unmodulated
#define __pyx_n_s_tcoeffs __pyx_mstate_global->__pyx_n_s_tcoeffs
#define __pyx_kp_u_temp __pyx_mstate_global->__pyx_kp_u_temp
#define __pyx_n_s_tempfile __pyx_mstate_global->__pyx_n_s_tempfile
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_kp_u_test_aif __pyx_mstate_global->__pyx_kp_u_test_aif
#define __pyx_kp_u_test_rev __pyx_mstate_global->__pyx_kp_u_test_rev
#define __pyx_kp_u_test_wav __pyx_mstate_global->__pyx_kp_u_test_wav
#define __pyx_kp_u_this_class_cannot_be_instantiate __pyx_mstate_global->__pyx_kp_u_this_class_cannot_be_instantiate
#define __pyx_kp_s_this_is_general_class_to_raise __pyx_mstate_global->__pyx_kp_s_this_is_general_class_to_raise
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_tic __pyx_mstate_global->__pyx_n_s_tic
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_n_s_times __pyx_mstate_global->__pyx_n_s_times
#define __pyx_n_s_times_view __pyx_mstate_global->__pyx_n_s_times_view
#define __pyx_n_s_to_partials __pyx_mstate_global->__pyx_n_s_to_partials
#define __pyx_n_s_toc __pyx_mstate_global->__pyx_n_s_toc
#define __pyx_n_s_triangle_wave __pyx_mstate_global->__pyx_n_s_triangle_wave
#define __pyx_n_s_triangle_wave_unmodulated __pyx_mstate_global->__pyx_n_s_triangle_wave_unmodulated
#define __pyx_n_s_two_pole __pyx_mstate_global->__pyx_n_s_two_pole
#define __pyx_n_s_two_zero __pyx_mstate_global->__pyx_n_s_two_zero
#define __pyx_n_s_types __pyx_mstate_global->__pyx_n_s_types
#define __pyx_kp_s_types_of_normalizations_when_us __pyx_mstate_global->__pyx_kp_s_types_of_normalizations_when_us
#define __pyx_n_s_ucoeffs __pyx_mstate_global->__pyx_n_s_ucoeffs
#define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
#define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
#define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_kp_s_used_for_polynomial_based_gens __pyx_mstate_global->__pyx_kp_s_used_for_polynomial_based_gens
#define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v
#define __pyx_n_s_val __pyx_mstate_global->__pyx_n_s_val
#define __pyx_n_s_validate_envelope __pyx_mstate_global->__pyx_n_s_validate_envelope
#define __pyx_n_s_validate_envelope_locals_genexpr __pyx_mstate_global->__pyx_n_s_validate_envelope_locals_genexpr
#define __pyx_n_s_vals __pyx_mstate_global->__pyx_n_s_vals
#define __pyx_n_s_vals_view __pyx_mstate_global->__pyx_n_s_vals_view
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
#define __pyx_kp_s_various_interpolation_types __pyx_mstate_global->__pyx_kp_s_various_interpolation_types
#define __pyx_n_s_verbose __pyx_mstate_global->__pyx_n_s_verbose
#define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
#define __pyx_kp_u_vs __pyx_mstate_global->__pyx_kp_u_vs
#define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn
#define __pyx_n_s_warnings __pyx_mstate_global->__pyx_n_s_warnings
#define __pyx_n_s_wave __pyx_mstate_global->__pyx_n_s_wave
#define __pyx_n_s_wave_train __pyx_mstate_global->__pyx_n_s_wave_train
#define __pyx_n_s_wave_train_unmodulated __pyx_mstate_global->__pyx_n_s_wave_train_unmodulated
#define __pyx_n_s_width __pyx_mstate_global->__pyx_n_s_width
#define __pyx_n_u_width __pyx_mstate_global->__pyx_n_u_width
#define __pyx_n_s_window __pyx_mstate_global->__pyx_n_s_window
#define __pyx_n_s_window_type __pyx_mstate_global->__pyx_n_s_window_type
#define __pyx_n_s_wrap __pyx_mstate_global->__pyx_n_s_wrap
#define __pyx_n_s_wraps __pyx_mstate_global->__pyx_n_s_wraps
#define __pyx_kp_u_writing_to __pyx_mstate_global->__pyx_kp_u_writing_to
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_kp_u_x_values_of_envelope_must_be_inc __pyx_mstate_global->__pyx_kp_u_x_values_of_envelope_must_be_inc
#define __pyx_n_s_xcoeffs __pyx_mstate_global->__pyx_n_s_xcoeffs
#define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
#define __pyx_n_s_y1 __pyx_mstate_global->__pyx_n_s_y1
#define __pyx_n_s_ycoeffs __pyx_mstate_global->__pyx_n_s_ycoeffs
#define __pyx_n_s_zeros __pyx_mstate_global->__pyx_n_s_zeros
#define __pyx_n_s_zip __pyx_mstate_global->__pyx_n_s_zip
#define __pyx_float__4 __pyx_mstate_global->__pyx_float__4
#define __pyx_float__5 __pyx_mstate_global->__pyx_float__5
#define __pyx_float__6 __pyx_mstate_global->__pyx_float__6
#define __pyx_float_0_ __pyx_mstate_global->__pyx_float_0_
#define __pyx_float_1_ __pyx_mstate_global->__pyx_float_1_
#define __pyx_float__05 __pyx_mstate_global->__pyx_float__05
#define __pyx_float__15 __pyx_mstate_global->__pyx_float__15
#define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0
#define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
#define __pyx_float_2_0 __pyx_mstate_global->__pyx_float_2_0
#define __pyx_float_neg__99 __pyx_mstate_global->__pyx_float_neg__99
#define __pyx_float_neg_1_0 __pyx_mstate_global->__pyx_float_neg_1_0
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
#define __pyx_int_40 __pyx_mstate_global->__pyx_int_40
#define __pyx_int_128 __pyx_mstate_global->__pyx_int_128
#define __pyx_int_512 __pyx_mstate_global->__pyx_int_512
#define __pyx_int_44100 __pyx_mstate_global->__pyx_int_44100
#define __pyx_int_65536 __pyx_mstate_global->__pyx_int_65536
#define __pyx_int_49617724 __pyx_mstate_global->__pyx_int_49617724
#define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
#define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
#define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
#define __pyx_int_185414130 __pyx_mstate_global->__pyx_int_185414130
#define __pyx_int_222419149 __pyx_mstate_global->__pyx_int_222419149
#define __pyx_int_228825662 __pyx_mstate_global->__pyx_int_228825662
#define __pyx_int_232027208 __pyx_mstate_global->__pyx_int_232027208
#define __pyx_int_238750788 __pyx_mstate_global->__pyx_int_238750788
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_k__27 __pyx_mstate_global->__pyx_k__27
#define __pyx_k__28 __pyx_mstate_global->__pyx_k__28
#define __pyx_k__29 __pyx_mstate_global->__pyx_k__29
#define __pyx_k__32 __pyx_mstate_global->__pyx_k__32
#define __pyx_k__33 __pyx_mstate_global->__pyx_k__33
#define __pyx_k__34 __pyx_mstate_global->__pyx_k__34
#define __pyx_k__35 __pyx_mstate_global->__pyx_k__35
#define __pyx_k__36 __pyx_mstate_global->__pyx_k__36
#define __pyx_k__37 __pyx_mstate_global->__pyx_k__37
#define __pyx_k__38 __pyx_mstate_global->__pyx_k__38
#define __pyx_k__39 __pyx_mstate_global->__pyx_k__39
#define __pyx_k__40 __pyx_mstate_global->__pyx_k__40
#define __pyx_k__43 __pyx_mstate_global->__pyx_k__43
#define __pyx_k__44 __pyx_mstate_global->__pyx_k__44
#define __pyx_k__45 __pyx_mstate_global->__pyx_k__45
#define __pyx_k__47 __pyx_mstate_global->__pyx_k__47
#define __pyx_k__48 __pyx_mstate_global->__pyx_k__48
#define __pyx_k__61 __pyx_mstate_global->__pyx_k__61
#define __pyx_slice__7 __pyx_mstate_global->__pyx_slice__7
#define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_slice__21 __pyx_mstate_global->__pyx_slice__21
#define __pyx_slice__25 __pyx_mstate_global->__pyx_slice__25
#define __pyx_slice__30 __pyx_mstate_global->__pyx_slice__30
#define __pyx_slice__31 __pyx_mstate_global->__pyx_slice__31
#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
#define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
#define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
#define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78
#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84
#define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86
#define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87
#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88
#define __pyx_tuple__89 __pyx_mstate_global->__pyx_tuple__89
#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90
#define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91
#define __pyx_tuple__92 __pyx_mstate_global->__pyx_tuple__92
#define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93
#define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94
#define __pyx_tuple__96 __pyx_mstate_global->__pyx_tuple__96
#define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99
#define __pyx_tuple__101 __pyx_mstate_global->__pyx_tuple__101
#define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103
#define __pyx_tuple__104 __pyx_mstate_global->__pyx_tuple__104
#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
#define __pyx_tuple__107 __pyx_mstate_global->__pyx_tuple__107
#define __pyx_tuple__109 __pyx_mstate_global->__pyx_tuple__109
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114
#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119
#define __pyx_tuple__121 __pyx_mstate_global->__pyx_tuple__121
#define __pyx_tuple__126 __pyx_mstate_global->__pyx_tuple__126
#define __pyx_tuple__128 __pyx_mstate_global->__pyx_tuple__128
#define __pyx_tuple__130 __pyx_mstate_global->__pyx_tuple__130
#define __pyx_tuple__131 __pyx_mstate_global->__pyx_tuple__131
#define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__133 __pyx_mstate_global->__pyx_tuple__133
#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135
#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138
#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140
#define __pyx_tuple__144 __pyx_mstate_global->__pyx_tuple__144
#define __pyx_tuple__146 __pyx_mstate_global->__pyx_tuple__146
#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156
#define __pyx_tuple__157 __pyx_mstate_global->__pyx_tuple__157
#define __pyx_tuple__160 __pyx_mstate_global->__pyx_tuple__160
#define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164
#define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166
#define __pyx_tuple__168 __pyx_mstate_global->__pyx_tuple__168
#define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
#define __pyx_tuple__178 __pyx_mstate_global->__pyx_tuple__178
#define __pyx_tuple__180 __pyx_mstate_global->__pyx_tuple__180
#define __pyx_tuple__182 __pyx_mstate_global->__pyx_tuple__182
#define __pyx_tuple__184 __pyx_mstate_global->__pyx_tuple__184
#define __pyx_tuple__186 __pyx_mstate_global->__pyx_tuple__186
#define __pyx_tuple__188 __pyx_mstate_global->__pyx_tuple__188
#define __pyx_tuple__190 __pyx_mstate_global->__pyx_tuple__190
#define __pyx_tuple__191 __pyx_mstate_global->__pyx_tuple__191
#define __pyx_tuple__193 __pyx_mstate_global->__pyx_tuple__193
#define __pyx_tuple__195 __pyx_mstate_global->__pyx_tuple__195
#define __pyx_tuple__198 __pyx_mstate_global->__pyx_tuple__198
#define __pyx_tuple__200 __pyx_mstate_global->__pyx_tuple__200
#define __pyx_tuple__201 __pyx_mstate_global->__pyx_tuple__201
#define __pyx_tuple__203 __pyx_mstate_global->__pyx_tuple__203
#define __pyx_tuple__204 __pyx_mstate_global->__pyx_tuple__204
#define __pyx_tuple__207 __pyx_mstate_global->__pyx_tuple__207
#define __pyx_tuple__214 __pyx_mstate_global->__pyx_tuple__214
#define __pyx_tuple__217 __pyx_mstate_global->__pyx_tuple__217
#define __pyx_tuple__219 __pyx_mstate_global->__pyx_tuple__219
#define __pyx_tuple__221 __pyx_mstate_global->__pyx_tuple__221
#define __pyx_tuple__228 __pyx_mstate_global->__pyx_tuple__228
#define __pyx_tuple__230 __pyx_mstate_global->__pyx_tuple__230
#define __pyx_tuple__232 __pyx_mstate_global->__pyx_tuple__232
#define __pyx_tuple__233 __pyx_mstate_global->__pyx_tuple__233
#define __pyx_tuple__235 __pyx_mstate_global->__pyx_tuple__235
#define __pyx_tuple__237 __pyx_mstate_global->__pyx_tuple__237
#define __pyx_tuple__239 __pyx_mstate_global->__pyx_tuple__239
#define __pyx_tuple__241 __pyx_mstate_global->__pyx_tuple__241
#define __pyx_tuple__243 __pyx_mstate_global->__pyx_tuple__243
#define __pyx_tuple__245 __pyx_mstate_global->__pyx_tuple__245
#define __pyx_tuple__246 __pyx_mstate_global->__pyx_tuple__246
#define __pyx_tuple__248 __pyx_mstate_global->__pyx_tuple__248
#define __pyx_tuple__251 __pyx_mstate_global->__pyx_tuple__251
#define __pyx_tuple__253 __pyx_mstate_global->__pyx_tuple__253
#define __pyx_tuple__256 __pyx_mstate_global->__pyx_tuple__256
#define __pyx_tuple__258 __pyx_mstate_global->__pyx_tuple__258
#define __pyx_tuple__261 __pyx_mstate_global->__pyx_tuple__261
#define __pyx_tuple__265 __pyx_mstate_global->__pyx_tuple__265
#define __pyx_tuple__267 __pyx_mstate_global->__pyx_tuple__267
#define __pyx_tuple__269 __pyx_mstate_global->__pyx_tuple__269
#define __pyx_tuple__271 __pyx_mstate_global->__pyx_tuple__271
#define __pyx_tuple__274 __pyx_mstate_global->__pyx_tuple__274
#define __pyx_tuple__277 __pyx_mstate_global->__pyx_tuple__277
#define __pyx_tuple__280 __pyx_mstate_global->__pyx_tuple__280
#define __pyx_tuple__282 __pyx_mstate_global->__pyx_tuple__282
#define __pyx_tuple__285 __pyx_mstate_global->__pyx_tuple__285
#define __pyx_tuple__288 __pyx_mstate_global->__pyx_tuple__288
#define __pyx_tuple__290 __pyx_mstate_global->__pyx_tuple__290
#define __pyx_tuple__292 __pyx_mstate_global->__pyx_tuple__292
#define __pyx_tuple__293 __pyx_mstate_global->__pyx_tuple__293
#define __pyx_tuple__295 __pyx_mstate_global->__pyx_tuple__295
#define __pyx_tuple__297 __pyx_mstate_global->__pyx_tuple__297
#define __pyx_tuple__300 __pyx_mstate_global->__pyx_tuple__300
#define __pyx_tuple__304 __pyx_mstate_global->__pyx_tuple__304
#define __pyx_tuple__306 __pyx_mstate_global->__pyx_tuple__306
#define __pyx_tuple__310 __pyx_mstate_global->__pyx_tuple__310
#define __pyx_tuple__314 __pyx_mstate_global->__pyx_tuple__314
#define __pyx_tuple__317 __pyx_mstate_global->__pyx_tuple__317
#define __pyx_tuple__320 __pyx_mstate_global->__pyx_tuple__320
#define __pyx_tuple__324 __pyx_mstate_global->__pyx_tuple__324
#define __pyx_tuple__326 __pyx_mstate_global->__pyx_tuple__326
#define __pyx_tuple__328 __pyx_mstate_global->__pyx_tuple__328
#define __pyx_tuple__330 __pyx_mstate_global->__pyx_tuple__330
#define __pyx_tuple__333 __pyx_mstate_global->__pyx_tuple__333
#define __pyx_tuple__335 __pyx_mstate_global->__pyx_tuple__335
#define __pyx_tuple__337 __pyx_mstate_global->__pyx_tuple__337
#define __pyx_tuple__339 __pyx_mstate_global->__pyx_tuple__339
#define __pyx_tuple__341 __pyx_mstate_global->__pyx_tuple__341
#define __pyx_tuple__344 __pyx_mstate_global->__pyx_tuple__344
#define __pyx_tuple__346 __pyx_mstate_global->__pyx_tuple__346
#define __pyx_tuple__348 __pyx_mstate_global->__pyx_tuple__348
#define __pyx_tuple__350 __pyx_mstate_global->__pyx_tuple__350
#define __pyx_tuple__351 __pyx_mstate_global->__pyx_tuple__351
#define __pyx_tuple__353 __pyx_mstate_global->__pyx_tuple__353
#define __pyx_tuple__354 __pyx_mstate_global->__pyx_tuple__354
#define __pyx_tuple__357 __pyx_mstate_global->__pyx_tuple__357
#define __pyx_tuple__360 __pyx_mstate_global->__pyx_tuple__360
#define __pyx_tuple__364 __pyx_mstate_global->__pyx_tuple__364
#define __pyx_tuple__366 __pyx_mstate_global->__pyx_tuple__366
#define __pyx_tuple__367 __pyx_mstate_global->__pyx_tuple__367
#define __pyx_tuple__369 __pyx_mstate_global->__pyx_tuple__369
#define __pyx_tuple__373 __pyx_mstate_global->__pyx_tuple__373
#define __pyx_tuple__375 __pyx_mstate_global->__pyx_tuple__375
#define __pyx_tuple__378 __pyx_mstate_global->__pyx_tuple__378
#define __pyx_tuple__382 __pyx_mstate_global->__pyx_tuple__382
#define __pyx_tuple__386 __pyx_mstate_global->__pyx_tuple__386
#define __pyx_tuple__390 __pyx_mstate_global->__pyx_tuple__390
#define __pyx_tuple__394 __pyx_mstate_global->__pyx_tuple__394
#define __pyx_tuple__396 __pyx_mstate_global->__pyx_tuple__396
#define __pyx_tuple__398 __pyx_mstate_global->__pyx_tuple__398
#define __pyx_tuple__400 __pyx_mstate_global->__pyx_tuple__400
#define __pyx_tuple__402 __pyx_mstate_global->__pyx_tuple__402
#define __pyx_tuple__407 __pyx_mstate_global->__pyx_tuple__407
#define __pyx_tuple__409 __pyx_mstate_global->__pyx_tuple__409
#define __pyx_tuple__413 __pyx_mstate_global->__pyx_tuple__413
#define __pyx_tuple__417 __pyx_mstate_global->__pyx_tuple__417
#define __pyx_tuple__421 __pyx_mstate_global->__pyx_tuple__421
#define __pyx_tuple__423 __pyx_mstate_global->__pyx_tuple__423
#define __pyx_tuple__425 __pyx_mstate_global->__pyx_tuple__425
#define __pyx_tuple__427 __pyx_mstate_global->__pyx_tuple__427
#define __pyx_tuple__430 __pyx_mstate_global->__pyx_tuple__430
#define __pyx_tuple__432 __pyx_mstate_global->__pyx_tuple__432
#define __pyx_tuple__436 __pyx_mstate_global->__pyx_tuple__436
#define __pyx_tuple__440 __pyx_mstate_global->__pyx_tuple__440
#define __pyx_tuple__444 __pyx_mstate_global->__pyx_tuple__444
#define __pyx_tuple__447 __pyx_mstate_global->__pyx_tuple__447
#define __pyx_tuple__450 __pyx_mstate_global->__pyx_tuple__450
#define __pyx_tuple__454 __pyx_mstate_global->__pyx_tuple__454
#define __pyx_tuple__457 __pyx_mstate_global->__pyx_tuple__457
#define __pyx_tuple__460 __pyx_mstate_global->__pyx_tuple__460
#define __pyx_tuple__464 __pyx_mstate_global->__pyx_tuple__464
#define __pyx_tuple__468 __pyx_mstate_global->__pyx_tuple__468
#define __pyx_tuple__472 __pyx_mstate_global->__pyx_tuple__472
#define __pyx_tuple__474 __pyx_mstate_global->__pyx_tuple__474
#define __pyx_tuple__478 __pyx_mstate_global->__pyx_tuple__478
#define __pyx_tuple__481 __pyx_mstate_global->__pyx_tuple__481
#define __pyx_tuple__483 __pyx_mstate_global->__pyx_tuple__483
#define __pyx_tuple__486 __pyx_mstate_global->__pyx_tuple__486
#define __pyx_tuple__488 __pyx_mstate_global->__pyx_tuple__488
#define __pyx_tuple__490 __pyx_mstate_global->__pyx_tuple__490
#define __pyx_tuple__493 __pyx_mstate_global->__pyx_tuple__493
#define __pyx_tuple__495 __pyx_mstate_global->__pyx_tuple__495
#define __pyx_tuple__498 __pyx_mstate_global->__pyx_tuple__498
#define __pyx_tuple__500 __pyx_mstate_global->__pyx_tuple__500
#define __pyx_tuple__501 __pyx_mstate_global->__pyx_tuple__501
#define __pyx_tuple__504 __pyx_mstate_global->__pyx_tuple__504
#define __pyx_tuple__507 __pyx_mstate_global->__pyx_tuple__507
#define __pyx_tuple__511 __pyx_mstate_global->__pyx_tuple__511
#define __pyx_tuple__515 __pyx_mstate_global->__pyx_tuple__515
#define __pyx_tuple__517 __pyx_mstate_global->__pyx_tuple__517
#define __pyx_tuple__520 __pyx_mstate_global->__pyx_tuple__520
#define __pyx_tuple__522 __pyx_mstate_global->__pyx_tuple__522
#define __pyx_tuple__524 __pyx_mstate_global->__pyx_tuple__524
#define __pyx_tuple__526 __pyx_mstate_global->__pyx_tuple__526
#define __pyx_tuple__530 __pyx_mstate_global->__pyx_tuple__530
#define __pyx_tuple__532 __pyx_mstate_global->__pyx_tuple__532
#define __pyx_tuple__534 __pyx_mstate_global->__pyx_tuple__534
#define __pyx_tuple__536 __pyx_mstate_global->__pyx_tuple__536
#define __pyx_tuple__538 __pyx_mstate_global->__pyx_tuple__538
#define __pyx_tuple__546 __pyx_mstate_global->__pyx_tuple__546
#define __pyx_tuple__548 __pyx_mstate_global->__pyx_tuple__548
#define __pyx_tuple__553 __pyx_mstate_global->__pyx_tuple__553
#define __pyx_tuple__555 __pyx_mstate_global->__pyx_tuple__555
#define __pyx_tuple__557 __pyx_mstate_global->__pyx_tuple__557
#define __pyx_tuple__560 __pyx_mstate_global->__pyx_tuple__560
#define __pyx_tuple__562 __pyx_mstate_global->__pyx_tuple__562
#define __pyx_tuple__565 __pyx_mstate_global->__pyx_tuple__565
#define __pyx_tuple__567 __pyx_mstate_global->__pyx_tuple__567
#define __pyx_tuple__571 __pyx_mstate_global->__pyx_tuple__571
#define __pyx_tuple__573 __pyx_mstate_global->__pyx_tuple__573
#define __pyx_tuple__575 __pyx_mstate_global->__pyx_tuple__575
#define __pyx_tuple__578 __pyx_mstate_global->__pyx_tuple__578
#define __pyx_tuple__582 __pyx_mstate_global->__pyx_tuple__582
#define __pyx_tuple__584 __pyx_mstate_global->__pyx_tuple__584
#define __pyx_tuple__590 __pyx_mstate_global->__pyx_tuple__590
#define __pyx_tuple__592 __pyx_mstate_global->__pyx_tuple__592
#define __pyx_tuple__597 __pyx_mstate_global->__pyx_tuple__597
#define __pyx_tuple__599 __pyx_mstate_global->__pyx_tuple__599
#define __pyx_tuple__602 __pyx_mstate_global->__pyx_tuple__602
#define __pyx_tuple__605 __pyx_mstate_global->__pyx_tuple__605
#define __pyx_tuple__607 __pyx_mstate_global->__pyx_tuple__607
#define __pyx_tuple__609 __pyx_mstate_global->__pyx_tuple__609
#define __pyx_tuple__610 __pyx_mstate_global->__pyx_tuple__610
#define __pyx_tuple__612 __pyx_mstate_global->__pyx_tuple__612
#define __pyx_tuple__614 __pyx_mstate_global->__pyx_tuple__614
#define __pyx_tuple__616 __pyx_mstate_global->__pyx_tuple__616
#define __pyx_tuple__618 __pyx_mstate_global->__pyx_tuple__618
#define __pyx_tuple__622 __pyx_mstate_global->__pyx_tuple__622
#define __pyx_tuple__627 __pyx_mstate_global->__pyx_tuple__627
#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
#define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52
#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
#define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56
#define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
#define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
#define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
#define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65
#define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66
#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69
#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72
#define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74
#define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76
#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79
#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80
#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81
#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82
#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83
#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85
#define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95
#define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100
#define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102
#define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105
#define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108
#define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110
#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111
#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118
#define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120
#define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124
#define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125
#define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127
#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134
#define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136
#define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139
#define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141
#define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142
#define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143
#define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145
#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147
#define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__150 __pyx_mstate_global->__pyx_codeobj__150
#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
#define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152
#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
#define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154
#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
#define __pyx_codeobj__158 __pyx_mstate_global->__pyx_codeobj__158
#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
#define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__167 __pyx_mstate_global->__pyx_codeobj__167
#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169
#define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170
#define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171
#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__175 __pyx_mstate_global->__pyx_codeobj__175
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
#define __pyx_codeobj__177 __pyx_mstate_global->__pyx_codeobj__177
#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
#define __pyx_codeobj__181 __pyx_mstate_global->__pyx_codeobj__181
#define __pyx_codeobj__183 __pyx_mstate_global->__pyx_codeobj__183
#define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
#define __pyx_codeobj__192 __pyx_mstate_global->__pyx_codeobj__192
#define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194
#define __pyx_codeobj__196 __pyx_mstate_global->__pyx_codeobj__196
#define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197
#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
#define __pyx_codeobj__202 __pyx_mstate_global->__pyx_codeobj__202
#define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205
#define __pyx_codeobj__206 __pyx_mstate_global->__pyx_codeobj__206
#define __pyx_codeobj__208 __pyx_mstate_global->__pyx_codeobj__208
#define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209
#define __pyx_codeobj__210 __pyx_mstate_global->__pyx_codeobj__210
#define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211
#define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212
#define __pyx_codeobj__213 __pyx_mstate_global->__pyx_codeobj__213
#define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215
#define __pyx_codeobj__216 __pyx_mstate_global->__pyx_codeobj__216
#define __pyx_codeobj__218 __pyx_mstate_global->__pyx_codeobj__218
#define __pyx_codeobj__220 __pyx_mstate_global->__pyx_codeobj__220
#define __pyx_codeobj__222 __pyx_mstate_global->__pyx_codeobj__222
#define __pyx_codeobj__223 __pyx_mstate_global->__pyx_codeobj__223
#define __pyx_codeobj__224 __pyx_mstate_global->__pyx_codeobj__224
#define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
#define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226
#define __pyx_codeobj__227 __pyx_mstate_global->__pyx_codeobj__227
#define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229
#define __pyx_codeobj__231 __pyx_mstate_global->__pyx_codeobj__231
#define __pyx_codeobj__234 __pyx_mstate_global->__pyx_codeobj__234
#define __pyx_codeobj__236 __pyx_mstate_global->__pyx_codeobj__236
#define __pyx_codeobj__238 __pyx_mstate_global->__pyx_codeobj__238
#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240
#define __pyx_codeobj__242 __pyx_mstate_global->__pyx_codeobj__242
#define __pyx_codeobj__244 __pyx_mstate_global->__pyx_codeobj__244
#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247
#define __pyx_codeobj__249 __pyx_mstate_global->__pyx_codeobj__249
#define __pyx_codeobj__250 __pyx_mstate_global->__pyx_codeobj__250
#define __pyx_codeobj__252 __pyx_mstate_global->__pyx_codeobj__252
#define __pyx_codeobj__254 __pyx_mstate_global->__pyx_codeobj__254
#define __pyx_codeobj__255 __pyx_mstate_global->__pyx_codeobj__255
#define __pyx_codeobj__257 __pyx_mstate_global->__pyx_codeobj__257
#define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259
#define __pyx_codeobj__260 __pyx_mstate_global->__pyx_codeobj__260
#define __pyx_codeobj__262 __pyx_mstate_global->__pyx_codeobj__262
#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
#define __pyx_codeobj__264 __pyx_mstate_global->__pyx_codeobj__264
#define __pyx_codeobj__266 __pyx_mstate_global->__pyx_codeobj__266
#define __pyx_codeobj__268 __pyx_mstate_global->__pyx_codeobj__268
#define __pyx_codeobj__270 __pyx_mstate_global->__pyx_codeobj__270
#define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272
#define __pyx_codeobj__273 __pyx_mstate_global->__pyx_codeobj__273
#define __pyx_codeobj__275 __pyx_mstate_global->__pyx_codeobj__275
#define __pyx_codeobj__276 __pyx_mstate_global->__pyx_codeobj__276
#define __pyx_codeobj__278 __pyx_mstate_global->__pyx_codeobj__278
#define __pyx_codeobj__279 __pyx_mstate_global->__pyx_codeobj__279
#define __pyx_codeobj__281 __pyx_mstate_global->__pyx_codeobj__281
#define __pyx_codeobj__283 __pyx_mstate_global->__pyx_codeobj__283
#define __pyx_codeobj__284 __pyx_mstate_global->__pyx_codeobj__284
#define __pyx_codeobj__286 __pyx_mstate_global->__pyx_codeobj__286
#define __pyx_codeobj__287 __pyx_mstate_global->__pyx_codeobj__287
#define __pyx_codeobj__289 __pyx_mstate_global->__pyx_codeobj__289
#define __pyx_codeobj__291 __pyx_mstate_global->__pyx_codeobj__291
#define __pyx_codeobj__294 __pyx_mstate_global->__pyx_codeobj__294
#define __pyx_codeobj__296 __pyx_mstate_global->__pyx_codeobj__296
#define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298
#define __pyx_codeobj__299 __pyx_mstate_global->__pyx_codeobj__299
#define __pyx_codeobj__301 __pyx_mstate_global->__pyx_codeobj__301
#define __pyx_codeobj__302 __pyx_mstate_global->__pyx_codeobj__302
#define __pyx_codeobj__303 __pyx_mstate_global->__pyx_codeobj__303
#define __pyx_codeobj__305 __pyx_mstate_global->__pyx_codeobj__305
#define __pyx_codeobj__307 __pyx_mstate_global->__pyx_codeobj__307
#define __pyx_codeobj__308 __pyx_mstate_global->__pyx_codeobj__308
#define __pyx_codeobj__309 __pyx_mstate_global->__pyx_codeobj__309
#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311
#define __pyx_codeobj__312 __pyx_mstate_global->__pyx_codeobj__312
#define __pyx_codeobj__313 __pyx_mstate_global->__pyx_codeobj__313
#define __pyx_codeobj__315 __pyx_mstate_global->__pyx_codeobj__315
#define __pyx_codeobj__316 __pyx_mstate_global->__pyx_codeobj__316
#define __pyx_codeobj__318 __pyx_mstate_global->__pyx_codeobj__318
#define __pyx_codeobj__319 __pyx_mstate_global->__pyx_codeobj__319
#define __pyx_codeobj__321 __pyx_mstate_global->__pyx_codeobj__321
#define __pyx_codeobj__322 __pyx_mstate_global->__pyx_codeobj__322
#define __pyx_codeobj__323 __pyx_mstate_global->__pyx_codeobj__323
#define __pyx_codeobj__325 __pyx_mstate_global->__pyx_codeobj__325
#define __pyx_codeobj__327 __pyx_mstate_global->__pyx_codeobj__327
#define __pyx_codeobj__329 __pyx_mstate_global->__pyx_codeobj__329
#define __pyx_codeobj__331 __pyx_mstate_global->__pyx_codeobj__331
#define __pyx_codeobj__332 __pyx_mstate_global->__pyx_codeobj__332
#define __pyx_codeobj__334 __pyx_mstate_global->__pyx_codeobj__334
#define __pyx_codeobj__336 __pyx_mstate_global->__pyx_codeobj__336
#define __pyx_codeobj__338 __pyx_mstate_global->__pyx_codeobj__338
#define __pyx_codeobj__340 __pyx_mstate_global->__pyx_codeobj__340
#define __pyx_codeobj__342 __pyx_mstate_global->__pyx_codeobj__342
#define __pyx_codeobj__343 __pyx_mstate_global->__pyx_codeobj__343
#define __pyx_codeobj__345 __pyx_mstate_global->__pyx_codeobj__345
#define __pyx_codeobj__347 __pyx_mstate_global->__pyx_codeobj__347
#define __pyx_codeobj__349 __pyx_mstate_global->__pyx_codeobj__349
#define __pyx_codeobj__352 __pyx_mstate_global->__pyx_codeobj__352
#define __pyx_codeobj__355 __pyx_mstate_global->__pyx_codeobj__355
#define __pyx_codeobj__356 __pyx_mstate_global->__pyx_codeobj__356
#define __pyx_codeobj__358 __pyx_mstate_global->__pyx_codeobj__358
#define __pyx_codeobj__359 __pyx_mstate_global->__pyx_codeobj__359
#define __pyx_codeobj__361 __pyx_mstate_global->__pyx_codeobj__361
#define __pyx_codeobj__362 __pyx_mstate_global->__pyx_codeobj__362
#define __pyx_codeobj__363 __pyx_mstate_global->__pyx_codeobj__363
#define __pyx_codeobj__365 __pyx_mstate_global->__pyx_codeobj__365
#define __pyx_codeobj__368 __pyx_mstate_global->__pyx_codeobj__368
#define __pyx_codeobj__370 __pyx_mstate_global->__pyx_codeobj__370
#define __pyx_codeobj__371 __pyx_mstate_global->__pyx_codeobj__371
#define __pyx_codeobj__372 __pyx_mstate_global->__pyx_codeobj__372
#define __pyx_codeobj__374 __pyx_mstate_global->__pyx_codeobj__374
#define __pyx_codeobj__376 __pyx_mstate_global->__pyx_codeobj__376
#define __pyx_codeobj__377 __pyx_mstate_global->__pyx_codeobj__377
#define __pyx_codeobj__379 __pyx_mstate_global->__pyx_codeobj__379
#define __pyx_codeobj__380 __pyx_mstate_global->__pyx_codeobj__380
#define __pyx_codeobj__381 __pyx_mstate_global->__pyx_codeobj__381
#define __pyx_codeobj__383 __pyx_mstate_global->__pyx_codeobj__383
#define __pyx_codeobj__384 __pyx_mstate_global->__pyx_codeobj__384
#define __pyx_codeobj__385 __pyx_mstate_global->__pyx_codeobj__385
#define __pyx_codeobj__387 __pyx_mstate_global->__pyx_codeobj__387
#define __pyx_codeobj__388 __pyx_mstate_global->__pyx_codeobj__388
#define __pyx_codeobj__389 __pyx_mstate_global->__pyx_codeobj__389
#define __pyx_codeobj__391 __pyx_mstate_global->__pyx_codeobj__391
#define __pyx_codeobj__392 __pyx_mstate_global->__pyx_codeobj__392
#define __pyx_codeobj__393 __pyx_mstate_global->__pyx_codeobj__393
#define __pyx_codeobj__395 __pyx_mstate_global->__pyx_codeobj__395
#define __pyx_codeobj__397 __pyx_mstate_global->__pyx_codeobj__397
#define __pyx_codeobj__399 __pyx_mstate_global->__pyx_codeobj__399
#define __pyx_codeobj__401 __pyx_mstate_global->__pyx_codeobj__401
#define __pyx_codeobj__403 __pyx_mstate_global->__pyx_codeobj__403
#define __pyx_codeobj__404 __pyx_mstate_global->__pyx_codeobj__404
#define __pyx_codeobj__405 __pyx_mstate_global->__pyx_codeobj__405
#define __pyx_codeobj__406 __pyx_mstate_global->__pyx_codeobj__406
#define __pyx_codeobj__408 __pyx_mstate_global->__pyx_codeobj__408
#define __pyx_codeobj__410 __pyx_mstate_global->__pyx_codeobj__410
#define __pyx_codeobj__411 __pyx_mstate_global->__pyx_codeobj__411
#define __pyx_codeobj__412 __pyx_mstate_global->__pyx_codeobj__412
#define __pyx_codeobj__414 __pyx_mstate_global->__pyx_codeobj__414
#define __pyx_codeobj__415 __pyx_mstate_global->__pyx_codeobj__415
#define __pyx_codeobj__416 __pyx_mstate_global->__pyx_codeobj__416
#define __pyx_codeobj__418 __pyx_mstate_global->__pyx_codeobj__418
#define __pyx_codeobj__419 __pyx_mstate_global->__pyx_codeobj__419
#define __pyx_codeobj__420 __pyx_mstate_global->__pyx_codeobj__420
#define __pyx_codeobj__422 __pyx_mstate_global->__pyx_codeobj__422
#define __pyx_codeobj__424 __pyx_mstate_global->__pyx_codeobj__424
#define __pyx_codeobj__426 __pyx_mstate_global->__pyx_codeobj__426
#define __pyx_codeobj__428 __pyx_mstate_global->__pyx_codeobj__428
#define __pyx_codeobj__429 __pyx_mstate_global->__pyx_codeobj__429
#define __pyx_codeobj__431 __pyx_mstate_global->__pyx_codeobj__431
#define __pyx_codeobj__433 __pyx_mstate_global->__pyx_codeobj__433
#define __pyx_codeobj__434 __pyx_mstate_global->__pyx_codeobj__434
#define __pyx_codeobj__435 __pyx_mstate_global->__pyx_codeobj__435
#define __pyx_codeobj__437 __pyx_mstate_global->__pyx_codeobj__437
#define __pyx_codeobj__438 __pyx_mstate_global->__pyx_codeobj__438
#define __pyx_codeobj__439 __pyx_mstate_global->__pyx_codeobj__439
#define __pyx_codeobj__441 __pyx_mstate_global->__pyx_codeobj__441
#define __pyx_codeobj__442 __pyx_mstate_global->__pyx_codeobj__442
#define __pyx_codeobj__443 __pyx_mstate_global->__pyx_codeobj__443
#define __pyx_codeobj__445 __pyx_mstate_global->__pyx_codeobj__445
#define __pyx_codeobj__446 __pyx_mstate_global->__pyx_codeobj__446
#define __pyx_codeobj__448 __pyx_mstate_global->__pyx_codeobj__448
#define __pyx_codeobj__449 __pyx_mstate_global->__pyx_codeobj__449
#define __pyx_codeobj__451 __pyx_mstate_global->__pyx_codeobj__451
#define __pyx_codeobj__452 __pyx_mstate_global->__pyx_codeobj__452
#define __pyx_codeobj__453 __pyx_mstate_global->__pyx_codeobj__453
#define __pyx_codeobj__455 __pyx_mstate_global->__pyx_codeobj__455
#define __pyx_codeobj__456 __pyx_mstate_global->__pyx_codeobj__456
#define __pyx_codeobj__458 __pyx_mstate_global->__pyx_codeobj__458
#define __pyx_codeobj__459 __pyx_mstate_global->__pyx_codeobj__459
#define __pyx_codeobj__461 __pyx_mstate_global->__pyx_codeobj__461
#define __pyx_codeobj__462 __pyx_mstate_global->__pyx_codeobj__462
#define __pyx_codeobj__463 __pyx_mstate_global->__pyx_codeobj__463
#define __pyx_codeobj__465 __pyx_mstate_global->__pyx_codeobj__465
#define __pyx_codeobj__466 __pyx_mstate_global->__pyx_codeobj__466
#define __pyx_codeobj__467 __pyx_mstate_global->__pyx_codeobj__467
#define __pyx_codeobj__469 __pyx_mstate_global->__pyx_codeobj__469
#define __pyx_codeobj__470 __pyx_mstate_global->__pyx_codeobj__470
#define __pyx_codeobj__471 __pyx_mstate_global->__pyx_codeobj__471
#define __pyx_codeobj__473 __pyx_mstate_global->__pyx_codeobj__473
#define __pyx_codeobj__475 __pyx_mstate_global->__pyx_codeobj__475
#define __pyx_codeobj__476 __pyx_mstate_global->__pyx_codeobj__476
#define __pyx_codeobj__477 __pyx_mstate_global->__pyx_codeobj__477
#define __pyx_codeobj__479 __pyx_mstate_global->__pyx_codeobj__479
#define __pyx_codeobj__480 __pyx_mstate_global->__pyx_codeobj__480
#define __pyx_codeobj__482 __pyx_mstate_global->__pyx_codeobj__482
#define __pyx_codeobj__484 __pyx_mstate_global->__pyx_codeobj__484
#define __pyx_codeobj__485 __pyx_mstate_global->__pyx_codeobj__485
#define __pyx_codeobj__487 __pyx_mstate_global->__pyx_codeobj__487
#define __pyx_codeobj__489 __pyx_mstate_global->__pyx_codeobj__489
#define __pyx_codeobj__491 __pyx_mstate_global->__pyx_codeobj__491
#define __pyx_codeobj__492 __pyx_mstate_global->__pyx_codeobj__492
#define __pyx_codeobj__494 __pyx_mstate_global->__pyx_codeobj__494
#define __pyx_codeobj__496 __pyx_mstate_global->__pyx_codeobj__496
#define __pyx_codeobj__497 __pyx_mstate_global->__pyx_codeobj__497
#define __pyx_codeobj__499 __pyx_mstate_global->__pyx_codeobj__499
#define __pyx_codeobj__502 __pyx_mstate_global->__pyx_codeobj__502
#define __pyx_codeobj__503 __pyx_mstate_global->__pyx_codeobj__503
#define __pyx_codeobj__505 __pyx_mstate_global->__pyx_codeobj__505
#define __pyx_codeobj__506 __pyx_mstate_global->__pyx_codeobj__506
#define __pyx_codeobj__508 __pyx_mstate_global->__pyx_codeobj__508
#define __pyx_codeobj__509 __pyx_mstate_global->__pyx_codeobj__509
#define __pyx_codeobj__510 __pyx_mstate_global->__pyx_codeobj__510
#define __pyx_codeobj__512 __pyx_mstate_global->__pyx_codeobj__512
#define __pyx_codeobj__513 __pyx_mstate_global->__pyx_codeobj__513
#define __pyx_codeobj__514 __pyx_mstate_global->__pyx_codeobj__514
#define __pyx_codeobj__516 __pyx_mstate_global->__pyx_codeobj__516
#define __pyx_codeobj__518 __pyx_mstate_global->__pyx_codeobj__518
#define __pyx_codeobj__519 __pyx_mstate_global->__pyx_codeobj__519
#define __pyx_codeobj__521 __pyx_mstate_global->__pyx_codeobj__521
#define __pyx_codeobj__523 __pyx_mstate_global->__pyx_codeobj__523
#define __pyx_codeobj__525 __pyx_mstate_global->__pyx_codeobj__525
#define __pyx_codeobj__527 __pyx_mstate_global->__pyx_codeobj__527
#define __pyx_codeobj__528 __pyx_mstate_global->__pyx_codeobj__528
#define __pyx_codeobj__529 __pyx_mstate_global->__pyx_codeobj__529
#define __pyx_codeobj__531 __pyx_mstate_global->__pyx_codeobj__531
#define __pyx_codeobj__533 __pyx_mstate_global->__pyx_codeobj__533
#define __pyx_codeobj__535 __pyx_mstate_global->__pyx_codeobj__535
#define __pyx_codeobj__537 __pyx_mstate_global->__pyx_codeobj__537
#define __pyx_codeobj__539 __pyx_mstate_global->__pyx_codeobj__539
#define __pyx_codeobj__540 __pyx_mstate_global->__pyx_codeobj__540
#define __pyx_codeobj__541 __pyx_mstate_global->__pyx_codeobj__541
#define __pyx_codeobj__542 __pyx_mstate_global->__pyx_codeobj__542
#define __pyx_codeobj__543 __pyx_mstate_global->__pyx_codeobj__543
#define __pyx_codeobj__544 __pyx_mstate_global->__pyx_codeobj__544
#define __pyx_codeobj__545 __pyx_mstate_global->__pyx_codeobj__545
#define __pyx_codeobj__547 __pyx_mstate_global->__pyx_codeobj__547
#define __pyx_codeobj__549 __pyx_mstate_global->__pyx_codeobj__549
#define __pyx_codeobj__550 __pyx_mstate_global->__pyx_codeobj__550
#define __pyx_codeobj__551 __pyx_mstate_global->__pyx_codeobj__551
#define __pyx_codeobj__552 __pyx_mstate_global->__pyx_codeobj__552
#define __pyx_codeobj__554 __pyx_mstate_global->__pyx_codeobj__554
#define __pyx_codeobj__556 __pyx_mstate_global->__pyx_codeobj__556
#define __pyx_codeobj__558 __pyx_mstate_global->__pyx_codeobj__558
#define __pyx_codeobj__559 __pyx_mstate_global->__pyx_codeobj__559
#define __pyx_codeobj__561 __pyx_mstate_global->__pyx_codeobj__561
#define __pyx_codeobj__563 __pyx_mstate_global->__pyx_codeobj__563
#define __pyx_codeobj__564 __pyx_mstate_global->__pyx_codeobj__564
#define __pyx_codeobj__566 __pyx_mstate_global->__pyx_codeobj__566
#define __pyx_codeobj__568 __pyx_mstate_global->__pyx_codeobj__568
#define __pyx_codeobj__569 __pyx_mstate_global->__pyx_codeobj__569
#define __pyx_codeobj__570 __pyx_mstate_global->__pyx_codeobj__570
#define __pyx_codeobj__572 __pyx_mstate_global->__pyx_codeobj__572
#define __pyx_codeobj__574 __pyx_mstate_global->__pyx_codeobj__574
#define __pyx_codeobj__576 __pyx_mstate_global->__pyx_codeobj__576
#define __pyx_codeobj__577 __pyx_mstate_global->__pyx_codeobj__577
#define __pyx_codeobj__579 __pyx_mstate_global->__pyx_codeobj__579
#define __pyx_codeobj__580 __pyx_mstate_global->__pyx_codeobj__580
#define __pyx_codeobj__581 __pyx_mstate_global->__pyx_codeobj__581
#define __pyx_codeobj__583 __pyx_mstate_global->__pyx_codeobj__583
#define __pyx_codeobj__585 __pyx_mstate_global->__pyx_codeobj__585
#define __pyx_codeobj__586 __pyx_mstate_global->__pyx_codeobj__586
#define __pyx_codeobj__587 __pyx_mstate_global->__pyx_codeobj__587
#define __pyx_codeobj__588 __pyx_mstate_global->__pyx_codeobj__588
#define __pyx_codeobj__589 __pyx_mstate_global->__pyx_codeobj__589
#define __pyx_codeobj__591 __pyx_mstate_global->__pyx_codeobj__591
#define __pyx_codeobj__593 __pyx_mstate_global->__pyx_codeobj__593
#define __pyx_codeobj__594 __pyx_mstate_global->__pyx_codeobj__594
#define __pyx_codeobj__595 __pyx_mstate_global->__pyx_codeobj__595
#define __pyx_codeobj__596 __pyx_mstate_global->__pyx_codeobj__596
#define __pyx_codeobj__598 __pyx_mstate_global->__pyx_codeobj__598
#define __pyx_codeobj__600 __pyx_mstate_global->__pyx_codeobj__600
#define __pyx_codeobj__601 __pyx_mstate_global->__pyx_codeobj__601
#define __pyx_codeobj__603 __pyx_mstate_global->__pyx_codeobj__603
#define __pyx_codeobj__604 __pyx_mstate_global->__pyx_codeobj__604
#define __pyx_codeobj__606 __pyx_mstate_global->__pyx_codeobj__606
#define __pyx_codeobj__608 __pyx_mstate_global->__pyx_codeobj__608
#define __pyx_codeobj__611 __pyx_mstate_global->__pyx_codeobj__611
#define __pyx_codeobj__613 __pyx_mstate_global->__pyx_codeobj__613
#define __pyx_codeobj__615 __pyx_mstate_global->__pyx_codeobj__615
#define __pyx_codeobj__617 __pyx_mstate_global->__pyx_codeobj__617
#define __pyx_codeobj__619 __pyx_mstate_global->__pyx_codeobj__619
#define __pyx_codeobj__620 __pyx_mstate_global->__pyx_codeobj__620
#define __pyx_codeobj__621 __pyx_mstate_global->__pyx_codeobj__621
#define __pyx_codeobj__623 __pyx_mstate_global->__pyx_codeobj__623
#define __pyx_codeobj__624 __pyx_mstate_global->__pyx_codeobj__624
#define __pyx_codeobj__625 __pyx_mstate_global->__pyx_codeobj__625
#define __pyx_codeobj__626 __pyx_mstate_global->__pyx_codeobj__626
#define __pyx_codeobj__628 __pyx_mstate_global->__pyx_codeobj__628
#define __pyx_codeobj__629 __pyx_mstate_global->__pyx_codeobj__629
/* #### Code section: module_code ### */

/* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(Header c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(enum __pyx_t_8pysndlib_6sndlib_Header __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py", 1);

  /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Header as __pyx_enum
 *     except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "EnumTypeToPy":138
 * 
 *     try:
 *         from pysndlib.sndlib import Header as __pyx_enum             # <<<<<<<<<<<<<<
 *     except ImportError:
 *         import warnings
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_Header);
      __Pyx_GIVEREF(__pyx_n_s_Header);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Header)) __PYX_ERR(1, 138, __pyx_L3_error);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_pysndlib_sndlib, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_Header); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v___pyx_enum = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Header as __pyx_enum
 *     except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "EnumTypeToPy":139
 *     try:
 *         from pysndlib.sndlib import Header as __pyx_enum
 *     except ImportError:             # <<<<<<<<<<<<<<
 *         import warnings
 *         warnings.warn(
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 139, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "EnumTypeToPy":140
 *         from pysndlib.sndlib import Header as __pyx_enum
 *     except ImportError:
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             f"enum class Header not importable from pysndlib.sndlib. "
 */
      __pyx_t_8 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 140, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_warnings = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "EnumTypeToPy":141
 *     except ImportError:
 *         import warnings
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"enum class Header not importable from pysndlib.sndlib. "
 *             "You are probably using a cpdef enum declared in a .pxd file that "
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 141, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_u_enum_class_Header_not_importable};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 141, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":145
 *             "You are probably using a cpdef enum declared in a .pxd file that "
 *             "does not have a .py  or .pyx file.")
 *         return <int>c_val             # <<<<<<<<<<<<<<
 * 
 *     if 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyInt_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 145, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Header as __pyx_enum
 *     except ImportError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "EnumTypeToPy":147
 *         return <int>c_val
 * 
 *     if 0:             # <<<<<<<<<<<<<<
 *         pass
 *     elif c_val == Header.UNKNOWN_HEADER:
 */
  switch (__pyx_v_c_val) {
    case __pyx_e_8pysndlib_6sndlib_UNKNOWN_HEADER:

    /* "EnumTypeToPy":150
 *         pass
 *     elif c_val == Header.UNKNOWN_HEADER:
 *         return __pyx_enum.UNKNOWN_HEADER             # <<<<<<<<<<<<<<
 *     elif c_val == Header.NEXT:
 *         return __pyx_enum.NEXT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_UNKNOWN_HEADER); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":149
 *     if 0:
 *         pass
 *     elif c_val == Header.UNKNOWN_HEADER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.UNKNOWN_HEADER
 *     elif c_val == Header.NEXT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_NEXT:

    /* "EnumTypeToPy":152
 *         return __pyx_enum.UNKNOWN_HEADER
 *     elif c_val == Header.NEXT:
 *         return __pyx_enum.NEXT             # <<<<<<<<<<<<<<
 *     elif c_val == Header.AIFC:
 *         return __pyx_enum.AIFC
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NEXT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":151
 *     elif c_val == Header.UNKNOWN_HEADER:
 *         return __pyx_enum.UNKNOWN_HEADER
 *     elif c_val == Header.NEXT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NEXT
 *     elif c_val == Header.AIFC:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_AIFC:

    /* "EnumTypeToPy":154
 *         return __pyx_enum.NEXT
 *     elif c_val == Header.AIFC:
 *         return __pyx_enum.AIFC             # <<<<<<<<<<<<<<
 *     elif c_val == Header.RIFF:
 *         return __pyx_enum.RIFF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_AIFC); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":153
 *     elif c_val == Header.NEXT:
 *         return __pyx_enum.NEXT
 *     elif c_val == Header.AIFC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.AIFC
 *     elif c_val == Header.RIFF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_RIFF:

    /* "EnumTypeToPy":156
 *         return __pyx_enum.AIFC
 *     elif c_val == Header.RIFF:
 *         return __pyx_enum.RIFF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.RF64:
 *         return __pyx_enum.RF64
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_RIFF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":155
 *     elif c_val == Header.AIFC:
 *         return __pyx_enum.AIFC
 *     elif c_val == Header.RIFF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.RIFF
 *     elif c_val == Header.RF64:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_RF64:

    /* "EnumTypeToPy":158
 *         return __pyx_enum.RIFF
 *     elif c_val == Header.RF64:
 *         return __pyx_enum.RF64             # <<<<<<<<<<<<<<
 *     elif c_val == Header.BICSF:
 *         return __pyx_enum.BICSF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_RF64); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":157
 *     elif c_val == Header.RIFF:
 *         return __pyx_enum.RIFF
 *     elif c_val == Header.RF64:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.RF64
 *     elif c_val == Header.BICSF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BICSF:

    /* "EnumTypeToPy":160
 *         return __pyx_enum.RF64
 *     elif c_val == Header.BICSF:
 *         return __pyx_enum.BICSF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.NIST:
 *         return __pyx_enum.NIST
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BICSF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":159
 *     elif c_val == Header.RF64:
 *         return __pyx_enum.RF64
 *     elif c_val == Header.BICSF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BICSF
 *     elif c_val == Header.NIST:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_NIST:

    /* "EnumTypeToPy":162
 *         return __pyx_enum.BICSF
 *     elif c_val == Header.NIST:
 *         return __pyx_enum.NIST             # <<<<<<<<<<<<<<
 *     elif c_val == Header.INRS:
 *         return __pyx_enum.INRS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":161
 *     elif c_val == Header.BICSF:
 *         return __pyx_enum.BICSF
 *     elif c_val == Header.NIST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NIST
 *     elif c_val == Header.INRS:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_INRS:

    /* "EnumTypeToPy":164
 *         return __pyx_enum.NIST
 *     elif c_val == Header.INRS:
 *         return __pyx_enum.INRS             # <<<<<<<<<<<<<<
 *     elif c_val == Header.ESPS:
 *         return __pyx_enum.ESPS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_INRS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":163
 *     elif c_val == Header.NIST:
 *         return __pyx_enum.NIST
 *     elif c_val == Header.INRS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.INRS
 *     elif c_val == Header.ESPS:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ESPS:

    /* "EnumTypeToPy":166
 *         return __pyx_enum.INRS
 *     elif c_val == Header.ESPS:
 *         return __pyx_enum.ESPS             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SVX:
 *         return __pyx_enum.SVX
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ESPS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":165
 *     elif c_val == Header.INRS:
 *         return __pyx_enum.INRS
 *     elif c_val == Header.ESPS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ESPS
 *     elif c_val == Header.SVX:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SVX:

    /* "EnumTypeToPy":168
 *         return __pyx_enum.ESPS
 *     elif c_val == Header.SVX:
 *         return __pyx_enum.SVX             # <<<<<<<<<<<<<<
 *     elif c_val == Header.VOC:
 *         return __pyx_enum.VOC
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SVX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":167
 *     elif c_val == Header.ESPS:
 *         return __pyx_enum.ESPS
 *     elif c_val == Header.SVX:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SVX
 *     elif c_val == Header.VOC:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_VOC:

    /* "EnumTypeToPy":170
 *         return __pyx_enum.SVX
 *     elif c_val == Header.VOC:
 *         return __pyx_enum.VOC             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SNDT:
 *         return __pyx_enum.SNDT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_VOC); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":169
 *     elif c_val == Header.SVX:
 *         return __pyx_enum.SVX
 *     elif c_val == Header.VOC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.VOC
 *     elif c_val == Header.SNDT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SNDT:

    /* "EnumTypeToPy":172
 *         return __pyx_enum.VOC
 *     elif c_val == Header.SNDT:
 *         return __pyx_enum.SNDT             # <<<<<<<<<<<<<<
 *     elif c_val == Header.RAW:
 *         return __pyx_enum.RAW
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SNDT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":171
 *     elif c_val == Header.VOC:
 *         return __pyx_enum.VOC
 *     elif c_val == Header.SNDT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SNDT
 *     elif c_val == Header.RAW:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_RAW:

    /* "EnumTypeToPy":174
 *         return __pyx_enum.SNDT
 *     elif c_val == Header.RAW:
 *         return __pyx_enum.RAW             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SMP:
 *         return __pyx_enum.SMP
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_RAW); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":173
 *     elif c_val == Header.SNDT:
 *         return __pyx_enum.SNDT
 *     elif c_val == Header.RAW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.RAW
 *     elif c_val == Header.SMP:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SMP:

    /* "EnumTypeToPy":176
 *         return __pyx_enum.RAW
 *     elif c_val == Header.SMP:
 *         return __pyx_enum.SMP             # <<<<<<<<<<<<<<
 *     elif c_val == Header.AVR:
 *         return __pyx_enum.AVR
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":175
 *     elif c_val == Header.RAW:
 *         return __pyx_enum.RAW
 *     elif c_val == Header.SMP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SMP
 *     elif c_val == Header.AVR:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_AVR:

    /* "EnumTypeToPy":178
 *         return __pyx_enum.SMP
 *     elif c_val == Header.AVR:
 *         return __pyx_enum.AVR             # <<<<<<<<<<<<<<
 *     elif c_val == Header.IRCAM:
 *         return __pyx_enum.IRCAM
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_AVR); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":177
 *     elif c_val == Header.SMP:
 *         return __pyx_enum.SMP
 *     elif c_val == Header.AVR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.AVR
 *     elif c_val == Header.IRCAM:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_IRCAM:

    /* "EnumTypeToPy":180
 *         return __pyx_enum.AVR
 *     elif c_val == Header.IRCAM:
 *         return __pyx_enum.IRCAM             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SD1:
 *         return __pyx_enum.SD1
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_IRCAM); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":179
 *     elif c_val == Header.AVR:
 *         return __pyx_enum.AVR
 *     elif c_val == Header.IRCAM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IRCAM
 *     elif c_val == Header.SD1:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SD1:

    /* "EnumTypeToPy":182
 *         return __pyx_enum.IRCAM
 *     elif c_val == Header.SD1:
 *         return __pyx_enum.SD1             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SPPACK:
 *         return __pyx_enum.SPPACK
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SD1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":181
 *     elif c_val == Header.IRCAM:
 *         return __pyx_enum.IRCAM
 *     elif c_val == Header.SD1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SD1
 *     elif c_val == Header.SPPACK:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SPPACK:

    /* "EnumTypeToPy":184
 *         return __pyx_enum.SD1
 *     elif c_val == Header.SPPACK:
 *         return __pyx_enum.SPPACK             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MUS10:
 *         return __pyx_enum.MUS10
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SPPACK); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":183
 *     elif c_val == Header.SD1:
 *         return __pyx_enum.SD1
 *     elif c_val == Header.SPPACK:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SPPACK
 *     elif c_val == Header.MUS10:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MUS10:

    /* "EnumTypeToPy":186
 *         return __pyx_enum.SPPACK
 *     elif c_val == Header.MUS10:
 *         return __pyx_enum.MUS10             # <<<<<<<<<<<<<<
 *     elif c_val == Header.HCOM:
 *         return __pyx_enum.HCOM
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MUS10); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":185
 *     elif c_val == Header.SPPACK:
 *         return __pyx_enum.SPPACK
 *     elif c_val == Header.MUS10:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MUS10
 *     elif c_val == Header.HCOM:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_HCOM:

    /* "EnumTypeToPy":188
 *         return __pyx_enum.MUS10
 *     elif c_val == Header.HCOM:
 *         return __pyx_enum.HCOM             # <<<<<<<<<<<<<<
 *     elif c_val == Header.PSION:
 *         return __pyx_enum.PSION
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_HCOM); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":187
 *     elif c_val == Header.MUS10:
 *         return __pyx_enum.MUS10
 *     elif c_val == Header.HCOM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.HCOM
 *     elif c_val == Header.PSION:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_PSION:

    /* "EnumTypeToPy":190
 *         return __pyx_enum.HCOM
 *     elif c_val == Header.PSION:
 *         return __pyx_enum.PSION             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MAUD:
 *         return __pyx_enum.MAUD
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_PSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":189
 *     elif c_val == Header.HCOM:
 *         return __pyx_enum.HCOM
 *     elif c_val == Header.PSION:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.PSION
 *     elif c_val == Header.MAUD:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MAUD:

    /* "EnumTypeToPy":192
 *         return __pyx_enum.PSION
 *     elif c_val == Header.MAUD:
 *         return __pyx_enum.MAUD             # <<<<<<<<<<<<<<
 *     elif c_val == Header.IEEE:
 *         return __pyx_enum.IEEE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MAUD); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":191
 *     elif c_val == Header.PSION:
 *         return __pyx_enum.PSION
 *     elif c_val == Header.MAUD:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MAUD
 *     elif c_val == Header.IEEE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_IEEE:

    /* "EnumTypeToPy":194
 *         return __pyx_enum.MAUD
 *     elif c_val == Header.IEEE:
 *         return __pyx_enum.IEEE             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MATLAB:
 *         return __pyx_enum.MATLAB
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_IEEE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":193
 *     elif c_val == Header.MAUD:
 *         return __pyx_enum.MAUD
 *     elif c_val == Header.IEEE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IEEE
 *     elif c_val == Header.MATLAB:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MATLAB:

    /* "EnumTypeToPy":196
 *         return __pyx_enum.IEEE
 *     elif c_val == Header.MATLAB:
 *         return __pyx_enum.MATLAB             # <<<<<<<<<<<<<<
 *     elif c_val == Header.ADC:
 *         return __pyx_enum.ADC
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MATLAB); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":195
 *     elif c_val == Header.IEEE:
 *         return __pyx_enum.IEEE
 *     elif c_val == Header.MATLAB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MATLAB
 *     elif c_val == Header.ADC:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ADC:

    /* "EnumTypeToPy":198
 *         return __pyx_enum.MATLAB
 *     elif c_val == Header.ADC:
 *         return __pyx_enum.ADC             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MIDI:
 *         return __pyx_enum.MIDI
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ADC); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":197
 *     elif c_val == Header.MATLAB:
 *         return __pyx_enum.MATLAB
 *     elif c_val == Header.ADC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ADC
 *     elif c_val == Header.MIDI:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MIDI:

    /* "EnumTypeToPy":200
 *         return __pyx_enum.ADC
 *     elif c_val == Header.MIDI:
 *         return __pyx_enum.MIDI             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SOUNDFONT:
 *         return __pyx_enum.SOUNDFONT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MIDI); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":199
 *     elif c_val == Header.ADC:
 *         return __pyx_enum.ADC
 *     elif c_val == Header.MIDI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MIDI
 *     elif c_val == Header.SOUNDFONT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SOUNDFONT:

    /* "EnumTypeToPy":202
 *         return __pyx_enum.MIDI
 *     elif c_val == Header.SOUNDFONT:
 *         return __pyx_enum.SOUNDFONT             # <<<<<<<<<<<<<<
 *     elif c_val == Header.GRAVIS:
 *         return __pyx_enum.GRAVIS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SOUNDFONT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":201
 *     elif c_val == Header.MIDI:
 *         return __pyx_enum.MIDI
 *     elif c_val == Header.SOUNDFONT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SOUNDFONT
 *     elif c_val == Header.GRAVIS:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_GRAVIS:

    /* "EnumTypeToPy":204
 *         return __pyx_enum.SOUNDFONT
 *     elif c_val == Header.GRAVIS:
 *         return __pyx_enum.GRAVIS             # <<<<<<<<<<<<<<
 *     elif c_val == Header.COMDISCO:
 *         return __pyx_enum.COMDISCO
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_GRAVIS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":203
 *     elif c_val == Header.SOUNDFONT:
 *         return __pyx_enum.SOUNDFONT
 *     elif c_val == Header.GRAVIS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.GRAVIS
 *     elif c_val == Header.COMDISCO:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_COMDISCO:

    /* "EnumTypeToPy":206
 *         return __pyx_enum.GRAVIS
 *     elif c_val == Header.COMDISCO:
 *         return __pyx_enum.COMDISCO             # <<<<<<<<<<<<<<
 *     elif c_val == Header.GOLDWAVE:
 *         return __pyx_enum.GOLDWAVE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_COMDISCO); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":205
 *     elif c_val == Header.GRAVIS:
 *         return __pyx_enum.GRAVIS
 *     elif c_val == Header.COMDISCO:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.COMDISCO
 *     elif c_val == Header.GOLDWAVE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_GOLDWAVE:

    /* "EnumTypeToPy":208
 *         return __pyx_enum.COMDISCO
 *     elif c_val == Header.GOLDWAVE:
 *         return __pyx_enum.GOLDWAVE             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SRFS:
 *         return __pyx_enum.SRFS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_GOLDWAVE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":207
 *     elif c_val == Header.COMDISCO:
 *         return __pyx_enum.COMDISCO
 *     elif c_val == Header.GOLDWAVE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.GOLDWAVE
 *     elif c_val == Header.SRFS:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SRFS:

    /* "EnumTypeToPy":210
 *         return __pyx_enum.GOLDWAVE
 *     elif c_val == Header.SRFS:
 *         return __pyx_enum.SRFS             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MIDI_SAMPLE_DUMP:
 *         return __pyx_enum.MIDI_SAMPLE_DUMP
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SRFS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":209
 *     elif c_val == Header.GOLDWAVE:
 *         return __pyx_enum.GOLDWAVE
 *     elif c_val == Header.SRFS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SRFS
 *     elif c_val == Header.MIDI_SAMPLE_DUMP:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MIDI_SAMPLE_DUMP:

    /* "EnumTypeToPy":212
 *         return __pyx_enum.SRFS
 *     elif c_val == Header.MIDI_SAMPLE_DUMP:
 *         return __pyx_enum.MIDI_SAMPLE_DUMP             # <<<<<<<<<<<<<<
 *     elif c_val == Header.DIAMONDWARE:
 *         return __pyx_enum.DIAMONDWARE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MIDI_SAMPLE_DUMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":211
 *     elif c_val == Header.SRFS:
 *         return __pyx_enum.SRFS
 *     elif c_val == Header.MIDI_SAMPLE_DUMP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MIDI_SAMPLE_DUMP
 *     elif c_val == Header.DIAMONDWARE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_DIAMONDWARE:

    /* "EnumTypeToPy":214
 *         return __pyx_enum.MIDI_SAMPLE_DUMP
 *     elif c_val == Header.DIAMONDWARE:
 *         return __pyx_enum.DIAMONDWARE             # <<<<<<<<<<<<<<
 *     elif c_val == Header.ADF:
 *         return __pyx_enum.ADF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_DIAMONDWARE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":213
 *     elif c_val == Header.MIDI_SAMPLE_DUMP:
 *         return __pyx_enum.MIDI_SAMPLE_DUMP
 *     elif c_val == Header.DIAMONDWARE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.DIAMONDWARE
 *     elif c_val == Header.ADF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ADF:

    /* "EnumTypeToPy":216
 *         return __pyx_enum.DIAMONDWARE
 *     elif c_val == Header.ADF:
 *         return __pyx_enum.ADF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SBSTUDIOII:
 *         return __pyx_enum.SBSTUDIOII
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ADF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":215
 *     elif c_val == Header.DIAMONDWARE:
 *         return __pyx_enum.DIAMONDWARE
 *     elif c_val == Header.ADF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ADF
 *     elif c_val == Header.SBSTUDIOII:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SBSTUDIOII:

    /* "EnumTypeToPy":218
 *         return __pyx_enum.ADF
 *     elif c_val == Header.SBSTUDIOII:
 *         return __pyx_enum.SBSTUDIOII             # <<<<<<<<<<<<<<
 *     elif c_val == Header.DELUSION:
 *         return __pyx_enum.DELUSION
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SBSTUDIOII); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":217
 *     elif c_val == Header.ADF:
 *         return __pyx_enum.ADF
 *     elif c_val == Header.SBSTUDIOII:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SBSTUDIOII
 *     elif c_val == Header.DELUSION:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_DELUSION:

    /* "EnumTypeToPy":220
 *         return __pyx_enum.SBSTUDIOII
 *     elif c_val == Header.DELUSION:
 *         return __pyx_enum.DELUSION             # <<<<<<<<<<<<<<
 *     elif c_val == Header.FARANDOLE:
 *         return __pyx_enum.FARANDOLE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_DELUSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":219
 *     elif c_val == Header.SBSTUDIOII:
 *         return __pyx_enum.SBSTUDIOII
 *     elif c_val == Header.DELUSION:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.DELUSION
 *     elif c_val == Header.FARANDOLE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_FARANDOLE:

    /* "EnumTypeToPy":222
 *         return __pyx_enum.DELUSION
 *     elif c_val == Header.FARANDOLE:
 *         return __pyx_enum.FARANDOLE             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SAMPLE_DUMP:
 *         return __pyx_enum.SAMPLE_DUMP
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_FARANDOLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":221
 *     elif c_val == Header.DELUSION:
 *         return __pyx_enum.DELUSION
 *     elif c_val == Header.FARANDOLE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.FARANDOLE
 *     elif c_val == Header.SAMPLE_DUMP:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SAMPLE_DUMP:

    /* "EnumTypeToPy":224
 *         return __pyx_enum.FARANDOLE
 *     elif c_val == Header.SAMPLE_DUMP:
 *         return __pyx_enum.SAMPLE_DUMP             # <<<<<<<<<<<<<<
 *     elif c_val == Header.ULTRATRACKER:
 *         return __pyx_enum.ULTRATRACKER
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SAMPLE_DUMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":223
 *     elif c_val == Header.FARANDOLE:
 *         return __pyx_enum.FARANDOLE
 *     elif c_val == Header.SAMPLE_DUMP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SAMPLE_DUMP
 *     elif c_val == Header.ULTRATRACKER:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ULTRATRACKER:

    /* "EnumTypeToPy":226
 *         return __pyx_enum.SAMPLE_DUMP
 *     elif c_val == Header.ULTRATRACKER:
 *         return __pyx_enum.ULTRATRACKER             # <<<<<<<<<<<<<<
 *     elif c_val == Header.YAMAHA_SY85:
 *         return __pyx_enum.YAMAHA_SY85
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ULTRATRACKER); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":225
 *     elif c_val == Header.SAMPLE_DUMP:
 *         return __pyx_enum.SAMPLE_DUMP
 *     elif c_val == Header.ULTRATRACKER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ULTRATRACKER
 *     elif c_val == Header.YAMAHA_SY85:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_YAMAHA_SY85:

    /* "EnumTypeToPy":228
 *         return __pyx_enum.ULTRATRACKER
 *     elif c_val == Header.YAMAHA_SY85:
 *         return __pyx_enum.YAMAHA_SY85             # <<<<<<<<<<<<<<
 *     elif c_val == Header.YAMAHA_TX16W:
 *         return __pyx_enum.YAMAHA_TX16W
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_YAMAHA_SY85); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":227
 *     elif c_val == Header.ULTRATRACKER:
 *         return __pyx_enum.ULTRATRACKER
 *     elif c_val == Header.YAMAHA_SY85:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.YAMAHA_SY85
 *     elif c_val == Header.YAMAHA_TX16W:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_YAMAHA_TX16W:

    /* "EnumTypeToPy":230
 *         return __pyx_enum.YAMAHA_SY85
 *     elif c_val == Header.YAMAHA_TX16W:
 *         return __pyx_enum.YAMAHA_TX16W             # <<<<<<<<<<<<<<
 *     elif c_val == Header.DIGIPLAYER:
 *         return __pyx_enum.DIGIPLAYER
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_YAMAHA_TX16W); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":229
 *     elif c_val == Header.YAMAHA_SY85:
 *         return __pyx_enum.YAMAHA_SY85
 *     elif c_val == Header.YAMAHA_TX16W:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.YAMAHA_TX16W
 *     elif c_val == Header.DIGIPLAYER:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_DIGIPLAYER:

    /* "EnumTypeToPy":232
 *         return __pyx_enum.YAMAHA_TX16W
 *     elif c_val == Header.DIGIPLAYER:
 *         return __pyx_enum.DIGIPLAYER             # <<<<<<<<<<<<<<
 *     elif c_val == Header.COVOX:
 *         return __pyx_enum.COVOX
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_DIGIPLAYER); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":231
 *     elif c_val == Header.YAMAHA_TX16W:
 *         return __pyx_enum.YAMAHA_TX16W
 *     elif c_val == Header.DIGIPLAYER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.DIGIPLAYER
 *     elif c_val == Header.COVOX:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_COVOX:

    /* "EnumTypeToPy":234
 *         return __pyx_enum.DIGIPLAYER
 *     elif c_val == Header.COVOX:
 *         return __pyx_enum.COVOX             # <<<<<<<<<<<<<<
 *     elif c_val == Header.AVI:
 *         return __pyx_enum.AVI
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_COVOX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":233
 *     elif c_val == Header.DIGIPLAYER:
 *         return __pyx_enum.DIGIPLAYER
 *     elif c_val == Header.COVOX:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.COVOX
 *     elif c_val == Header.AVI:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_AVI:

    /* "EnumTypeToPy":236
 *         return __pyx_enum.COVOX
 *     elif c_val == Header.AVI:
 *         return __pyx_enum.AVI             # <<<<<<<<<<<<<<
 *     elif c_val == Header.OMF:
 *         return __pyx_enum.OMF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_AVI); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":235
 *     elif c_val == Header.COVOX:
 *         return __pyx_enum.COVOX
 *     elif c_val == Header.AVI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.AVI
 *     elif c_val == Header.OMF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_OMF:

    /* "EnumTypeToPy":238
 *         return __pyx_enum.AVI
 *     elif c_val == Header.OMF:
 *         return __pyx_enum.OMF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.QUICKTIME:
 *         return __pyx_enum.QUICKTIME
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_OMF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":237
 *     elif c_val == Header.AVI:
 *         return __pyx_enum.AVI
 *     elif c_val == Header.OMF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.OMF
 *     elif c_val == Header.QUICKTIME:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_QUICKTIME:

    /* "EnumTypeToPy":240
 *         return __pyx_enum.OMF
 *     elif c_val == Header.QUICKTIME:
 *         return __pyx_enum.QUICKTIME             # <<<<<<<<<<<<<<
 *     elif c_val == Header.ASF:
 *         return __pyx_enum.ASF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_QUICKTIME); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":239
 *     elif c_val == Header.OMF:
 *         return __pyx_enum.OMF
 *     elif c_val == Header.QUICKTIME:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.QUICKTIME
 *     elif c_val == Header.ASF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ASF:

    /* "EnumTypeToPy":242
 *         return __pyx_enum.QUICKTIME
 *     elif c_val == Header.ASF:
 *         return __pyx_enum.ASF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.YAMAHA_SY99:
 *         return __pyx_enum.YAMAHA_SY99
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ASF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":241
 *     elif c_val == Header.QUICKTIME:
 *         return __pyx_enum.QUICKTIME
 *     elif c_val == Header.ASF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ASF
 *     elif c_val == Header.YAMAHA_SY99:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_YAMAHA_SY99:

    /* "EnumTypeToPy":244
 *         return __pyx_enum.ASF
 *     elif c_val == Header.YAMAHA_SY99:
 *         return __pyx_enum.YAMAHA_SY99             # <<<<<<<<<<<<<<
 *     elif c_val == Header.KURZWEIL_2000:
 *         return __pyx_enum.KURZWEIL_2000
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_YAMAHA_SY99); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":243
 *     elif c_val == Header.ASF:
 *         return __pyx_enum.ASF
 *     elif c_val == Header.YAMAHA_SY99:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.YAMAHA_SY99
 *     elif c_val == Header.KURZWEIL_2000:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_KURZWEIL_2000:

    /* "EnumTypeToPy":246
 *         return __pyx_enum.YAMAHA_SY99
 *     elif c_val == Header.KURZWEIL_2000:
 *         return __pyx_enum.KURZWEIL_2000             # <<<<<<<<<<<<<<
 *     elif c_val == Header.AIFF:
 *         return __pyx_enum.AIFF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_KURZWEIL_2000); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":245
 *     elif c_val == Header.YAMAHA_SY99:
 *         return __pyx_enum.YAMAHA_SY99
 *     elif c_val == Header.KURZWEIL_2000:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.KURZWEIL_2000
 *     elif c_val == Header.AIFF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_AIFF:

    /* "EnumTypeToPy":248
 *         return __pyx_enum.KURZWEIL_2000
 *     elif c_val == Header.AIFF:
 *         return __pyx_enum.AIFF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.PAF:
 *         return __pyx_enum.PAF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_AIFF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":247
 *     elif c_val == Header.KURZWEIL_2000:
 *         return __pyx_enum.KURZWEIL_2000
 *     elif c_val == Header.AIFF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.AIFF
 *     elif c_val == Header.PAF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_PAF:

    /* "EnumTypeToPy":250
 *         return __pyx_enum.AIFF
 *     elif c_val == Header.PAF:
 *         return __pyx_enum.PAF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.CSL:
 *         return __pyx_enum.CSL
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_PAF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":249
 *     elif c_val == Header.AIFF:
 *         return __pyx_enum.AIFF
 *     elif c_val == Header.PAF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.PAF
 *     elif c_val == Header.CSL:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_CSL:

    /* "EnumTypeToPy":252
 *         return __pyx_enum.PAF
 *     elif c_val == Header.CSL:
 *         return __pyx_enum.CSL             # <<<<<<<<<<<<<<
 *     elif c_val == Header.FILE_SAMP:
 *         return __pyx_enum.FILE_SAMP
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_CSL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":251
 *     elif c_val == Header.PAF:
 *         return __pyx_enum.PAF
 *     elif c_val == Header.CSL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CSL
 *     elif c_val == Header.FILE_SAMP:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_FILE_SAMP:

    /* "EnumTypeToPy":254
 *         return __pyx_enum.CSL
 *     elif c_val == Header.FILE_SAMP:
 *         return __pyx_enum.FILE_SAMP             # <<<<<<<<<<<<<<
 *     elif c_val == Header.PVF:
 *         return __pyx_enum.PVF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_FILE_SAMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":253
 *     elif c_val == Header.CSL:
 *         return __pyx_enum.CSL
 *     elif c_val == Header.FILE_SAMP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.FILE_SAMP
 *     elif c_val == Header.PVF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_PVF:

    /* "EnumTypeToPy":256
 *         return __pyx_enum.FILE_SAMP
 *     elif c_val == Header.PVF:
 *         return __pyx_enum.PVF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SOUNDFORGE:
 *         return __pyx_enum.SOUNDFORGE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_PVF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":255
 *     elif c_val == Header.FILE_SAMP:
 *         return __pyx_enum.FILE_SAMP
 *     elif c_val == Header.PVF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.PVF
 *     elif c_val == Header.SOUNDFORGE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SOUNDFORGE:

    /* "EnumTypeToPy":258
 *         return __pyx_enum.PVF
 *     elif c_val == Header.SOUNDFORGE:
 *         return __pyx_enum.SOUNDFORGE             # <<<<<<<<<<<<<<
 *     elif c_val == Header.TWINVQ:
 *         return __pyx_enum.TWINVQ
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SOUNDFORGE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":257
 *     elif c_val == Header.PVF:
 *         return __pyx_enum.PVF
 *     elif c_val == Header.SOUNDFORGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SOUNDFORGE
 *     elif c_val == Header.TWINVQ:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_TWINVQ:

    /* "EnumTypeToPy":260
 *         return __pyx_enum.SOUNDFORGE
 *     elif c_val == Header.TWINVQ:
 *         return __pyx_enum.TWINVQ             # <<<<<<<<<<<<<<
 *     elif c_val == Header.AKAI4:
 *         return __pyx_enum.AKAI4
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_TWINVQ); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":259
 *     elif c_val == Header.SOUNDFORGE:
 *         return __pyx_enum.SOUNDFORGE
 *     elif c_val == Header.TWINVQ:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.TWINVQ
 *     elif c_val == Header.AKAI4:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_AKAI4:

    /* "EnumTypeToPy":262
 *         return __pyx_enum.TWINVQ
 *     elif c_val == Header.AKAI4:
 *         return __pyx_enum.AKAI4             # <<<<<<<<<<<<<<
 *     elif c_val == Header.IMPULSETRACKER:
 *         return __pyx_enum.IMPULSETRACKER
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_AKAI4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":261
 *     elif c_val == Header.TWINVQ:
 *         return __pyx_enum.TWINVQ
 *     elif c_val == Header.AKAI4:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.AKAI4
 *     elif c_val == Header.IMPULSETRACKER:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_IMPULSETRACKER:

    /* "EnumTypeToPy":264
 *         return __pyx_enum.AKAI4
 *     elif c_val == Header.IMPULSETRACKER:
 *         return __pyx_enum.IMPULSETRACKER             # <<<<<<<<<<<<<<
 *     elif c_val == Header.KORG:
 *         return __pyx_enum.KORG
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_IMPULSETRACKER); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":263
 *     elif c_val == Header.AKAI4:
 *         return __pyx_enum.AKAI4
 *     elif c_val == Header.IMPULSETRACKER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IMPULSETRACKER
 *     elif c_val == Header.KORG:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_KORG:

    /* "EnumTypeToPy":266
 *         return __pyx_enum.IMPULSETRACKER
 *     elif c_val == Header.KORG:
 *         return __pyx_enum.KORG             # <<<<<<<<<<<<<<
 *     elif c_val == Header.NVF:
 *         return __pyx_enum.NVF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_KORG); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":265
 *     elif c_val == Header.IMPULSETRACKER:
 *         return __pyx_enum.IMPULSETRACKER
 *     elif c_val == Header.KORG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.KORG
 *     elif c_val == Header.NVF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_NVF:

    /* "EnumTypeToPy":268
 *         return __pyx_enum.KORG
 *     elif c_val == Header.NVF:
 *         return __pyx_enum.NVF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.CAFF:
 *         return __pyx_enum.CAFF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NVF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":267
 *     elif c_val == Header.KORG:
 *         return __pyx_enum.KORG
 *     elif c_val == Header.NVF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NVF
 *     elif c_val == Header.CAFF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_CAFF:

    /* "EnumTypeToPy":270
 *         return __pyx_enum.NVF
 *     elif c_val == Header.CAFF:
 *         return __pyx_enum.CAFF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MAUI:
 *         return __pyx_enum.MAUI
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_CAFF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":269
 *     elif c_val == Header.NVF:
 *         return __pyx_enum.NVF
 *     elif c_val == Header.CAFF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CAFF
 *     elif c_val == Header.MAUI:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MAUI:

    /* "EnumTypeToPy":272
 *         return __pyx_enum.CAFF
 *     elif c_val == Header.MAUI:
 *         return __pyx_enum.MAUI             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SDIF:
 *         return __pyx_enum.SDIF
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MAUI); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":271
 *     elif c_val == Header.CAFF:
 *         return __pyx_enum.CAFF
 *     elif c_val == Header.MAUI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MAUI
 *     elif c_val == Header.SDIF:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SDIF:

    /* "EnumTypeToPy":274
 *         return __pyx_enum.MAUI
 *     elif c_val == Header.SDIF:
 *         return __pyx_enum.SDIF             # <<<<<<<<<<<<<<
 *     elif c_val == Header.OGG:
 *         return __pyx_enum.OGG
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SDIF); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":273
 *     elif c_val == Header.MAUI:
 *         return __pyx_enum.MAUI
 *     elif c_val == Header.SDIF:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SDIF
 *     elif c_val == Header.OGG:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_OGG:

    /* "EnumTypeToPy":276
 *         return __pyx_enum.SDIF
 *     elif c_val == Header.OGG:
 *         return __pyx_enum.OGG             # <<<<<<<<<<<<<<
 *     elif c_val == Header.FLAC:
 *         return __pyx_enum.FLAC
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_OGG); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":275
 *     elif c_val == Header.SDIF:
 *         return __pyx_enum.SDIF
 *     elif c_val == Header.OGG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.OGG
 *     elif c_val == Header.FLAC:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_FLAC:

    /* "EnumTypeToPy":278
 *         return __pyx_enum.OGG
 *     elif c_val == Header.FLAC:
 *         return __pyx_enum.FLAC             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SPEEX:
 *         return __pyx_enum.SPEEX
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_FLAC); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":277
 *     elif c_val == Header.OGG:
 *         return __pyx_enum.OGG
 *     elif c_val == Header.FLAC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.FLAC
 *     elif c_val == Header.SPEEX:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SPEEX:

    /* "EnumTypeToPy":280
 *         return __pyx_enum.FLAC
 *     elif c_val == Header.SPEEX:
 *         return __pyx_enum.SPEEX             # <<<<<<<<<<<<<<
 *     elif c_val == Header.MPEG:
 *         return __pyx_enum.MPEG
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SPEEX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":279
 *     elif c_val == Header.FLAC:
 *         return __pyx_enum.FLAC
 *     elif c_val == Header.SPEEX:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SPEEX
 *     elif c_val == Header.MPEG:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MPEG:

    /* "EnumTypeToPy":282
 *         return __pyx_enum.SPEEX
 *     elif c_val == Header.MPEG:
 *         return __pyx_enum.MPEG             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SHORTEN:
 *         return __pyx_enum.SHORTEN
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MPEG); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":281
 *     elif c_val == Header.SPEEX:
 *         return __pyx_enum.SPEEX
 *     elif c_val == Header.MPEG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MPEG
 *     elif c_val == Header.SHORTEN:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SHORTEN:

    /* "EnumTypeToPy":284
 *         return __pyx_enum.MPEG
 *     elif c_val == Header.SHORTEN:
 *         return __pyx_enum.SHORTEN             # <<<<<<<<<<<<<<
 *     elif c_val == Header.TTA:
 *         return __pyx_enum.TTA
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SHORTEN); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":283
 *     elif c_val == Header.MPEG:
 *         return __pyx_enum.MPEG
 *     elif c_val == Header.SHORTEN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SHORTEN
 *     elif c_val == Header.TTA:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_TTA:

    /* "EnumTypeToPy":286
 *         return __pyx_enum.SHORTEN
 *     elif c_val == Header.TTA:
 *         return __pyx_enum.TTA             # <<<<<<<<<<<<<<
 *     elif c_val == Header.WAVPACK:
 *         return __pyx_enum.WAVPACK
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_TTA); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":285
 *     elif c_val == Header.SHORTEN:
 *         return __pyx_enum.SHORTEN
 *     elif c_val == Header.TTA:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.TTA
 *     elif c_val == Header.WAVPACK:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_WAVPACK:

    /* "EnumTypeToPy":288
 *         return __pyx_enum.TTA
 *     elif c_val == Header.WAVPACK:
 *         return __pyx_enum.WAVPACK             # <<<<<<<<<<<<<<
 *     elif c_val == Header.SOX:
 *         return __pyx_enum.SOX
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_WAVPACK); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":287
 *     elif c_val == Header.TTA:
 *         return __pyx_enum.TTA
 *     elif c_val == Header.WAVPACK:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.WAVPACK
 *     elif c_val == Header.SOX:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_SOX:

    /* "EnumTypeToPy":290
 *         return __pyx_enum.WAVPACK
 *     elif c_val == Header.SOX:
 *         return __pyx_enum.SOX             # <<<<<<<<<<<<<<
 *     elif c_val == Header.NUM_HEADERS:
 *         return __pyx_enum.NUM_HEADERS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SOX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":289
 *     elif c_val == Header.WAVPACK:
 *         return __pyx_enum.WAVPACK
 *     elif c_val == Header.SOX:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SOX
 *     elif c_val == Header.NUM_HEADERS:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_NUM_HEADERS:

    /* "EnumTypeToPy":292
 *         return __pyx_enum.SOX
 *     elif c_val == Header.NUM_HEADERS:
 *         return __pyx_enum.NUM_HEADERS             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NUM_HEADERS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":291
 *     elif c_val == Header.SOX:
 *         return __pyx_enum.SOX
 *     elif c_val == Header.NUM_HEADERS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NUM_HEADERS
 *     else:
 */
    break;
    default:

    /* "EnumTypeToPy":294
 *         return __pyx_enum.NUM_HEADERS
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
 * 
 */
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":295
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
    break;
  }

  /* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(Header c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(enum __pyx_t_8pysndlib_6sndlib_Sample __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py", 1);

  /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Sample as __pyx_enum
 *     except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "EnumTypeToPy":138
 * 
 *     try:
 *         from pysndlib.sndlib import Sample as __pyx_enum             # <<<<<<<<<<<<<<
 *     except ImportError:
 *         import warnings
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_Sample);
      __Pyx_GIVEREF(__pyx_n_s_Sample);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Sample)) __PYX_ERR(1, 138, __pyx_L3_error);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_pysndlib_sndlib, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_Sample); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v___pyx_enum = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Sample as __pyx_enum
 *     except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "EnumTypeToPy":139
 *     try:
 *         from pysndlib.sndlib import Sample as __pyx_enum
 *     except ImportError:             # <<<<<<<<<<<<<<
 *         import warnings
 *         warnings.warn(
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 139, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "EnumTypeToPy":140
 *         from pysndlib.sndlib import Sample as __pyx_enum
 *     except ImportError:
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             f"enum class Sample not importable from pysndlib.sndlib. "
 */
      __pyx_t_8 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 140, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_warnings = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "EnumTypeToPy":141
 *     except ImportError:
 *         import warnings
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"enum class Sample not importable from pysndlib.sndlib. "
 *             "You are probably using a cpdef enum declared in a .pxd file that "
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 141, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_u_enum_class_Sample_not_importable};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 141, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":145
 *             "You are probably using a cpdef enum declared in a .pxd file that "
 *             "does not have a .py  or .pyx file.")
 *         return <int>c_val             # <<<<<<<<<<<<<<
 * 
 *     if 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyInt_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 145, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "EnumTypeToPy":137
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         from pysndlib.sndlib import Sample as __pyx_enum
 *     except ImportError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "EnumTypeToPy":147
 *         return <int>c_val
 * 
 *     if 0:             # <<<<<<<<<<<<<<
 *         pass
 *     elif c_val == Sample.UNKNOWN_SAMPLE:
 */
  switch (__pyx_v_c_val) {
    case __pyx_e_8pysndlib_6sndlib_UNKNOWN_SAMPLE:

    /* "EnumTypeToPy":150
 *         pass
 *     elif c_val == Sample.UNKNOWN_SAMPLE:
 *         return __pyx_enum.UNKNOWN_SAMPLE             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BSHORT:
 *         return __pyx_enum.BSHORT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_UNKNOWN_SAMPLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":149
 *     if 0:
 *         pass
 *     elif c_val == Sample.UNKNOWN_SAMPLE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.UNKNOWN_SAMPLE
 *     elif c_val == Sample.BSHORT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BSHORT:

    /* "EnumTypeToPy":152
 *         return __pyx_enum.UNKNOWN_SAMPLE
 *     elif c_val == Sample.BSHORT:
 *         return __pyx_enum.BSHORT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.MULAW:
 *         return __pyx_enum.MULAW
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BSHORT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":151
 *     elif c_val == Sample.UNKNOWN_SAMPLE:
 *         return __pyx_enum.UNKNOWN_SAMPLE
 *     elif c_val == Sample.BSHORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BSHORT
 *     elif c_val == Sample.MULAW:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_MULAW:

    /* "EnumTypeToPy":154
 *         return __pyx_enum.BSHORT
 *     elif c_val == Sample.MULAW:
 *         return __pyx_enum.MULAW             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BYTE:
 *         return __pyx_enum.BYTE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_MULAW); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":153
 *     elif c_val == Sample.BSHORT:
 *         return __pyx_enum.BSHORT
 *     elif c_val == Sample.MULAW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.MULAW
 *     elif c_val == Sample.BYTE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BYTE:

    /* "EnumTypeToPy":156
 *         return __pyx_enum.MULAW
 *     elif c_val == Sample.BYTE:
 *         return __pyx_enum.BYTE             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BFLOAT:
 *         return __pyx_enum.BFLOAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BYTE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":155
 *     elif c_val == Sample.MULAW:
 *         return __pyx_enum.MULAW
 *     elif c_val == Sample.BYTE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BYTE
 *     elif c_val == Sample.BFLOAT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BFLOAT:

    /* "EnumTypeToPy":158
 *         return __pyx_enum.BYTE
 *     elif c_val == Sample.BFLOAT:
 *         return __pyx_enum.BFLOAT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BINT:
 *         return __pyx_enum.BINT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BFLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":157
 *     elif c_val == Sample.BYTE:
 *         return __pyx_enum.BYTE
 *     elif c_val == Sample.BFLOAT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BFLOAT
 *     elif c_val == Sample.BINT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BINT:

    /* "EnumTypeToPy":160
 *         return __pyx_enum.BFLOAT
 *     elif c_val == Sample.BINT:
 *         return __pyx_enum.BINT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.ALAW:
 *         return __pyx_enum.ALAW
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BINT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":159
 *     elif c_val == Sample.BFLOAT:
 *         return __pyx_enum.BFLOAT
 *     elif c_val == Sample.BINT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BINT
 *     elif c_val == Sample.ALAW:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ALAW:

    /* "EnumTypeToPy":162
 *         return __pyx_enum.BINT
 *     elif c_val == Sample.ALAW:
 *         return __pyx_enum.ALAW             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.UBYTE:
 *         return __pyx_enum.UBYTE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ALAW); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":161
 *     elif c_val == Sample.BINT:
 *         return __pyx_enum.BINT
 *     elif c_val == Sample.ALAW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ALAW
 *     elif c_val == Sample.UBYTE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_UBYTE:

    /* "EnumTypeToPy":164
 *         return __pyx_enum.ALAW
 *     elif c_val == Sample.UBYTE:
 *         return __pyx_enum.UBYTE             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.B24INT:
 *         return __pyx_enum.B24INT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_UBYTE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":163
 *     elif c_val == Sample.ALAW:
 *         return __pyx_enum.ALAW
 *     elif c_val == Sample.UBYTE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.UBYTE
 *     elif c_val == Sample.B24INT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_B24INT:

    /* "EnumTypeToPy":166
 *         return __pyx_enum.UBYTE
 *     elif c_val == Sample.B24INT:
 *         return __pyx_enum.B24INT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BDOUBLE:
 *         return __pyx_enum.BDOUBLE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_B24INT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":165
 *     elif c_val == Sample.UBYTE:
 *         return __pyx_enum.UBYTE
 *     elif c_val == Sample.B24INT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.B24INT
 *     elif c_val == Sample.BDOUBLE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BDOUBLE:

    /* "EnumTypeToPy":168
 *         return __pyx_enum.B24INT
 *     elif c_val == Sample.BDOUBLE:
 *         return __pyx_enum.BDOUBLE             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LSHORT:
 *         return __pyx_enum.LSHORT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BDOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":167
 *     elif c_val == Sample.B24INT:
 *         return __pyx_enum.B24INT
 *     elif c_val == Sample.BDOUBLE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BDOUBLE
 *     elif c_val == Sample.LSHORT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LSHORT:

    /* "EnumTypeToPy":170
 *         return __pyx_enum.BDOUBLE
 *     elif c_val == Sample.LSHORT:
 *         return __pyx_enum.LSHORT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LINT:
 *         return __pyx_enum.LINT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LSHORT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":169
 *     elif c_val == Sample.BDOUBLE:
 *         return __pyx_enum.BDOUBLE
 *     elif c_val == Sample.LSHORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LSHORT
 *     elif c_val == Sample.LINT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LINT:

    /* "EnumTypeToPy":172
 *         return __pyx_enum.LSHORT
 *     elif c_val == Sample.LINT:
 *         return __pyx_enum.LINT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LFLOAT:
 *         return __pyx_enum.LFLOAT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LINT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":171
 *     elif c_val == Sample.LSHORT:
 *         return __pyx_enum.LSHORT
 *     elif c_val == Sample.LINT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LINT
 *     elif c_val == Sample.LFLOAT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LFLOAT:

    /* "EnumTypeToPy":174
 *         return __pyx_enum.LINT
 *     elif c_val == Sample.LFLOAT:
 *         return __pyx_enum.LFLOAT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LDOUBLE:
 *         return __pyx_enum.LDOUBLE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LFLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":173
 *     elif c_val == Sample.LINT:
 *         return __pyx_enum.LINT
 *     elif c_val == Sample.LFLOAT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LFLOAT
 *     elif c_val == Sample.LDOUBLE:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LDOUBLE:

    /* "EnumTypeToPy":176
 *         return __pyx_enum.LFLOAT
 *     elif c_val == Sample.LDOUBLE:
 *         return __pyx_enum.LDOUBLE             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.UBSHORT:
 *         return __pyx_enum.UBSHORT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LDOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":175
 *     elif c_val == Sample.LFLOAT:
 *         return __pyx_enum.LFLOAT
 *     elif c_val == Sample.LDOUBLE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LDOUBLE
 *     elif c_val == Sample.UBSHORT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_UBSHORT:

    /* "EnumTypeToPy":178
 *         return __pyx_enum.LDOUBLE
 *     elif c_val == Sample.UBSHORT:
 *         return __pyx_enum.UBSHORT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.ULSHORT:
 *         return __pyx_enum.ULSHORT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_UBSHORT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":177
 *     elif c_val == Sample.LDOUBLE:
 *         return __pyx_enum.LDOUBLE
 *     elif c_val == Sample.UBSHORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.UBSHORT
 *     elif c_val == Sample.ULSHORT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_ULSHORT:

    /* "EnumTypeToPy":180
 *         return __pyx_enum.UBSHORT
 *     elif c_val == Sample.ULSHORT:
 *         return __pyx_enum.ULSHORT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.L24INT:
 *         return __pyx_enum.L24INT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ULSHORT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":179
 *     elif c_val == Sample.UBSHORT:
 *         return __pyx_enum.UBSHORT
 *     elif c_val == Sample.ULSHORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ULSHORT
 *     elif c_val == Sample.L24INT:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_L24INT:

    /* "EnumTypeToPy":182
 *         return __pyx_enum.ULSHORT
 *     elif c_val == Sample.L24INT:
 *         return __pyx_enum.L24INT             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BINTN:
 *         return __pyx_enum.BINTN
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_L24INT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":181
 *     elif c_val == Sample.ULSHORT:
 *         return __pyx_enum.ULSHORT
 *     elif c_val == Sample.L24INT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.L24INT
 *     elif c_val == Sample.BINTN:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BINTN:

    /* "EnumTypeToPy":184
 *         return __pyx_enum.L24INT
 *     elif c_val == Sample.BINTN:
 *         return __pyx_enum.BINTN             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LINTN:
 *         return __pyx_enum.LINTN
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BINTN); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":183
 *     elif c_val == Sample.L24INT:
 *         return __pyx_enum.L24INT
 *     elif c_val == Sample.BINTN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BINTN
 *     elif c_val == Sample.LINTN:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LINTN:

    /* "EnumTypeToPy":186
 *         return __pyx_enum.BINTN
 *     elif c_val == Sample.LINTN:
 *         return __pyx_enum.LINTN             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BFLOAT_UNSCALED:
 *         return __pyx_enum.BFLOAT_UNSCALED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LINTN); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":185
 *     elif c_val == Sample.BINTN:
 *         return __pyx_enum.BINTN
 *     elif c_val == Sample.LINTN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LINTN
 *     elif c_val == Sample.BFLOAT_UNSCALED:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BFLOAT_UNSCALED:

    /* "EnumTypeToPy":188
 *         return __pyx_enum.LINTN
 *     elif c_val == Sample.BFLOAT_UNSCALED:
 *         return __pyx_enum.BFLOAT_UNSCALED             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LFLOAT_UNSCALED:
 *         return __pyx_enum.LFLOAT_UNSCALED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BFLOAT_UNSCALED); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":187
 *     elif c_val == Sample.LINTN:
 *         return __pyx_enum.LINTN
 *     elif c_val == Sample.BFLOAT_UNSCALED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BFLOAT_UNSCALED
 *     elif c_val == Sample.LFLOAT_UNSCALED:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LFLOAT_UNSCALED:

    /* "EnumTypeToPy":190
 *         return __pyx_enum.BFLOAT_UNSCALED
 *     elif c_val == Sample.LFLOAT_UNSCALED:
 *         return __pyx_enum.LFLOAT_UNSCALED             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.BDOUBLE_UNSCALED:
 *         return __pyx_enum.BDOUBLE_UNSCALED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LFLOAT_UNSCALED); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":189
 *     elif c_val == Sample.BFLOAT_UNSCALED:
 *         return __pyx_enum.BFLOAT_UNSCALED
 *     elif c_val == Sample.LFLOAT_UNSCALED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LFLOAT_UNSCALED
 *     elif c_val == Sample.BDOUBLE_UNSCALED:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_BDOUBLE_UNSCALED:

    /* "EnumTypeToPy":192
 *         return __pyx_enum.LFLOAT_UNSCALED
 *     elif c_val == Sample.BDOUBLE_UNSCALED:
 *         return __pyx_enum.BDOUBLE_UNSCALED             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.LDOUBLE_UNSCALED:
 *         return __pyx_enum.LDOUBLE_UNSCALED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BDOUBLE_UNSCALED); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":191
 *     elif c_val == Sample.LFLOAT_UNSCALED:
 *         return __pyx_enum.LFLOAT_UNSCALED
 *     elif c_val == Sample.BDOUBLE_UNSCALED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BDOUBLE_UNSCALED
 *     elif c_val == Sample.LDOUBLE_UNSCALED:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_LDOUBLE_UNSCALED:

    /* "EnumTypeToPy":194
 *         return __pyx_enum.BDOUBLE_UNSCALED
 *     elif c_val == Sample.LDOUBLE_UNSCALED:
 *         return __pyx_enum.LDOUBLE_UNSCALED             # <<<<<<<<<<<<<<
 *     elif c_val == Sample.NUM_SAMPLES:
 *         return __pyx_enum.NUM_SAMPLES
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LDOUBLE_UNSCALED); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":193
 *     elif c_val == Sample.BDOUBLE_UNSCALED:
 *         return __pyx_enum.BDOUBLE_UNSCALED
 *     elif c_val == Sample.LDOUBLE_UNSCALED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LDOUBLE_UNSCALED
 *     elif c_val == Sample.NUM_SAMPLES:
 */
    break;
    case __pyx_e_8pysndlib_6sndlib_NUM_SAMPLES:

    /* "EnumTypeToPy":196
 *         return __pyx_enum.LDOUBLE_UNSCALED
 *     elif c_val == Sample.NUM_SAMPLES:
 *         return __pyx_enum.NUM_SAMPLES             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NUM_SAMPLES); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":195
 *     elif c_val == Sample.LDOUBLE_UNSCALED:
 *         return __pyx_enum.LDOUBLE_UNSCALED
 *     elif c_val == Sample.NUM_SAMPLES:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NUM_SAMPLES
 *     else:
 */
    break;
    default:

    /* "EnumTypeToPy":198
 *         return __pyx_enum.NUM_SAMPLES
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
 * 
 */
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":199
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
    break;
  }

  /* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(Sample c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py", 1);

  /* "EnumTypeToPy":137
 * 
 * 
 *     __pyx_enum = Interp             # <<<<<<<<<<<<<<
 * 
 *     if 0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Interp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":139
 *     __pyx_enum = Interp
 * 
 *     if 0:             # <<<<<<<<<<<<<<
 *         pass
 *     elif c_val == Interp.NONE:
 */
  switch (__pyx_v_c_val) {
    case __pyx_e_8pysndlib_3clm_NONE:

    /* "EnumTypeToPy":142
 *         pass
 *     elif c_val == Interp.NONE:
 *         return __pyx_enum.NONE             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.LINEAR:
 *         return __pyx_enum.LINEAR
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":141
 *     if 0:
 *         pass
 *     elif c_val == Interp.NONE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NONE
 *     elif c_val == Interp.LINEAR:
 */
    break;
    case __pyx_e_8pysndlib_3clm_LINEAR:

    /* "EnumTypeToPy":144
 *         return __pyx_enum.NONE
 *     elif c_val == Interp.LINEAR:
 *         return __pyx_enum.LINEAR             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.SINUSOIDAL:
 *         return __pyx_enum.SINUSOIDAL
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LINEAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":143
 *     elif c_val == Interp.NONE:
 *         return __pyx_enum.NONE
 *     elif c_val == Interp.LINEAR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LINEAR
 *     elif c_val == Interp.SINUSOIDAL:
 */
    break;
    case __pyx_e_8pysndlib_3clm_SINUSOIDAL:

    /* "EnumTypeToPy":146
 *         return __pyx_enum.LINEAR
 *     elif c_val == Interp.SINUSOIDAL:
 *         return __pyx_enum.SINUSOIDAL             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.ALL_PASS:
 *         return __pyx_enum.ALL_PASS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SINUSOIDAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":145
 *     elif c_val == Interp.LINEAR:
 *         return __pyx_enum.LINEAR
 *     elif c_val == Interp.SINUSOIDAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SINUSOIDAL
 *     elif c_val == Interp.ALL_PASS:
 */
    break;
    case __pyx_e_8pysndlib_3clm_ALL_PASS:

    /* "EnumTypeToPy":148
 *         return __pyx_enum.SINUSOIDAL
 *     elif c_val == Interp.ALL_PASS:
 *         return __pyx_enum.ALL_PASS             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.LAGRANGE:
 *         return __pyx_enum.LAGRANGE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_ALL_PASS); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":147
 *     elif c_val == Interp.SINUSOIDAL:
 *         return __pyx_enum.SINUSOIDAL
 *     elif c_val == Interp.ALL_PASS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ALL_PASS
 *     elif c_val == Interp.LAGRANGE:
 */
    break;
    case __pyx_e_8pysndlib_3clm_LAGRANGE:

    /* "EnumTypeToPy":150
 *         return __pyx_enum.ALL_PASS
 *     elif c_val == Interp.LAGRANGE:
 *         return __pyx_enum.LAGRANGE             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.BEZIER:
 *         return __pyx_enum.BEZIER
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_LAGRANGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":149
 *     elif c_val == Interp.ALL_PASS:
 *         return __pyx_enum.ALL_PASS
 *     elif c_val == Interp.LAGRANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.LAGRANGE
 *     elif c_val == Interp.BEZIER:
 */
    break;
    case __pyx_e_8pysndlib_3clm_BEZIER:

    /* "EnumTypeToPy":152
 *         return __pyx_enum.LAGRANGE
 *     elif c_val == Interp.BEZIER:
 *         return __pyx_enum.BEZIER             # <<<<<<<<<<<<<<
 *     elif c_val == Interp.HERMITE:
 *         return __pyx_enum.HERMITE
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BEZIER); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":151
 *     elif c_val == Interp.LAGRANGE:
 *         return __pyx_enum.LAGRANGE
 *     elif c_val == Interp.BEZIER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BEZIER
 *     elif c_val == Interp.HERMITE:
 */
    break;
    case __pyx_e_8pysndlib_3clm_HERMITE:

    /* "EnumTypeToPy":154
 *         return __pyx_enum.BEZIER
 *     elif c_val == Interp.HERMITE:
 *         return __pyx_enum.HERMITE             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_HERMITE); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":153
 *     elif c_val == Interp.BEZIER:
 *         return __pyx_enum.BEZIER
 *     elif c_val == Interp.HERMITE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.HERMITE
 *     else:
 */
    break;
    default:

    /* "EnumTypeToPy":156
 *         return __pyx_enum.HERMITE
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
 * 
 */
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":157
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_3 = __pyx_v___pyx_enum; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

  /* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(Interp c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py(enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py", 1);

  /* "EnumTypeToPy":137
 * 
 * 
 *     __pyx_enum = Spectrum             # <<<<<<<<<<<<<<
 * 
 *     if 0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":139
 *     __pyx_enum = Spectrum
 * 
 *     if 0:             # <<<<<<<<<<<<<<
 *         pass
 *     elif c_val == Spectrum.IN_DB:
 */
  switch (__pyx_v_c_val) {
    case __pyx_e_8pysndlib_3clm_IN_DB:

    /* "EnumTypeToPy":142
 *         pass
 *     elif c_val == Spectrum.IN_DB:
 *         return __pyx_enum.IN_DB             # <<<<<<<<<<<<<<
 *     elif c_val == Spectrum.NORMALIZED:
 *         return __pyx_enum.NORMALIZED
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_IN_DB); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":141
 *     if 0:
 *         pass
 *     elif c_val == Spectrum.IN_DB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IN_DB
 *     elif c_val == Spectrum.NORMALIZED:
 */
    break;
    case __pyx_e_8pysndlib_3clm_NORMALIZED:

    /* "EnumTypeToPy":144
 *         return __pyx_enum.IN_DB
 *     elif c_val == Spectrum.NORMALIZED:
 *         return __pyx_enum.NORMALIZED             # <<<<<<<<<<<<<<
 *     elif c_val == Spectrum.RAW:
 *         return __pyx_enum.RAW
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_NORMALIZED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":143
 *     elif c_val == Spectrum.IN_DB:
 *         return __pyx_enum.IN_DB
 *     elif c_val == Spectrum.NORMALIZED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.NORMALIZED
 *     elif c_val == Spectrum.RAW:
 */
    break;
    case __pyx_e_8pysndlib_3clm_RAW:

    /* "EnumTypeToPy":146
 *         return __pyx_enum.NORMALIZED
 *     elif c_val == Spectrum.RAW:
 *         return __pyx_enum.RAW             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_RAW); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":145
 *     elif c_val == Spectrum.NORMALIZED:
 *         return __pyx_enum.NORMALIZED
 *     elif c_val == Spectrum.RAW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.RAW
 *     else:
 */
    break;
    default:

    /* "EnumTypeToPy":148
 *         return __pyx_enum.RAW
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
 * 
 */
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":149
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_3 = __pyx_v___pyx_enum; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

  /* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py(Spectrum c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py", 1);

  /* "EnumTypeToPy":137
 * 
 * 
 *     __pyx_enum = Polynomial             # <<<<<<<<<<<<<<
 * 
 *     if 0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":139
 *     __pyx_enum = Polynomial
 * 
 *     if 0:             # <<<<<<<<<<<<<<
 *         pass
 *     elif c_val == Polynomial.EITHER_KIND:
 */
  switch (__pyx_v_c_val) {
    case __pyx_e_8pysndlib_3clm_EITHER_KIND:

    /* "EnumTypeToPy":142
 *         pass
 *     elif c_val == Polynomial.EITHER_KIND:
 *         return __pyx_enum.EITHER_KIND             # <<<<<<<<<<<<<<
 *     elif c_val == Polynomial.FIRST_KIND:
 *         return __pyx_enum.FIRST_KIND
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_EITHER_KIND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":141
 *     if 0:
 *         pass
 *     elif c_val == Polynomial.EITHER_KIND:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.EITHER_KIND
 *     elif c_val == Polynomial.FIRST_KIND:
 */
    break;
    case __pyx_e_8pysndlib_3clm_FIRST_KIND:

    /* "EnumTypeToPy":144
 *         return __pyx_enum.EITHER_KIND
 *     elif c_val == Polynomial.FIRST_KIND:
 *         return __pyx_enum.FIRST_KIND             # <<<<<<<<<<<<<<
 *     elif c_val == Polynomial.SECOND_KIND:
 *         return __pyx_enum.SECOND_KIND
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_FIRST_KIND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":143
 *     elif c_val == Polynomial.EITHER_KIND:
 *         return __pyx_enum.EITHER_KIND
 *     elif c_val == Polynomial.FIRST_KIND:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.FIRST_KIND
 *     elif c_val == Polynomial.SECOND_KIND:
 */
    break;
    case __pyx_e_8pysndlib_3clm_SECOND_KIND:

    /* "EnumTypeToPy":146
 *         return __pyx_enum.FIRST_KIND
 *     elif c_val == Polynomial.SECOND_KIND:
 *         return __pyx_enum.SECOND_KIND             # <<<<<<<<<<<<<<
 *     elif c_val == Polynomial.BOTH_KINDS:
 *         return __pyx_enum.BOTH_KINDS
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_SECOND_KIND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":145
 *     elif c_val == Polynomial.FIRST_KIND:
 *         return __pyx_enum.FIRST_KIND
 *     elif c_val == Polynomial.SECOND_KIND:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.SECOND_KIND
 *     elif c_val == Polynomial.BOTH_KINDS:
 */
    break;
    case __pyx_e_8pysndlib_3clm_BOTH_KINDS:

    /* "EnumTypeToPy":148
 *         return __pyx_enum.SECOND_KIND
 *     elif c_val == Polynomial.BOTH_KINDS:
 *         return __pyx_enum.BOTH_KINDS             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_n_s_BOTH_KINDS); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":147
 *     elif c_val == Polynomial.SECOND_KIND:
 *         return __pyx_enum.SECOND_KIND
 *     elif c_val == Polynomial.BOTH_KINDS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.BOTH_KINDS
 *     else:
 */
    break;
    default:

    /* "EnumTypeToPy":150
 *         return __pyx_enum.BOTH_KINDS
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
 * 
 */
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":151
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_3 = __pyx_v___pyx_enum; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

  /* "EnumTypeToPy":132
 * 
 * @cname("__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py")
 * cdef __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(Polynomial c_val):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_enum
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":17
 * @cython.internal
 * cdef class __Pyx_EnumMeta(type):
 *     def __init__(cls, name, parents, dct):             # <<<<<<<<<<<<<<
 *         type.__init__(cls, name, parents, dct)
 *         cls.__members__ = __Pyx_OrderedDict()
 */

/* Python wrapper */
static int __pyx_pw_8EnumBase_14__Pyx_EnumMeta_1__init__(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8EnumBase_14__Pyx_EnumMeta_1__init__(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_parents = 0;
  PyObject *__pyx_v_dct = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_parents,&__pyx_n_s_dct,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parents)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(1, 17, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dct)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(1, 17, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 17, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
      values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    }
    __pyx_v_name = values[0];
    __pyx_v_parents = values[1];
    __pyx_v_dct = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 17, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumMeta___init__(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v_cls), __pyx_v_name, __pyx_v_parents, __pyx_v_dct);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8EnumBase_14__Pyx_EnumMeta___init__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_parents, PyObject *__pyx_v_dct) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "EnumBase":18
 * cdef class __Pyx_EnumMeta(type):
 *     def __init__(cls, name, parents, dct):
 *         type.__init__(cls, name, parents, dct)             # <<<<<<<<<<<<<<
 *         cls.__members__ = __Pyx_OrderedDict()
 *     def __iter__(cls):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyType_Type)), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_cls), __pyx_v_name, __pyx_v_parents, __pyx_v_dct};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "EnumBase":19
 *     def __init__(cls, name, parents, dct):
 *         type.__init__(cls, name, parents, dct)
 *         cls.__members__ = __Pyx_OrderedDict()             # <<<<<<<<<<<<<<
 *     def __iter__(cls):
 *         return iter(cls.__members__.values())
 */
  __Pyx_INCREF(__Pyx_OrderedDict);
  __pyx_t_2 = __Pyx_OrderedDict; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_members, __pyx_t_1) < 0) __PYX_ERR(1, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "EnumBase":17
 * @cython.internal
 * cdef class __Pyx_EnumMeta(type):
 *     def __init__(cls, name, parents, dct):             # <<<<<<<<<<<<<<
 *         type.__init__(cls, name, parents, dct)
 *         cls.__members__ = __Pyx_OrderedDict()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":20
 *         type.__init__(cls, name, parents, dct)
 *         cls.__members__ = __Pyx_OrderedDict()
 *     def __iter__(cls):             # <<<<<<<<<<<<<<
 *         return iter(cls.__members__.values())
 *     def __getitem__(cls, name):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_3__iter__(PyObject *__pyx_v_cls); /*proto*/
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_3__iter__(PyObject *__pyx_v_cls) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumMeta_2__iter__(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v_cls));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_2__iter__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 1);

  /* "EnumBase":21
 *         cls.__members__ = __Pyx_OrderedDict()
 *     def __iter__(cls):
 *         return iter(cls.__members__.values())             # <<<<<<<<<<<<<<
 *     def __getitem__(cls, name):
 *         return cls.__members__[name]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_members); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "EnumBase":20
 *         type.__init__(cls, name, parents, dct)
 *         cls.__members__ = __Pyx_OrderedDict()
 *     def __iter__(cls):             # <<<<<<<<<<<<<<
 *         return iter(cls.__members__.values())
 *     def __getitem__(cls, name):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":22
 *     def __iter__(cls):
 *         return iter(cls.__members__.values())
 *     def __getitem__(cls, name):             # <<<<<<<<<<<<<<
 *         return cls.__members__[name]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_5__getitem__(PyObject *__pyx_v_cls, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_5__getitem__(PyObject *__pyx_v_cls, PyObject *__pyx_v_name) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumMeta_4__getitem__(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v_cls), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_4__getitem__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_cls, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "EnumBase":23
 *         return iter(cls.__members__.values())
 *     def __getitem__(cls, name):
 *         return cls.__members__[name]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_members); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "EnumBase":22
 *     def __iter__(cls):
 *         return iter(cls.__members__.values())
 *     def __getitem__(cls, name):             # <<<<<<<<<<<<<<
 *         return cls.__members__[name]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumMeta_6__reduce_cython__(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_6__reduce_cython__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_238750788);
    __Pyx_GIVEREF(__pyx_int_238750788);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_238750788)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, None), state
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_238750788);
    __Pyx_GIVEREF(__pyx_int_238750788);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_238750788)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumMeta_8__setstate_cython__(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_8__setstate_cython__(struct __pyx_obj___Pyx_EnumMeta *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_unpickle___Pyx_EnumMeta__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumMeta.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":28
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_EnumBase_1__new__ = {"__new__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumBase_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_value,&__pyx_n_s_name,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 28, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 28, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, 1); __PYX_ERR(1, 28, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 28, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__new__") < 0)) __PYX_ERR(1, 28, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_value = values[1];
    __pyx_v_name = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 28, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumBase___new__(__pyx_self, __pyx_v_cls, __pyx_v_value, __pyx_v_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 1);

  /* "EnumBase":29
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):
 *         for v in cls:             # <<<<<<<<<<<<<<
 *             if v == value:
 *                 return v
 */
  if (likely(PyList_CheckExact(__pyx_v_cls)) || PyTuple_CheckExact(__pyx_v_cls)) {
    __pyx_t_1 = __pyx_v_cls; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 29, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(1, 29, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 29, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 29, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(1, 29, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 29, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 29, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "EnumBase":30
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 *             if v == value:             # <<<<<<<<<<<<<<
 *                 return v
 *         if name is None:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_v, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 30, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "EnumBase":31
 *         for v in cls:
 *             if v == value:
 *                 return v             # <<<<<<<<<<<<<<
 *         if name is None:
 *             raise ValueError("Unknown enum value: '%s'" % value)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_v);
      __pyx_r = __pyx_v_v;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "EnumBase":30
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 *             if v == value:             # <<<<<<<<<<<<<<
 *                 return v
 *         if name is None:
 */
    }

    /* "EnumBase":29
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):
 *         for v in cls:             # <<<<<<<<<<<<<<
 *             if v == value:
 *                 return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "EnumBase":32
 *             if v == value:
 *                 return v
 *         if name is None:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unknown enum value: '%s'" % value)
 *         res = int.__new__(cls, value)
 */
  __pyx_t_5 = (__pyx_v_name == Py_None);
  if (unlikely(__pyx_t_5)) {

    /* "EnumBase":33
 *                 return v
 *         if name is None:
 *             raise ValueError("Unknown enum value: '%s'" % value)             # <<<<<<<<<<<<<<
 *         res = int.__new__(cls, value)
 *         res.name = name
 */
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_enum_value_s, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 33, __pyx_L1_error)

    /* "EnumBase":32
 *             if v == value:
 *                 return v
 *         if name is None:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unknown enum value: '%s'" % value)
 *         res = int.__new__(cls, value)
 */
  }

  /* "EnumBase":34
 *         if name is None:
 *             raise ValueError("Unknown enum value: '%s'" % value)
 *         res = int.__new__(cls, value)             # <<<<<<<<<<<<<<
 *         res.name = name
 *         setattr(cls, name, res)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyInt_Type)), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_cls, __pyx_v_value};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_res = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "EnumBase":35
 *             raise ValueError("Unknown enum value: '%s'" % value)
 *         res = int.__new__(cls, value)
 *         res.name = name             # <<<<<<<<<<<<<<
 *         setattr(cls, name, res)
 *         cls.__members__[name] = res
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_res, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(1, 35, __pyx_L1_error)

  /* "EnumBase":36
 *         res = int.__new__(cls, value)
 *         res.name = name
 *         setattr(cls, name, res)             # <<<<<<<<<<<<<<
 *         cls.__members__[name] = res
 *         return res
 */
  __pyx_t_8 = PyObject_SetAttr(__pyx_v_cls, __pyx_v_name, __pyx_v_res); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 36, __pyx_L1_error)

  /* "EnumBase":37
 *         res.name = name
 *         setattr(cls, name, res)
 *         cls.__members__[name] = res             # <<<<<<<<<<<<<<
 *         return res
 *     def __repr__(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_members); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_res) < 0))) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumBase":38
 *         setattr(cls, name, res)
 *         cls.__members__[name] = res
 *         return res             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "EnumBase":28
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":39
 *         cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_EnumBase_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumBase_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 39, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(1, 39, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 39, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumBase_2__repr__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "EnumBase":40
 *         return res
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self)) __PYX_ERR(1, 40, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_d, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "EnumBase":39
 *         cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":41
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_5__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_EnumBase_5__str__ = {"__str__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumBase_5__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_5__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__str__") < 0)) __PYX_ERR(1, 41, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 41, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_EnumBase_4__str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 1);

  /* "EnumBase":42
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 *         return "%s.%s" % (self.__class__.__name__, self.name)             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x03040000:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(1, 42, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "EnumBase":41
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_EnumBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":49
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_FlagBase_1__new__ = {"__new__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_FlagBase_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_value,&__pyx_n_s_name,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 49, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 49, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, 1); __PYX_ERR(1, 49, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 49, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__new__") < 0)) __PYX_ERR(1, 49, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_value = values[1];
    __pyx_v_name = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 49, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_FlagBase___new__(__pyx_self, __pyx_v_cls, __pyx_v_value, __pyx_v_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 1);

  /* "EnumBase":50
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):
 *         for v in cls:             # <<<<<<<<<<<<<<
 *             if v == value:
 *                 return v
 */
  if (likely(PyList_CheckExact(__pyx_v_cls)) || PyTuple_CheckExact(__pyx_v_cls)) {
    __pyx_t_1 = __pyx_v_cls; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 50, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 50, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(1, 50, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 50, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(1, 50, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 50, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "EnumBase":51
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 *             if v == value:             # <<<<<<<<<<<<<<
 *                 return v
 *         res = int.__new__(cls, value)
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_v, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "EnumBase":52
 *         for v in cls:
 *             if v == value:
 *                 return v             # <<<<<<<<<<<<<<
 *         res = int.__new__(cls, value)
 *         if name is None:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_v);
      __pyx_r = __pyx_v_v;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "EnumBase":51
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 *             if v == value:             # <<<<<<<<<<<<<<
 *                 return v
 *         res = int.__new__(cls, value)
 */
    }

    /* "EnumBase":50
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):
 *         for v in cls:             # <<<<<<<<<<<<<<
 *             if v == value:
 *                 return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "EnumBase":53
 *             if v == value:
 *                 return v
 *         res = int.__new__(cls, value)             # <<<<<<<<<<<<<<
 *         if name is None:
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyInt_Type)), __pyx_n_s_new); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_cls, __pyx_v_value};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumBase":54
 *                 return v
 *         res = int.__new__(cls, value)
 *         if name is None:             # <<<<<<<<<<<<<<
 * 
 *             res.name = ""
 */
  __pyx_t_5 = (__pyx_v_name == Py_None);
  if (__pyx_t_5) {

    /* "EnumBase":56
 *         if name is None:
 * 
 *             res.name = ""             # <<<<<<<<<<<<<<
 *         else:
 *             res.name = name
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_res, __pyx_n_s_name, __pyx_kp_s__3) < 0) __PYX_ERR(1, 56, __pyx_L1_error)

    /* "EnumBase":54
 *                 return v
 *         res = int.__new__(cls, value)
 *         if name is None:             # <<<<<<<<<<<<<<
 * 
 *             res.name = ""
 */
    goto __pyx_L7;
  }

  /* "EnumBase":58
 *             res.name = ""
 *         else:
 *             res.name = name             # <<<<<<<<<<<<<<
 *             setattr(cls, name, res)
 *             cls.__members__[name] = res
 */
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_res, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(1, 58, __pyx_L1_error)

    /* "EnumBase":59
 *         else:
 *             res.name = name
 *             setattr(cls, name, res)             # <<<<<<<<<<<<<<
 *             cls.__members__[name] = res
 *         return res
 */
    __pyx_t_8 = PyObject_SetAttr(__pyx_v_cls, __pyx_v_name, __pyx_v_res); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 59, __pyx_L1_error)

    /* "EnumBase":60
 *             res.name = name
 *             setattr(cls, name, res)
 *             cls.__members__[name] = res             # <<<<<<<<<<<<<<
 *         return res
 *     def __repr__(self):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_members); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_res) < 0))) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L7:;

  /* "EnumBase":61
 *             setattr(cls, name, res)
 *             cls.__members__[name] = res
 *         return res             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "EnumBase":49
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":62
 *             cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_FlagBase_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_FlagBase_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 62, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(1, 62, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 62, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_FlagBase_2__repr__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "EnumBase":63
 *         return res
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(1, 63, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self)) __PYX_ERR(1, 63, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_d, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "EnumBase":62
 *             cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumBase":64
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_5__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_14__Pyx_FlagBase_5__str__ = {"__str__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_FlagBase_5__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_14__Pyx_FlagBase_5__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 64, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__str__") < 0)) __PYX_ERR(1, 64, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 64, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase_14__Pyx_FlagBase_4__str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase_14__Pyx_FlagBase_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 1);

  /* "EnumBase":65
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 *         return "%s.%s" % (self.__class__.__name__, self.name)             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x03060000:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "EnumBase":64
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("EnumBase.__Pyx_FlagBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle___Pyx_EnumMeta(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta = {"__pyx_unpickle___Pyx_EnumMeta", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle___Pyx_EnumMeta", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle___Pyx_EnumMeta", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle___Pyx_EnumMeta") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle___Pyx_EnumMeta", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("EnumBase.__pyx_unpickle___Pyx_EnumMeta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8EnumBase___pyx_unpickle___Pyx_EnumMeta(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8EnumBase___pyx_unpickle___Pyx_EnumMeta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe3b0c44, 0xda39a3e, 0xd41d8cd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__4, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe3b0c44, 0xda39a3e, 0xd41d8cd):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xe3b0c44, 0xda39a3e, 0xd41d8cd):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe3b0c44, 0xda39a3e, 0xd41d8cd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype___Pyx_EnumMeta), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_unpickle___Pyx_EnumMeta__set_state(((struct __pyx_obj___Pyx_EnumMeta *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 *     __pyx_result = __Pyx_EnumMeta.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle___Pyx_EnumMeta(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("EnumBase.__pyx_unpickle___Pyx_EnumMeta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_unpickle___Pyx_EnumMeta__set_state(struct __pyx_obj___Pyx_EnumMeta *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 > 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle___Pyx_EnumMeta__set_state(<__Pyx_EnumMeta> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle___Pyx_EnumMeta__set_state(__Pyx_EnumMeta __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("EnumBase.__pyx_unpickle___Pyx_EnumMeta__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":131
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
          if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
    } else {

      /* "View.MemoryView":132
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
 */
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":131
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_dim;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  char *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":137
 *         cdef Py_ssize_t dim
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
 */
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 137, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":138
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
 */
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":140
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 */
  __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":141
 * 
 *         if not self.ndim:
 *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
    __PYX_ERR(1, 141, __pyx_L1_error)

    /* "View.MemoryView":140
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 */
  }

  /* "View.MemoryView":143
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 */
  __pyx_t_2 = (__pyx_v_itemsize <= 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":144
 * 
 *         if itemsize <= 0:
 *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
    __PYX_ERR(1, 144, __pyx_L1_error)

    /* "View.MemoryView":143
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 */
  }

  /* "View.MemoryView":146
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "View.MemoryView":147
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":146
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  }

  /* "View.MemoryView":148
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
  __pyx_t_4 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":149
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(1, 149, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_8;

  /* "View.MemoryView":152
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
 */
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":153
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
 */
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":155
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
 */
  __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
  if (unlikely(__pyx_t_3)) {

    /* "View.MemoryView":156
 * 
 *         if not self._shape:
 *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
    __PYX_ERR(1, 156, __pyx_L1_error)

    /* "View.MemoryView":155
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
 */
  }

  /* "View.MemoryView":159
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 */
  __pyx_t_7 = 0;
  __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
      #endif
      if (__pyx_t_1 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    #else
    __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_7;
    __pyx_t_7 = (__pyx_t_7 + 1);

    /* "View.MemoryView":160
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
 */
    __pyx_t_3 = (__pyx_v_dim <= 0);
    if (unlikely(__pyx_t_3)) {

      /* "View.MemoryView":161
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
 */
      __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
      __pyx_t_9 += 22;
      __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
      __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_9 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__5);
      __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u_);
      PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(1, 161, __pyx_L1_error)

      /* "View.MemoryView":160
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
 */
    }

    /* "View.MemoryView":162
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
 */
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":159
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "View.MemoryView":165
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "View.MemoryView":166
 *         cdef char order
 *         if mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         elif mode == 'fortran':
 */
    __pyx_v_order = 'C';

    /* "View.MemoryView":167
 *         if mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         elif mode == 'fortran':
 *             order = b'F'
 */
    __Pyx_INCREF(__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_c;

    /* "View.MemoryView":165
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
    goto __pyx_L11;
  }

  /* "View.MemoryView":168
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
  if (likely(__pyx_t_3)) {

    /* "View.MemoryView":169
 *             self.mode = u'c'
 *         elif mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         else:
 */
    __pyx_v_order = 'F';

    /* "View.MemoryView":170
 *         elif mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
 */
    __Pyx_INCREF(__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_fortran;

    /* "View.MemoryView":168
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
    goto __pyx_L11;
  }

  /* "View.MemoryView":172
 *             self.mode = u'fortran'
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(1, 172, __pyx_L1_error)
  }
  __pyx_L11:;

  /* "View.MemoryView":174
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
 * 
 *         self.free_data = allocate_buffer
 */
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":176
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 * 
 */
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":177
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 * 
 *         if allocate_buffer:
 */
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_3;

  /* "View.MemoryView":179
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
 */
  if (__pyx_v_allocate_buffer) {

    /* "View.MemoryView":180
 * 
 *         if allocate_buffer:
 *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    __pyx_t_7 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)

    /* "View.MemoryView":179
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
 */
  }

  /* "View.MemoryView":131
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":182
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 */

/* Python wrapper */
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":184
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
 */
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":185
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
  __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":186
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":187
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
      __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":186
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
 */
      goto __pyx_L4;
    }

    /* "View.MemoryView":188
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":189
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 */
      __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":188
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
 */
    }
    __pyx_L4:;

    /* "View.MemoryView":190
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
 */
    __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":191
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
      __PYX_ERR(1, 191, __pyx_L1_error)

      /* "View.MemoryView":190
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
 */
    }

    /* "View.MemoryView":185
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
  }

  /* "View.MemoryView":192
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 * 
 */
  __pyx_t_2 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_2;

  /* "View.MemoryView":193
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
 */
  __pyx_t_3 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_3;

  /* "View.MemoryView":195
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":196
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *             info.shape = self._shape
 *             info.strides = self._strides
 */
    __pyx_t_4 = __pyx_v_self->ndim;
    __pyx_v_info->ndim = __pyx_t_4;

    /* "View.MemoryView":197
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim
 *             info.shape = self._shape             # <<<<<<<<<<<<<<
 *             info.strides = self._strides
 *         else:
 */
    __pyx_t_5 = __pyx_v_self->_shape;
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":198
 *             info.ndim = self.ndim
 *             info.shape = self._shape
 *             info.strides = self._strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.ndim = 1
 */
    __pyx_t_5 = __pyx_v_self->_strides;
    __pyx_v_info->strides = __pyx_t_5;

    /* "View.MemoryView":195
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
 */
    goto __pyx_L6;
  }

  /* "View.MemoryView":200
 *             info.strides = self._strides
 *         else:
 *             info.ndim = 1             # <<<<<<<<<<<<<<
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL
 */
  /*else*/ {
    __pyx_v_info->ndim = 1;

    /* "View.MemoryView":201
 *         else:
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
 *             info.strides = NULL
 * 
 */
    __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    if (__pyx_t_1) {
      __pyx_t_5 = (&__pyx_v_self->len);
    } else {
      __pyx_t_5 = NULL;
    }
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":202
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.suboffsets = NULL
 */
    __pyx_v_info->strides = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":204
 *             info.strides = NULL
 * 
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":205
 * 
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 */
  __pyx_t_3 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_3;

  /* "View.MemoryView":206
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self
 */
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":207
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {
    __pyx_t_2 = __pyx_v_self->format;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_info->format = __pyx_t_2;

  /* "View.MemoryView":208
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array self):
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":182
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":210
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":211
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 */
  __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":212
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
 */
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":211
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":213
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 */
  if (__pyx_v_self->free_data) {
  } else {
    __pyx_t_1 = __pyx_v_self->free_data;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->data != NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":214
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
 */
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":215
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
 *             free(self.data)
 *         PyObject_Free(self._shape)
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":214
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
 */
    }

    /* "View.MemoryView":216
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
 */
    free(__pyx_v_self->data);

    /* "View.MemoryView":213
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":217
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":210
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

  /* function exit code */
}

/* "View.MemoryView":219
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":221
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":219
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":224
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_memview", 1);

  /* "View.MemoryView":225
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 */
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":226
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":224
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":228
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;

  /* "View.MemoryView":229
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
 */
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":228
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":231
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 1);

  /* "View.MemoryView":232
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":231
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":234
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "View.MemoryView":235
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":234
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":237
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 1);

  /* "View.MemoryView":238
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":237
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":248
 * 
 * @cname("__pyx_array_allocate_buffer")
 * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
 * 
 * 
 */

static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_i;
  PyObject **__pyx_v_p;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":254
 *     cdef PyObject **p
 * 
 *     self.free_data = True             # <<<<<<<<<<<<<<
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
 */
  __pyx_v_self->free_data = 1;

  /* "View.MemoryView":255
 * 
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."
 */
  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

  /* "View.MemoryView":256
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
 */
  __pyx_t_1 = (!(__pyx_v_self->data != 0));
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":257
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
 * 
 *     if self.dtype_is_object:
 */
    __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
    __PYX_ERR(1, 257, __pyx_L1_error)

    /* "View.MemoryView":256
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
 */
  }

  /* "View.MemoryView":259
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
 */
  if (__pyx_v_self->dtype_is_object) {

    /* "View.MemoryView":260
 * 
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
 */
    __pyx_v_p = ((PyObject **)__pyx_v_self->data);

    /* "View.MemoryView":261
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
 */
    if (unlikely(__pyx_v_self->itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 261, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 261, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":262
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None             # <<<<<<<<<<<<<<
 *             Py_INCREF(Py_None)
 *     return 0
 */
      (__pyx_v_p[__pyx_v_i]) = Py_None;

      /* "View.MemoryView":263
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
      Py_INCREF(Py_None);
    }

    /* "View.MemoryView":259
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
 */
  }

  /* "View.MemoryView":264
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":248
 * 
 * @cname("__pyx_array_allocate_buffer")
 * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
 * 
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":268
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
 *     cdef array result
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 */

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  PyObject *__pyx_v_mode = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_cwrapper", 1);

  /* "View.MemoryView":270
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
 *     cdef array result
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
 * 
 *     if buf is NULL:
 */
  __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_n_s_fortran);
    __pyx_t_1 = __pyx_n_s_fortran;
  } else {
    __Pyx_INCREF(__pyx_n_s_c);
    __pyx_t_1 = __pyx_n_s_c;
  }
  __pyx_v_mode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":272
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_buf == NULL);
  if (__pyx_t_2) {

    /* "View.MemoryView":273
 * 
 *     if buf is NULL:
 *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":272
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":275
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":276
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":278
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":268
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
 *     cdef array result
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mode);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":304
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "View.MemoryView":305
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":304
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":306
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "View.MemoryView":307
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":306
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->name != Py_None);
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":349
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_intptr_t __pyx_t_4;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "View.MemoryView":350
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 */
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":351
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 */
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":352
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_obj != Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":353
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 */
    __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)

    /* "View.MemoryView":354
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":355
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
 */
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":356
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 */
      Py_INCREF(Py_None);

      /* "View.MemoryView":354
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    }

    /* "View.MemoryView":352
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  }

  /* "View.MemoryView":358
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < 8:
 */
  __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
  if (__pyx_t_1) {

    /* "View.MemoryView":360
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 */
    __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
    if (__pyx_t_1) {

      /* "View.MemoryView":361
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < 8:
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 */
      __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

      /* "View.MemoryView":362
 *             if __pyx_memoryview_thread_locks_used < 8:
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 */
      __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

      /* "View.MemoryView":360
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 */
    }

    /* "View.MemoryView":363
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 */
    __pyx_t_1 = (__pyx_v_self->lock == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":364
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *                 if self.lock is NULL:
 *                     raise MemoryError
 */
      __pyx_v_self->lock = PyThread_allocate_lock();

      /* "View.MemoryView":365
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
 */
      __pyx_t_1 = (__pyx_v_self->lock == NULL);
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":366
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 *                     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
        PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)

        /* "View.MemoryView":365
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
 */
      }

      /* "View.MemoryView":363
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 */
    }

    /* "View.MemoryView":358
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < 8:
 */
  }

  /* "View.MemoryView":368
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":369
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
 */
    __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    __pyx_t_1 = __pyx_t_2;
    __pyx_L12_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":368
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
    goto __pyx_L11;
  }

  /* "View.MemoryView":371
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
 */
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L11:;

  /* "View.MemoryView":373
 *             self.dtype_is_object = dtype_is_object
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
 *         self.typeinfo = NULL
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    if (unlikely(__pyx_t_5 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 373, __pyx_L1_error)
    }
    __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(1, 373, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
  #endif

  /* "View.MemoryView":374
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
 */
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":349
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":376
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyThread_type_lock __pyx_t_5;
  PyThread_type_lock __pyx_t_6;

  /* "View.MemoryView":377
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":378
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 */
    __Pyx_ReleaseBuffer((&__pyx_v_self->view));

    /* "View.MemoryView":377
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":379
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":381
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
 *             Py_DECREF(Py_None)
 * 
 */
    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;

    /* "View.MemoryView":382
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
 */
    Py_DECREF(Py_None);

    /* "View.MemoryView":379
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":386
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  __pyx_t_1 = (__pyx_v_self->lock != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":387
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 */
    __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":388
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
      if (__pyx_t_1) {

        /* "View.MemoryView":389
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 */
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":390
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
        if (__pyx_t_1) {

          /* "View.MemoryView":392
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
          __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":391
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
 */
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;

          /* "View.MemoryView":390
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        }

        /* "View.MemoryView":393
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
 */
        goto __pyx_L6_break;

        /* "View.MemoryView":388
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      }
    }
    /*else*/ {

      /* "View.MemoryView":395
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 */
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":386
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  }

  /* "View.MemoryView":376
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

  /* function exit code */
}

/* "View.MemoryView":397
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item_pointer", 1);

  /* "View.MemoryView":399
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
 */
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":401
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 401, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":402
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":401
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":404
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":397
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":407
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "View.MemoryView":408
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  if (__pyx_t_1) {

    /* "View.MemoryView":409
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":408
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "View.MemoryView":411
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
 */
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 411, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_indices = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "View.MemoryView":414
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":415
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":414
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  }

  /* "View.MemoryView":417
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
 */
  /*else*/ {
    __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_5;

    /* "View.MemoryView":418
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":407
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":420
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
 */

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":421
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
 */
  if (unlikely(__pyx_v_self->view.readonly)) {

    /* "View.MemoryView":422
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
    __PYX_ERR(1, 422, __pyx_L1_error)

    /* "View.MemoryView":421
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
 */
  }

  /* "View.MemoryView":424
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
 */
  __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(__pyx_t_1 != Py_None)) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 424, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":426
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":427
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_obj = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "View.MemoryView":428
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 428, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "View.MemoryView":429
 *             obj = self.is_slice(value)
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "View.MemoryView":428
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":431
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
      __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "View.MemoryView":426
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":433
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
 */
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":420
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":435
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":436
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "View.MemoryView":437
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":438
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":439
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
 */
        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "View.MemoryView":438
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_obj);
        __Pyx_GIVEREF(__pyx_v_obj);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
        __Pyx_GIVEREF(__pyx_t_7);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "View.MemoryView":437
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "View.MemoryView":440
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);

        /* "View.MemoryView":441
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;

      /* "View.MemoryView":437
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":436
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  }

  /* "View.MemoryView":443
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":435
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":445
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  __Pyx_memviewslice __pyx_v_msrc;
  __Pyx_memviewslice __pyx_v_mdst;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);

  /* "View.MemoryView":448
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
 */
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
  __pyx_v_msrc = (__pyx_t_1[0]);

  /* "View.MemoryView":449
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 */
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
  __pyx_v_mdst = (__pyx_t_1[0]);

  /* "View.MemoryView":451
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)

  /* "View.MemoryView":445
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":453
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[0x80];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);

  /* "View.MemoryView":455
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
 */
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":460
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
  __pyx_v_dst_slice = __pyx_t_1;

  /* "View.MemoryView":462
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
  __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
  if (__pyx_t_2) {

    /* "View.MemoryView":463
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
 */
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":464
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    __pyx_t_2 = (__pyx_v_tmp == NULL);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":465
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
 */
      PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)

      /* "View.MemoryView":464
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    }

    /* "View.MemoryView":466
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
 */
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":462
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":468
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":470
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
 */
  /*try:*/ {

    /* "View.MemoryView":471
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":472
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
 */
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":471
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
      goto __pyx_L8;
    }

    /* "View.MemoryView":474
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":478
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":479
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
 */
      __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)

      /* "View.MemoryView":478
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    }

    /* "View.MemoryView":480
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
 */
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":483
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
 */
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":453
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":485
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_indexed", 1);

  /* "View.MemoryView":486
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":487
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":485
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":489
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 1);

  /* "View.MemoryView":492
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
 */
  __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":495
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":496
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":497
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":496
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    }

    /* "View.MemoryView":501
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
    /*else:*/ {
      __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
      __pyx_t_10 = (__pyx_t_9 == 1);
      if (__pyx_t_10) {

        /* "View.MemoryView":502
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":501
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
      }

      /* "View.MemoryView":503
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "View.MemoryView":498
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "View.MemoryView":499
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
      __PYX_ERR(1, 499, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "View.MemoryView":496
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":489
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":505
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 1);

  /* "View.MemoryView":508
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
 */
  __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":513
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
  if (__pyx_t_2) {

    /* "View.MemoryView":514
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":513
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":516
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":518
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 518, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_8 = __pyx_v_bytesvalue;
  __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
  __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
  for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
    __pyx_t_9 = __pyx_t_12;
    __pyx_v_c = (__pyx_t_9[0]);

    /* "View.MemoryView":519
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    __pyx_v_i = __pyx_t_7;

    /* "View.MemoryView":518
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
    __pyx_t_7 = (__pyx_t_7 + 1);

    /* "View.MemoryView":519
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "View.MemoryView":505
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":521
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 */

/* Python wrapper */
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  char *__pyx_t_4;
  void *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":523
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 */
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":524
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
    __PYX_ERR(1, 524, __pyx_L1_error)

    /* "View.MemoryView":523
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 */
  }

  /* "View.MemoryView":526
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":527
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
 */
    __pyx_t_3 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_3;

    /* "View.MemoryView":526
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
    goto __pyx_L6;
  }

  /* "View.MemoryView":529
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
 */
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":531
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":532
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
 */
    __pyx_t_3 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_3;

    /* "View.MemoryView":531
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
    goto __pyx_L7;
  }

  /* "View.MemoryView":534
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
 */
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":536
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":537
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
 */
    __pyx_t_3 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_3;

    /* "View.MemoryView":536
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
    goto __pyx_L8;
  }

  /* "View.MemoryView":539
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":541
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":542
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":541
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":544
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":546
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 */
  __pyx_t_5 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_5;

  /* "View.MemoryView":547
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 */
  __pyx_t_6 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":548
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 */
  __pyx_t_7 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_7;

  /* "View.MemoryView":549
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
 */
  __pyx_t_7 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_7;

  /* "View.MemoryView":550
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
 */
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":551
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":521
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":554
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":556
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
 */
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":557
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)

  /* "View.MemoryView":558
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":554
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":560
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":562
 *     @property
 *     def base(self):
 *         return self._get_base()             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":560
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":564
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 1);

  /* "View.MemoryView":565
 * 
 *     cdef _get_base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":564
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":567
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_7genexpr__pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":569
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":567
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":571
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":573
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
 */
  __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":575
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
    __PYX_ERR(1, 575, __pyx_L1_error)

    /* "View.MemoryView":573
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
 */
  }

  /* "View.MemoryView":577
 *             raise ValueError, "Buffer view does not expose strides"
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":571
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":579
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":581
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":582
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__6, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":581
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  }

  /* "View.MemoryView":584
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":579
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":586
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":588
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":586
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":590
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":592
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":590
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":594
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":596
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":594
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":598
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "View.MemoryView":600
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":601
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 */
    __Pyx_INCREF(__pyx_int_1);
    __pyx_v_result = __pyx_int_1;

    /* "View.MemoryView":603
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
 */
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "View.MemoryView":604
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
 */
      __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
      __pyx_t_5 = 0;
    }

    /* "View.MemoryView":606
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
 */
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":600
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  }

  /* "View.MemoryView":608
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":598
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":610
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":611
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":612
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
 */
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":611
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  }

  /* "View.MemoryView":614
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":610
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":616
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "View.MemoryView":617
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":618
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "View.MemoryView":617
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":616
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":620
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 1);

  /* "View.MemoryView":621
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":620
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":624
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_c_contig", 1);

  /* "View.MemoryView":627
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":628
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":624
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":630
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_f_contig", 1);

  /* "View.MemoryView":633
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":634
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":630
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":636
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 1);

  /* "View.MemoryView":638
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":640
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":641
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":646
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":636
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":648
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_fortran", 1);

  /* "View.MemoryView":650
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":652
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":653
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":658
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":648
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":662
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);

  /* "View.MemoryView":663
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_o);
  __Pyx_GIVEREF(__pyx_v_o);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":664
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":665
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":662
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":668
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":669
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":668
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":671
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_idx;
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unellipsify", 1);

  /* "View.MemoryView":677
 *     """
 *     cdef Py_ssize_t idx
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
 * 
 *     result = [slice(None)] * ndim
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
  if (__pyx_t_2) {
    __Pyx_INCREF(((PyObject*)__pyx_v_index));
    __pyx_t_1 = __pyx_v_index;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_tup = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":679
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
      __Pyx_INCREF(__pyx_slice__7);
      __Pyx_GIVEREF(__pyx_slice__7);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__7)) __PYX_ERR(1, 679, __pyx_L1_error);
    }
  }
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":680
 * 
 *     result = [slice(None)] * ndim
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     idx = 0
 */
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":681
 *     result = [slice(None)] * ndim
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     idx = 0
 *     for item in tup:
 */
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":682
 *     have_slices = False
 *     seen_ellipsis = False
 *     idx = 0             # <<<<<<<<<<<<<<
 *     for item in tup:
 *         if item is Ellipsis:
 */
  __pyx_v_idx = 0;

  /* "View.MemoryView":683
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  if (unlikely(__pyx_v_tup == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 683, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":684
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
 */
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    if (__pyx_t_2) {

      /* "View.MemoryView":685
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
 */
      __pyx_t_2 = (!__pyx_v_seen_ellipsis);
      if (__pyx_t_2) {

        /* "View.MemoryView":686
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             have_slices = True
 */
        if (unlikely(__pyx_v_tup == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(1, 686, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
        __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));

        /* "View.MemoryView":687
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
 */
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":685
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
 */
      }

      /* "View.MemoryView":688
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if isinstance(item, slice):
 */
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":684
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":690
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
 */
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      if (__pyx_t_2) {

        /* "View.MemoryView":691
 *         else:
 *             if isinstance(item, slice):
 *                 have_slices = True             # <<<<<<<<<<<<<<
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 */
        __pyx_v_have_slices = 1;

        /* "View.MemoryView":690
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":692
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
 */
      __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
      if (unlikely(__pyx_t_2)) {

        /* "View.MemoryView":693
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
 *             result[idx] = item
 *         idx += 1
 */
        __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = 0;
        __pyx_t_6 = 127;
        __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
        __pyx_t_5 += 24;
        __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
        __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u__8);
        __pyx_t_5 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__8);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__8);
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(1, 693, __pyx_L1_error)

        /* "View.MemoryView":692
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
 */
      }
      __pyx_L7:;

      /* "View.MemoryView":694
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item             # <<<<<<<<<<<<<<
 *         idx += 1
 * 
 */
      if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "View.MemoryView":695
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
 *         idx += 1             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - idx
 */
    __pyx_v_idx = (__pyx_v_idx + 1);

    /* "View.MemoryView":683
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":697
 *         idx += 1
 * 
 *     nslices = ndim - idx             # <<<<<<<<<<<<<<
 *     return have_slices or nslices, tuple(result)
 * 
 */
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);

  /* "View.MemoryView":698
 * 
 *     nslices = ndim - idx
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_L9_bool_binop_done:;
  __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":671
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":700
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  int __pyx_r;
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":701
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
 */
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":702
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
 */
    __pyx_t_4 = (__pyx_v_suboffset >= 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":703
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
 *     return 0  # return type just used as an error flag
 * 
 */
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
      __PYX_ERR(1, 703, __pyx_L1_error)

      /* "View.MemoryView":702
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
 */
    }
  }

  /* "View.MemoryView":704
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":700
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":711
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  Py_ssize_t __pyx_v_cindex;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_3;
  char *__pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memview_slice", 1);

  /* "View.MemoryView":712
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
 */
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":719
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
 */
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":723
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(1, 723, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
  #endif

  /* "View.MemoryView":725
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":726
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":727
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
 */
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":725
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":729
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":730
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":736
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
 */
  __pyx_t_3 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_3;

  /* "View.MemoryView":737
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_4;

  /* "View.MemoryView":742
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step, cindex
 */
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":743
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step, cindex
 *     cdef bint have_start, have_stop, have_step
 */
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":747
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
 */
  __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      }
    } else {
      __pyx_t_8 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 747, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_v_dim = __pyx_t_5;
    __pyx_t_5 = (__pyx_t_5 + 1);

    /* "View.MemoryView":748
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
 */
    __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":749
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             cindex = index             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
      __pyx_v_cindex = __pyx_t_9;

      /* "View.MemoryView":750
 *         if PyIndex_Check(index):
 *             cindex = index
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)

      /* "View.MemoryView":748
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":756
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
    __pyx_t_1 = (__pyx_v_index == Py_None);
    if (__pyx_t_1) {

      /* "View.MemoryView":757
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 */
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":758
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
 */
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":759
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
 */
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":760
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":756
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":762
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_9;

      /* "View.MemoryView":763
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_9;

      /* "View.MemoryView":764
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_9;

      /* "View.MemoryView":766
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":767
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":768
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":770
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)

      /* "View.MemoryView":776
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":747
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":778
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":779
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":780
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }

    /* "View.MemoryView":781
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }

    /* "View.MemoryView":779
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":778
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  }

  /* "View.MemoryView":784
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":785
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "View.MemoryView":784
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":711
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":793
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
  Py_ssize_t __pyx_v_new_shape;
  int __pyx_v_negative_step;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif

  /* "View.MemoryView":813
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
  __pyx_t_1 = (!__pyx_v_is_slice);
  if (__pyx_t_1) {

    /* "View.MemoryView":815
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    __pyx_t_1 = (__pyx_v_start < 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":816
 * 
 *         if start < 0:
 *             start += shape             # <<<<<<<<<<<<<<
 *         if not 0 <= start < shape:
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

      /* "View.MemoryView":815
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    }

    /* "View.MemoryView":817
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    __pyx_t_1 = (0 <= __pyx_v_start);
    if (__pyx_t_1) {
      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
    }
    __pyx_t_2 = (!__pyx_t_1);
    if (__pyx_t_2) {

      /* "View.MemoryView":818
 *             start += shape
 *         if not 0 <= start < shape:
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
 *     else:
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)

      /* "View.MemoryView":817
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    }

    /* "View.MemoryView":813
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":821
 *     else:
 * 
 *         if have_step:             # <<<<<<<<<<<<<<
 *             negative_step = step < 0
 *             if step == 0:
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_have_step != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":822
 * 
 *         if have_step:
 *             negative_step = step < 0             # <<<<<<<<<<<<<<
 *             if step == 0:
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 */
      __pyx_v_negative_step = (__pyx_v_step < 0);

      /* "View.MemoryView":823
 *         if have_step:
 *             negative_step = step < 0
 *             if step == 0:             # <<<<<<<<<<<<<<
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
 */
      __pyx_t_2 = (__pyx_v_step == 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":824
 *             negative_step = step < 0
 *             if step == 0:
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             negative_step = False
 */
        __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)

        /* "View.MemoryView":823
 *         if have_step:
 *             negative_step = step < 0
 *             if step == 0:             # <<<<<<<<<<<<<<
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
 */
      }

      /* "View.MemoryView":821
 *     else:
 * 
 *         if have_step:             # <<<<<<<<<<<<<<
 *             negative_step = step < 0
 *             if step == 0:
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":826
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
 *             negative_step = False             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    /*else*/ {
      __pyx_v_negative_step = 0;

      /* "View.MemoryView":827
 *         else:
 *             negative_step = False
 *             step = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_step = 1;
    }
    __pyx_L6:;

    /* "View.MemoryView":830
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
    __pyx_t_2 = (__pyx_v_have_start != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":831
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
      __pyx_t_2 = (__pyx_v_start < 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":832
 *         if have_start:
 *             if start < 0:
 *                 start += shape             # <<<<<<<<<<<<<<
 *                 if start < 0:
 *                     start = 0
 */
        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

        /* "View.MemoryView":833
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        __pyx_t_2 = (__pyx_v_start < 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":834
 *                 start += shape
 *                 if start < 0:
 *                     start = 0             # <<<<<<<<<<<<<<
 *             elif start >= shape:
 *                 if negative_step:
 */
          __pyx_v_start = 0;

          /* "View.MemoryView":833
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        }

        /* "View.MemoryView":831
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
        goto __pyx_L9;
      }

      /* "View.MemoryView":835
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
      if (__pyx_t_2) {

        /* "View.MemoryView":836
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
        if (__pyx_v_negative_step) {

          /* "View.MemoryView":837
 *             elif start >= shape:
 *                 if negative_step:
 *                     start = shape - 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     start = shape
 */
          __pyx_v_start = (__pyx_v_shape - 1);

          /* "View.MemoryView":836
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
          goto __pyx_L11;
        }

        /* "View.MemoryView":839
 *                     start = shape - 1
 *                 else:
 *                     start = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        /*else*/ {
          __pyx_v_start = __pyx_v_shape;
        }
        __pyx_L11:;

        /* "View.MemoryView":835
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      }
      __pyx_L9:;

      /* "View.MemoryView":830
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
      goto __pyx_L8;
    }

    /* "View.MemoryView":841
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
    /*else*/ {
      if (__pyx_v_negative_step) {

        /* "View.MemoryView":842
 *         else:
 *             if negative_step:
 *                 start = shape - 1             # <<<<<<<<<<<<<<
 *             else:
 *                 start = 0
 */
        __pyx_v_start = (__pyx_v_shape - 1);

        /* "View.MemoryView":841
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
        goto __pyx_L12;
      }

      /* "View.MemoryView":844
 *                 start = shape - 1
 *             else:
 *                 start = 0             # <<<<<<<<<<<<<<
 * 
 *         if have_stop:
 */
      /*else*/ {
        __pyx_v_start = 0;
      }
      __pyx_L12:;
    }
    __pyx_L8:;

    /* "View.MemoryView":846
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
    __pyx_t_2 = (__pyx_v_have_stop != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":847
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
      __pyx_t_2 = (__pyx_v_stop < 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":848
 *         if have_stop:
 *             if stop < 0:
 *                 stop += shape             # <<<<<<<<<<<<<<
 *                 if stop < 0:
 *                     stop = 0
 */
        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);

        /* "View.MemoryView":849
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        __pyx_t_2 = (__pyx_v_stop < 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":850
 *                 stop += shape
 *                 if stop < 0:
 *                     stop = 0             # <<<<<<<<<<<<<<
 *             elif stop > shape:
 *                 stop = shape
 */
          __pyx_v_stop = 0;

          /* "View.MemoryView":849
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        }

        /* "View.MemoryView":847
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
        goto __pyx_L14;
      }

      /* "View.MemoryView":851
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
      if (__pyx_t_2) {

        /* "View.MemoryView":852
 *                     stop = 0
 *             elif stop > shape:
 *                 stop = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        __pyx_v_stop = __pyx_v_shape;

        /* "View.MemoryView":851
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      }
      __pyx_L14:;

      /* "View.MemoryView":846
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
      goto __pyx_L13;
    }

    /* "View.MemoryView":854
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
    /*else*/ {
      if (__pyx_v_negative_step) {

        /* "View.MemoryView":855
 *         else:
 *             if negative_step:
 *                 stop = -1             # <<<<<<<<<<<<<<
 *             else:
 *                 stop = shape
 */
        __pyx_v_stop = -1L;

        /* "View.MemoryView":854
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
        goto __pyx_L16;
      }

      /* "View.MemoryView":857
 *                 stop = -1
 *             else:
 *                 stop = shape             # <<<<<<<<<<<<<<
 * 
 * 
 */
      /*else*/ {
        __pyx_v_stop = __pyx_v_shape;
      }
      __pyx_L16:;
    }
    __pyx_L13:;

    /* "View.MemoryView":861
 * 
 *         with cython.cdivision(True):
 *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
 * 
 *             if (stop - start) - step * new_shape:
 */
    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);

    /* "View.MemoryView":863
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":864
 * 
 *             if (stop - start) - step * new_shape:
 *                 new_shape += 1             # <<<<<<<<<<<<<<
 * 
 *         if new_shape < 0:
 */
      __pyx_v_new_shape = (__pyx_v_new_shape + 1);

      /* "View.MemoryView":863
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    }

    /* "View.MemoryView":866
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    __pyx_t_2 = (__pyx_v_new_shape < 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":867
 * 
 *         if new_shape < 0:
 *             new_shape = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_new_shape = 0;

      /* "View.MemoryView":866
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    }

    /* "View.MemoryView":870
 * 
 * 
 *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset
 */
    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);

    /* "View.MemoryView":871
 * 
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
 *         dst.suboffsets[new_ndim] = suboffset
 * 
 */
    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;

    /* "View.MemoryView":872
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
  }
  __pyx_L3:;

  /* "View.MemoryView":875
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
  __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":876
 * 
 *     if suboffset_dim[0] < 0:
 *         dst.data += start * stride             # <<<<<<<<<<<<<<
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 */
    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));

    /* "View.MemoryView":875
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
    goto __pyx_L19;
  }

  /* "View.MemoryView":878
 *         dst.data += start * stride
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
 * 
 *     if suboffset >= 0:
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
  }
  __pyx_L19:;

  /* "View.MemoryView":880
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  __pyx_t_2 = (__pyx_v_suboffset >= 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":881
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
    __pyx_t_2 = (!__pyx_v_is_slice);
    if (__pyx_t_2) {

      /* "View.MemoryView":882
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
      __pyx_t_2 = (__pyx_v_new_ndim == 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":883
 *         if not is_slice:
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
 */
        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);

        /* "View.MemoryView":882
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
        goto __pyx_L22;
      }

      /* "View.MemoryView":885
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
 *                                      "must be indexed and not sliced", dim)
 *         else:
 */
      /*else*/ {

        /* "View.MemoryView":886
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
 *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             suboffset_dim[0] = new_ndim
 */
        __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
      }
      __pyx_L22:;

      /* "View.MemoryView":881
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
      goto __pyx_L21;
    }

    /* "View.MemoryView":888
 *                                      "must be indexed and not sliced", dim)
 *         else:
 *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    /*else*/ {
      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
    }
    __pyx_L21:;

    /* "View.MemoryView":880
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  }

  /* "View.MemoryView":890
 *             suboffset_dim[0] = new_ndim
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":793
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":896
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pybuffer_index", 1);

  /* "View.MemoryView":898
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
 */
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":899
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
 */
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":902
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
 */
  __pyx_t_2 = (__pyx_v_view->ndim == 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":903
 * 
 *     if view.ndim == 0:
 *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
 */
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 903, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 903, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);

    /* "View.MemoryView":904
 *     if view.ndim == 0:
 *         shape = view.len // itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
 */
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":902
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":906
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 */
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":907
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
 */
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":908
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":909
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
 */
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":908
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":911
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  __pyx_t_2 = (__pyx_v_index < 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":912
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 */
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":913
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 */
    __pyx_t_2 = (__pyx_v_index < 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":914
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = 0;
      __pyx_t_4 = 127;
      __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
      __pyx_t_1 += 37;
      __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__9);
      __pyx_t_1 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__9);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__9);
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(1, 914, __pyx_L1_error)

      /* "View.MemoryView":913
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 */
    }

    /* "View.MemoryView":911
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  }

  /* "View.MemoryView":916
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 */
  __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":917
 * 
 *     if index >= shape:
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    __pyx_t_1 += 37;
    __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__9);
    __pyx_t_1 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__9);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__9);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 917, __pyx_L1_error)

    /* "View.MemoryView":916
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 */
  }

  /* "View.MemoryView":919
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
 */
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":920
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  __pyx_t_2 = (__pyx_v_suboffset >= 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":921
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
 */
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":920
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  }

  /* "View.MemoryView":923
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":896
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":929
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif

  /* "View.MemoryView":930
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 */
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":932
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":933
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":937
 * 
 *     cdef int i, j
 *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 */
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":938
 *     cdef int i, j
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
 */
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":939
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 */
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":940
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 */
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":942
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":943
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
      __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)

      /* "View.MemoryView":942
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    }
  }

  /* "View.MemoryView":945
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":929
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":963
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 */

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {

  /* "View.MemoryView":964
 * 
 *     def __dealloc__(self):
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":963
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 */

  /* function exit code */
}

/* "View.MemoryView":966
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 1);

  /* "View.MemoryView":967
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":968
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":967
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  }

  /* "View.MemoryView":970
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":966
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":972
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 1);

  /* "View.MemoryView":973
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":974
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
 */
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)

    /* "View.MemoryView":973
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":976
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
 */
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":972
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":978
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 1);

  /* "View.MemoryView":979
 * 
 *     cdef _get_base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":978
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":999
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 1);

  /* "View.MemoryView":1007
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":1008
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":1007
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "View.MemoryView":1013
 * 
 * 
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":1015
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 */
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":1016
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
 */
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":1018
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":1019
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
 */
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":1021
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 */
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":1022
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 */
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":1023
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
 */
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":1024
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
 */
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":1025
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 */
  Py_INCREF(Py_None);

  /* "View.MemoryView":1027
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1028
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
 */
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":1027
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":1030
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 */
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":1032
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
 */
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":1033
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":1036
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 */
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":1037
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 */
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":1038
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    __pyx_t_1 = (__pyx_v_suboffset >= 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":1039
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":1040
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
 */
      goto __pyx_L6_break;

      /* "View.MemoryView":1038
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":1042
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
 */
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":1043
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
 */
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1044
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":1046
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
 */
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":1047
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":1049
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":999
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1052
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 1);

  /* "View.MemoryView":1055
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":1056
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1057
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
 */
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":1055
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  }

  /* "View.MemoryView":1059
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":1060
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
 */
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1052
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1063
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;

  /* "View.MemoryView":1067
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
 */
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":1068
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
 */
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":1069
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 */
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":1071
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
 */
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":1072
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
 */
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":1074
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 */
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":1075
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 */
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":1076
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 */
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":1077
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
 */
    __pyx_t_6 = (__pyx_v_suboffsets != 0);
    if (__pyx_t_6) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":1063
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

  /* function exit code */
}

/* "View.MemoryView":1080
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy", 1);

  /* "View.MemoryView":1083
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 */
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":1084
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1080
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1087
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *(*__pyx_t_2)(char *);
  int (*__pyx_t_3)(char *, PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);

  /* "View.MemoryView":1094
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":1095
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 */
    __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_2;

    /* "View.MemoryView":1096
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
 */
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_3;

    /* "View.MemoryView":1094
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1098
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
 */
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1099
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 */
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1101
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1103
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1087
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1109
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
 */

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":1110
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
 *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
 */
  __pyx_t_2 = (__pyx_v_arg < 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (-__pyx_v_arg);
  } else {
    __pyx_t_1 = __pyx_v_arg;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":1109
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1113
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1118
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
 */
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1119
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1121
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1122
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1123
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1124
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
      goto __pyx_L4_break;

      /* "View.MemoryView":1122
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1126
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 */
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1127
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1128
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1129
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 */
      goto __pyx_L7_break;

      /* "View.MemoryView":1127
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1131
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
  if (__pyx_t_2) {

    /* "View.MemoryView":1132
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
 */
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1131
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  }

  /* "View.MemoryView":1134
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1113
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1137
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;

  /* "View.MemoryView":1144
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 */
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1145
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 */
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1146
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 */
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1147
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1149
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1150
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    __pyx_t_2 = (__pyx_v_src_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_dst_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1151
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
 */
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1150
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    if (__pyx_t_1) {

      /* "View.MemoryView":1152
 *         if (src_stride > 0 and dst_stride > 0 and
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(dst_extent):
 */
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1150
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 */
      goto __pyx_L4;
    }

    /* "View.MemoryView":1154
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
 *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
 */
    /*else*/ {
      __pyx_t_3 = __pyx_v_dst_extent;
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "View.MemoryView":1155
 *         else:
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                 src_data += src_stride
 *                 dst_data += dst_stride
 */
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1156
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride             # <<<<<<<<<<<<<<
 *                 dst_data += dst_stride
 *     else:
 */
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1157
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
 *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
 */
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1149
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *             <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1159
 *                 dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
 */
  /*else*/ {
    __pyx_t_3 = __pyx_v_dst_extent;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":1160
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
 */
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1164
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
 */
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1165
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
 */
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1137
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

  /* function exit code */
}

/* "View.MemoryView":1167
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
 */

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1170
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 */
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1167
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1174
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;

  /* "View.MemoryView":1176
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for shape in src.shape[:ndim]:
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1178
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 * 
 *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         size *= shape
 * 
 */
  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_shape = (__pyx_t_2[0]);

    /* "View.MemoryView":1179
 * 
 *     for shape in src.shape[:ndim]:
 *         size *= shape             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
  }

  /* "View.MemoryView":1181
 *         size *= shape
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1174
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1184
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) noexcept nogil:
 */

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1193
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
  __pyx_t_1 = (__pyx_v_order == 'F');
  if (__pyx_t_1) {

    /* "View.MemoryView":1194
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1195
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 *     else:
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1196
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1193
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1198
 *             stride *= shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1199
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 * 
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1200
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1202
 *             stride *= shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 */
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1184
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) noexcept nogil:
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1205
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif

  /* "View.MemoryView":1216
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1217
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
 */
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1219
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err_no_memory()
 */
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1220
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
 */
  __pyx_t_2 = (!(__pyx_v_result != 0));
  if (__pyx_t_2) {

    /* "View.MemoryView":1221
 *     result = malloc(size)
 *     if not result:
 *         _err_no_memory()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)

    /* "View.MemoryView":1220
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
 */
  }

  /* "View.MemoryView":1224
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 */
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1225
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 */
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1226
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1227
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1228
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
 */
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1230
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1233
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1234
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1235
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
 */
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1234
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    }
  }

  /* "View.MemoryView":1237
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
  __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1238
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 */
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1237
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":1240
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1242
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1205
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1247
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 */

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1249
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
 */
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
  __pyx_t_2 += 35;
  __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_got);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_got);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
  __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_and);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_and);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
  __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__9);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(1, 1249, __pyx_L1_error)

  /* "View.MemoryView":1247
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1252
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise <object>error, msg % dim
 * 
 */

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1253
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(1, 1253, __pyx_L1_error)

  /* "View.MemoryView":1252
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise <object>error, msg % dim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1256
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise <object>error, msg
 * 
 */

static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1257
 * @cname('__pyx_memoryview_err')
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_no_memory')
 */
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
  __PYX_ERR(1, 1257, __pyx_L1_error)

  /* "View.MemoryView":1256
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise <object>error, msg
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1260
 * 
 * @cname('__pyx_memoryview_err_no_memory')
 * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise MemoryError
 * 
 */

static int __pyx_memoryview_err_no_memory(void) {
  int __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif

  /* "View.MemoryView":1261
 * @cname('__pyx_memoryview_err_no_memory')
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 * 
 */
  PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)

  /* "View.MemoryView":1260
 * 
 * @cname('__pyx_memoryview_err_no_memory')
 * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise MemoryError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1265
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif

  /* "View.MemoryView":1273
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 */
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1274
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 */
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1276
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
 */
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1277
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
 */
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1278
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
 */
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1281
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
  __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1282
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1281
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1283
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1284
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1283
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":1286
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1288
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 */
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1289
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
    if (__pyx_t_2) {

      /* "View.MemoryView":1290
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
      __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
      if (__pyx_t_2) {

        /* "View.MemoryView":1291
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
 */
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1292
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 */
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1290
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":1294
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
 */
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1289
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    }

    /* "View.MemoryView":1296
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 */
    __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1297
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 */
      __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)

      /* "View.MemoryView":1296
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 */
    }
  }

  /* "View.MemoryView":1299
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
  if (__pyx_t_2) {

    /* "View.MemoryView":1301
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
    if (__pyx_t_2) {

      /* "View.MemoryView":1302
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 */
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1301
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    }

    /* "View.MemoryView":1304
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
 */
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1305
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
 */
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1299
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  }

  /* "View.MemoryView":1307
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (!__pyx_v_broadcasting);
  if (__pyx_t_2) {

    /* "View.MemoryView":1310
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1311
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1310
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
      goto __pyx_L12;
    }

    /* "View.MemoryView":1312
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1313
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1312
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    }
    __pyx_L12:;

    /* "View.MemoryView":1315
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 */
    if (__pyx_v_direct_copy) {

      /* "View.MemoryView":1317
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1318
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
 */
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1319
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1320
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1321
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1315
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 */
    }

    /* "View.MemoryView":1307
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1323
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  if (__pyx_t_2) {

    /* "View.MemoryView":1326
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)

    /* "View.MemoryView":1327
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)

    /* "View.MemoryView":1323
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1329
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1330
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
 */
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1331
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1333
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1334
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1265
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1337
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) noexcept nogil:
 */

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1341
 *                             int ndim_other) noexcept nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1343
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1344
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 */
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1345
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 */
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1346
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
 */
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1348
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 */
  __pyx_t_1 = __pyx_v_offset;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1349
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
 */
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1350
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1351
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1337
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) noexcept nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1359
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
 * 
 *     if dtype_is_object:
 */

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {

  /* "View.MemoryView":1361
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 */
  if (__pyx_v_dtype_is_object) {

    /* "View.MemoryView":1362
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 */
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1361
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 */
  }

  /* "View.MemoryView":1359
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
 * 
 *     if dtype_is_object:
 */

  /* function exit code */
}

/* "View.MemoryView":1365
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) noexcept with gil:
 */

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif

  /* "View.MemoryView":1368
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) noexcept with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 */
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1365
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) noexcept with gil:
 */

  /* function exit code */
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "View.MemoryView":1371
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
 *     cdef Py_ssize_t i
 */

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1374
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(shape[0]):
 */
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1376
 *     cdef Py_ssize_t stride = strides[0]
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
 */
  __pyx_t_1 = (__pyx_v_shape[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1377
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
    __pyx_t_4 = (__pyx_v_ndim == 1);
    if (__pyx_t_4) {

      /* "View.MemoryView":1378
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
      if (__pyx_v_inc) {

        /* "View.MemoryView":1379
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
 */
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1378
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
        goto __pyx_L6;
      }

      /* "View.MemoryView":1381
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
 */
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1377
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":1383
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += stride
 */
    /*else*/ {
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1385
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
 * 
 *         data += stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
  }

  /* "View.MemoryView":1371
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
 *     cdef Py_ssize_t i
 */

  /* function exit code */
}

/* "View.MemoryView":1391
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) noexcept nogil:
 */

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1394
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1395
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
 * 
 */
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1396
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1391
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) noexcept nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1400
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) noexcept nogil:
 */

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1404
 *                               size_t itemsize, void *item) noexcept nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
 */
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1405
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1407
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1408
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
 */
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1409
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
 */
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1410
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1407
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1412
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1413
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
 *             data += stride
 * 
 */
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1414
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1400
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) noexcept nogil:
 */

  /* function exit code */
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__10, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 *     __pyx_result = Enum.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 > 1);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":245
 * 
 *         @property
 *         cdef inline PyObject* base(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
  PyObject *__pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":248
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_BASE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":245
 * 
 *         @property
 *         cdef inline PyObject* base(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":251
 * 
 *         @property
 *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
 *             """Returns an owned reference to the dtype of the array.
 *             """
 */

static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
  PyArray_Descr *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArray_Descr *__pyx_t_1;
  __Pyx_RefNannySetupContext("descr", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":254
 *             """Returns an owned reference to the dtype of the array.
 *             """
 *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
  __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
  __pyx_r = ((PyArray_Descr *)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":251
 * 
 *         @property
 *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
 *             """Returns an owned reference to the dtype of the array.
 *             """
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":257
 * 
 *         @property
 *         cdef inline int ndim(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the number of dimensions in the array.
 *             """
 */

static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":260
 *             """Returns the number of dimensions in the array.
 *             """
 *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":257
 * 
 *         @property
 *         cdef inline int ndim(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the number of dimensions in the array.
 *             """
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 * 
 *         @property
 *         cdef inline npy_intp *shape(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the dimensions/shape of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":268
 *             Can return NULL for 0-dimensional arrays.
 *             """
 *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 * 
 *         @property
 *         cdef inline npy_intp *shape(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the dimensions/shape of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":271
 * 
 *         @property
 *         cdef inline npy_intp *strides(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the strides of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":275
 *             The number of elements matches the number of dimensions of the array (ndim).
 *             """
 *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_STRIDES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":271
 * 
 *         @property
 *         cdef inline npy_intp *strides(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the strides of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":278
 * 
 *         @property
 *         cdef inline npy_intp size(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the total size (in number of elements) of the array.
 *             """
 */

static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":281
 *             """Returns the total size (in number of elements) of the array.
 *             """
 *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_SIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":278
 * 
 *         @property
 *         cdef inline npy_intp size(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the total size (in number of elements) of the array.
 *             """
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 * 
 *         @property
 *         cdef inline char* data(self) nogil:             # <<<<<<<<<<<<<<
 *             """The pointer to the data buffer as a char*.
 *             This is provided for legacy reasons to avoid direct struct field access.
 */

static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
  char *__pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
 *             of `PyArray_DATA()` instead, which returns a 'void*'.
 *             """
 *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef unsigned char      npy_bool
 */
  __pyx_r = PyArray_BYTES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 * 
 *         @property
 *         cdef inline char* data(self) nogil:             # <<<<<<<<<<<<<<
 *             """The pointer to the data buffer as a char*.
 *             This is provided for legacy reasons to avoid direct struct field access.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":773
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":774
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":773
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":780
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":786
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
  if (__pyx_t_1) {

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":790
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":968
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":969
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":970
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error)

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":968
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":972
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":973
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":974
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = (__pyx_v_base == NULL);
  if (__pyx_t_1) {

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":975
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":974
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":976
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":972
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":980
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":981
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":982
 * cdef inline int import_array() except -1:
 *     try:
 *         __pyx_import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error)

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":981
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":983
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 983, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":984
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 984, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 984, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":981
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":980
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":986
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":987
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":988
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error)

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":987
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":989
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 989, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":990
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 990, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 990, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":987
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":986
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":992
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 1);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":993
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":994
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error)

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":993
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":995
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 995, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":996
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 996, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 996, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":993
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":992
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":999
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":999
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1026
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
  npy_datetime __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1039
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
  npy_timedelta __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1043
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1039
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1046
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
  NPY_DATETIMEUNIT __pyx_r;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1050
 *     returns the unit part of the dtype for a numpy datetime64 object.
 *     """
 *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
  goto __pyx_L0;

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1046
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":95
 * csndlib.mus_sound_initialize()
 * 
 * cdef void clm_error_handler(int error_type, char* msg):             # <<<<<<<<<<<<<<
 *     message =  msg + ". "  +  csndlib.mus_error_type_to_string(error_type)
 *     raise SNDLibError(message)
 */

static void __pyx_f_8pysndlib_3clm_clm_error_handler(int __pyx_v_error_type, char *__pyx_v_msg) {
  PyObject *__pyx_v_message = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clm_error_handler", 1);

  /* "pysndlib/clm.pyx":96
 * 
 * cdef void clm_error_handler(int error_type, char* msg):
 *     message =  msg + ". "  +  csndlib.mus_error_type_to_string(error_type)             # <<<<<<<<<<<<<<
 *     raise SNDLibError(message)
 * 
 */
  __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_kp_u__13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_FromString(mus_error_type_to_string(__pyx_v_error_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_message = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":97
 * cdef void clm_error_handler(int error_type, char* msg):
 *     message =  msg + ". "  +  csndlib.mus_error_type_to_string(error_type)
 *     raise SNDLibError(message)             # <<<<<<<<<<<<<<
 * 
 * class SNDLibError(Exception):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SNDLibError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_message};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __PYX_ERR(0, 97, __pyx_L1_error)

  /* "pysndlib/clm.pyx":95
 * csndlib.mus_sound_initialize()
 * 
 * cdef void clm_error_handler(int error_type, char* msg):             # <<<<<<<<<<<<<<
 *     message =  msg + ". "  +  csndlib.mus_error_type_to_string(error_type)
 *     raise SNDLibError(message)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.clm_error_handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_RefNannyFinishContext();
}

/* "pysndlib/clm.pyx":106
 *     """
 * 
 *     def ___init___(self, message):             # <<<<<<<<<<<<<<
 *         super().__init__(self.message)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_11SNDLibError_1___init___(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_11SNDLibError_1___init___ = {"___init___", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_11SNDLibError_1___init___, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_11SNDLibError_1___init___(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_message = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("___init___ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("___init___", 1, 2, 2, 1); __PYX_ERR(0, 106, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "___init___") < 0)) __PYX_ERR(0, 106, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_message = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("___init___", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 106, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.SNDLibError.___init___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_11SNDLibError____init___(__pyx_self, __pyx_v_self, __pyx_v_message);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_11SNDLibError____init___(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("___init___", 1);

  /* "pysndlib/clm.pyx":107
 * 
 *     def ___init___(self, message):
 *         super().__init__(self.message)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self);
  if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 107, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)) __PYX_ERR(0, 107, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":106
 *     """
 * 
 *     def ___init___(self, message):             # <<<<<<<<<<<<<<
 *         super().__init__(self.message)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.SNDLibError.___init___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":111
 * 
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):             # <<<<<<<<<<<<<<
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 */

static PyObject *__pyx_pw_8pysndlib_3clm_1check_ndim(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_check_ndim(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_check_ndim *__pyx_optional_args) {
  PyObject *__pyx_v_dim = ((PyObject *)__pyx_int_1);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_ndim", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dim = __pyx_optional_args->dim;
    }
  }

  /* "pysndlib/clm.pyx":112
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):
 *     if arr.ndim != dim:             # <<<<<<<<<<<<<<
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_dim, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_3)) {

    /* "pysndlib/clm.pyx":113
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')             # <<<<<<<<<<<<<<
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):
 */
    __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_expecting);
    __pyx_t_4 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_expecting);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_expecting);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_dim, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_dimemsions_but_received);
    __pyx_t_4 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_dimemsions_but_received);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_dimemsions_but_received);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u_);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 113, __pyx_L1_error)

    /* "pysndlib/clm.pyx":112
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):
 *     if arr.ndim != dim:             # <<<<<<<<<<<<<<
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":111
 * 
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):             # <<<<<<<<<<<<<<
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.check_ndim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_1check_ndim(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_1check_ndim = {"check_ndim", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_1check_ndim, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_1check_ndim(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_dim = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_ndim (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_dim,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_1));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "check_ndim") < 0)) __PYX_ERR(0, 111, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_dim = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_ndim", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 111, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.check_ndim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_check_ndim(__pyx_self, __pyx_v_arr, __pyx_v_dim);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_check_ndim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_dim) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_ndim __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_ndim", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dim = __pyx_v_dim;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_arr, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.check_ndim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":115
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):             # <<<<<<<<<<<<<<
 *     if x is None:
 *         return
 */

static PyObject *__pyx_pw_8pysndlib_3clm_3check_range(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_check_range(PyObject *__pyx_v_arg, PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_check_range *__pyx_optional_args) {
  PyObject *__pyx_v_low = ((PyObject *)Py_None);
  PyObject *__pyx_v_high = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_range", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_low = __pyx_optional_args->low;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_high = __pyx_optional_args->high;
      }
    }
  }

  /* "pysndlib/clm.pyx":116
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):
 *     if x is None:             # <<<<<<<<<<<<<<
 *         return
 *     if low is not None:
 */
  __pyx_t_1 = (__pyx_v_x == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":117
 * cpdef check_range(arg: str, x, low=None, high=None):
 *     if x is None:
 *         return             # <<<<<<<<<<<<<<
 *     if low is not None:
 *         if x < low:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":116
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):
 *     if x is None:             # <<<<<<<<<<<<<<
 *         return
 *     if low is not None:
 */
  }

  /* "pysndlib/clm.pyx":118
 *     if x is None:
 *         return
 *     if low is not None:             # <<<<<<<<<<<<<<
 *         if x < low:
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 */
  __pyx_t_1 = (__pyx_v_low != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":119
 *         return
 *     if low is not None:
 *         if x < low:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_x, __pyx_v_low, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":120
 *     if low is not None:
 *         if x < low:
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')             # <<<<<<<<<<<<<<
 *     if high is not None:
 *         if x > high:
 */
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = 127;
      __Pyx_INCREF(__pyx_v_arg);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_arg) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_arg) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_arg);
      __Pyx_GIVEREF(__pyx_v_arg);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arg);
      __Pyx_INCREF(__pyx_kp_u_is_out_of_range);
      __pyx_t_3 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_is_out_of_range);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_is_out_of_range);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_x, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__14);
      __pyx_t_3 += 3;
      __Pyx_GIVEREF(__pyx_kp_u__14);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__14);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_low, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 120, __pyx_L1_error)

      /* "pysndlib/clm.pyx":119
 *         return
 *     if low is not None:
 *         if x < low:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:
 */
    }

    /* "pysndlib/clm.pyx":118
 *     if x is None:
 *         return
 *     if low is not None:             # <<<<<<<<<<<<<<
 *         if x < low:
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 */
  }

  /* "pysndlib/clm.pyx":121
 *         if x < low:
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:             # <<<<<<<<<<<<<<
 *         if x > high:
 *             raise ValueError(f'{arg} is out of range. {x} > {high}')
 */
  __pyx_t_1 = (__pyx_v_high != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":122
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:
 *         if x > high:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'{arg} is out of range. {x} > {high}')
 * 
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_x, __pyx_v_high, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":123
 *     if high is not None:
 *         if x > high:
 *             raise ValueError(f'{arg} is out of range. {x} > {high}')             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = 127;
      __Pyx_INCREF(__pyx_v_arg);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_arg) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_arg) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_arg);
      __Pyx_GIVEREF(__pyx_v_arg);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arg);
      __Pyx_INCREF(__pyx_kp_u_is_out_of_range);
      __pyx_t_3 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_is_out_of_range);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_is_out_of_range);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_x, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_kp_u__15);
      __pyx_t_3 += 3;
      __Pyx_GIVEREF(__pyx_kp_u__15);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__15);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_high, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 123, __pyx_L1_error)

      /* "pysndlib/clm.pyx":122
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:
 *         if x > high:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'{arg} is out of range. {x} > {high}')
 * 
 */
    }

    /* "pysndlib/clm.pyx":121
 *         if x < low:
 *             raise ValueError(f'{arg} is out of range. {x} < {low}')
 *     if high is not None:             # <<<<<<<<<<<<<<
 *         if x > high:
 *             raise ValueError(f'{arg} is out of range. {x} > {high}')
 */
  }

  /* "pysndlib/clm.pyx":115
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):             # <<<<<<<<<<<<<<
 *     if x is None:
 *         return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.check_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_3check_range(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_3check_range = {"check_range", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_3check_range, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_3check_range(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arg = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_low = 0;
  PyObject *__pyx_v_high = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_range (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,&__pyx_n_s_x,&__pyx_n_s_low,&__pyx_n_s_high,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("check_range", 0, 2, 4, 1); __PYX_ERR(0, 115, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_low);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_high);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "check_range") < 0)) __PYX_ERR(0, 115, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arg = ((PyObject*)values[0]);
    __pyx_v_x = values[1];
    __pyx_v_low = values[2];
    __pyx_v_high = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_range", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 115, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.check_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arg), (&PyUnicode_Type), 0, "arg", 1))) __PYX_ERR(0, 115, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_2check_range(__pyx_self, __pyx_v_arg, __pyx_v_x, __pyx_v_low, __pyx_v_high);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_2check_range(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg, PyObject *__pyx_v_x, PyObject *__pyx_v_low, PyObject *__pyx_v_high) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_range", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.low = __pyx_v_low;
  __pyx_t_2.high = __pyx_v_high;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_v_arg, __pyx_v_x, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.check_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":126
 * 
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):             # <<<<<<<<<<<<<<
 *     if arr1.shape != arr2.shape:
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 */

static PyObject *__pyx_pw_8pysndlib_3clm_5compare_shapes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_compare_shapes(PyObject *__pyx_v_arr1, PyObject *__pyx_v_arr2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("compare_shapes", 1);

  /* "pysndlib/clm.pyx":127
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):
 *     if arr1.shape != arr2.shape:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr1, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr2, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":128
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):
 *     if arr1.shape != arr2.shape:
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')             # <<<<<<<<<<<<<<
 * 
 * csndlib.mus_error_set_handler(<csndlib.mus_error_handler_t *>clm_error_handler)
 */
    __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_6 = 127;
    __Pyx_INCREF(__pyx_kp_u_ndarrays_of_unequal_shape);
    __pyx_t_5 += 26;
    __Pyx_GIVEREF(__pyx_kp_u_ndarrays_of_unequal_shape);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_ndarrays_of_unequal_shape);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_vs);
    __pyx_t_5 += 5;
    __Pyx_GIVEREF(__pyx_kp_u_vs);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_vs);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr2, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_);
    __pyx_t_5 += 1;
    __Pyx_GIVEREF(__pyx_kp_u_);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 128, __pyx_L1_error)

    /* "pysndlib/clm.pyx":127
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):
 *     if arr1.shape != arr2.shape:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":126
 * 
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):             # <<<<<<<<<<<<<<
 *     if arr1.shape != arr2.shape:
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.compare_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_5compare_shapes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_5compare_shapes = {"compare_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_5compare_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_5compare_shapes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr1 = 0;
  PyObject *__pyx_v_arr2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("compare_shapes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr1,&__pyx_n_s_arr2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("compare_shapes", 1, 2, 2, 1); __PYX_ERR(0, 126, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compare_shapes") < 0)) __PYX_ERR(0, 126, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_arr1 = values[0];
    __pyx_v_arr2 = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("compare_shapes", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 126, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.compare_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_4compare_shapes(__pyx_self, __pyx_v_arr1, __pyx_v_arr2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_4compare_shapes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr1, PyObject *__pyx_v_arr2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("compare_shapes", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_compare_shapes(__pyx_v_arr1, __pyx_v_arr2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.compare_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":133
 * 
 * 
 * cdef bint is_simple_filter(gen: mus_any):             # <<<<<<<<<<<<<<
 *     return cclm.mus_is_one_zero(gen._ptr) or cclm.mus_is_one_pole(gen._ptr) or cclm.mus_is_two_zero(gen._ptr) or cclm.mus_is_two_pole(gen._ptr)
 * 
 */

static int __pyx_f_8pysndlib_3clm_is_simple_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "pysndlib/clm.pyx":134
 * 
 * cdef bint is_simple_filter(gen: mus_any):
 *     return cclm.mus_is_one_zero(gen._ptr) or cclm.mus_is_one_pole(gen._ptr) or cclm.mus_is_two_zero(gen._ptr) or cclm.mus_is_two_pole(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = mus_is_one_zero(__pyx_v_gen->_ptr);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = mus_is_one_pole(__pyx_v_gen->_ptr);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = mus_is_two_zero(__pyx_v_gen->_ptr);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = mus_is_two_pole(__pyx_v_gen->_ptr);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":133
 * 
 * 
 * cdef bint is_simple_filter(gen: mus_any):             # <<<<<<<<<<<<<<
 *     return cclm.mus_is_one_zero(gen._ptr) or cclm.mus_is_one_pole(gen._ptr) or cclm.mus_is_two_zero(gen._ptr) or cclm.mus_is_two_pole(gen._ptr)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":159
 * 
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 *         self._cache = []
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any___cinit__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any___cinit__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "pysndlib/clm.pyx":160
 * 
 *     def __cinit__(self):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 *         self._cache = []
 *         self._inputcallback = NULL
 */
  __pyx_v_self->ptr_owner = 0;

  /* "pysndlib/clm.pyx":161
 *     def __cinit__(self):
 *         self.ptr_owner = False
 *         self._cache = []             # <<<<<<<<<<<<<<
 *         self._inputcallback = NULL
 *         self._editcallback = NULL
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_cache);
  __Pyx_DECREF(__pyx_v_self->_cache);
  __pyx_v_self->_cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":162
 *         self.ptr_owner = False
 *         self._cache = []
 *         self._inputcallback = NULL             # <<<<<<<<<<<<<<
 *         self._editcallback = NULL
 *         self._analyzecallback = NULL
 */
  __pyx_v_self->_inputcallback = NULL;

  /* "pysndlib/clm.pyx":163
 *         self._cache = []
 *         self._inputcallback = NULL
 *         self._editcallback = NULL             # <<<<<<<<<<<<<<
 *         self._analyzecallback = NULL
 *         self._synthesizecallback = NULL
 */
  __pyx_v_self->_editcallback = NULL;

  /* "pysndlib/clm.pyx":164
 *         self._inputcallback = NULL
 *         self._editcallback = NULL
 *         self._analyzecallback = NULL             # <<<<<<<<<<<<<<
 *         self._synthesizecallback = NULL
 *         self._cache = []
 */
  __pyx_v_self->_analyzecallback = NULL;

  /* "pysndlib/clm.pyx":165
 *         self._editcallback = NULL
 *         self._analyzecallback = NULL
 *         self._synthesizecallback = NULL             # <<<<<<<<<<<<<<
 *         self._cache = []
 * 
 */
  __pyx_v_self->_synthesizecallback = NULL;

  /* "pysndlib/clm.pyx":166
 *         self._analyzecallback = NULL
 *         self._synthesizecallback = NULL
 *         self._cache = []             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_cache);
  __Pyx_DECREF(__pyx_v_self->_cache);
  __pyx_v_self->_cache = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":159
 * 
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 *         self._cache = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":169
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL and self.ptr_owner is True:
 *             cclm.mus_free(self._ptr)
 */

/* Python wrapper */
static void __pyx_pw_8pysndlib_3clm_7mus_any_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_8pysndlib_3clm_7mus_any_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_8pysndlib_3clm_7mus_any_2__dealloc__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_8pysndlib_3clm_7mus_any_2__dealloc__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "pysndlib/clm.pyx":170
 * 
 *     def __dealloc__(self):
 *         if self._ptr is not NULL and self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *             cclm.mus_free(self._ptr)
 *             self._ptr = NULL
 */
  __pyx_t_2 = (__pyx_v_self->_ptr != NULL);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->ptr_owner == 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":171
 *     def __dealloc__(self):
 *         if self._ptr is not NULL and self.ptr_owner is True:
 *             cclm.mus_free(self._ptr)             # <<<<<<<<<<<<<<
 *             self._ptr = NULL
 * 
 */
    mus_free(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":172
 *         if self._ptr is not NULL and self.ptr_owner is True:
 *             cclm.mus_free(self._ptr)
 *             self._ptr = NULL             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_self->_ptr = NULL;

    /* "pysndlib/clm.pyx":170
 * 
 *     def __dealloc__(self):
 *         if self._ptr is not NULL and self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *             cclm.mus_free(self._ptr)
 *             self._ptr = NULL
 */
  }

  /* "pysndlib/clm.pyx":169
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL and self.ptr_owner is True:
 *             cclm.mus_free(self._ptr)
 */

  /* function exit code */
}

/* "pysndlib/clm.pyx":175
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         # prevent accidental instantiation from normal python code
 *         # since we cannot pass a struct pointer into a python constructor.
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_4__init__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_4__init__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysndlib/clm.pyx":178
 *         # prevent accidental instantiation from normal python code
 *         # since we cannot pass a struct pointer into a python constructor.
 *         raise TypeError("this class cannot be instantiated directly.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 178, __pyx_L1_error)

  /* "pysndlib/clm.pyx":175
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         # prevent accidental instantiation from normal python code
 *         # since we cannot pass a struct pointer into a python constructor.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":182
 * 
 *     @staticmethod
 *     cdef mus_any from_ptr(cclm.mus_any *_ptr, bint owner=True, int length=0): #adding brkpoints as want to know number of brkpoints in envelope. kind of hacky             # <<<<<<<<<<<<<<
 *         """
 *         factory function to create mus_any objects from
 */

static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_7mus_any_from_ptr(mus_any *__pyx_v__ptr, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)1);
  int __pyx_v_length = ((int)0);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_wrapper = 0;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_ptr", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_length = __pyx_optional_args->length;
      }
    }
  }

  /* "pysndlib/clm.pyx":194
 *         """
 *         # fast call to __new__() that bypasses the __init__() constructor.
 *         cdef mus_any wrapper = mus_any.__new__(mus_any)             # <<<<<<<<<<<<<<
 *         wrapper._ptr = _ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_8pysndlib_3clm_mus_any(((PyTypeObject *)__pyx_ptype_8pysndlib_3clm_mus_any), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_wrapper = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":195
 *         # fast call to __new__() that bypasses the __init__() constructor.
 *         cdef mus_any wrapper = mus_any.__new__(mus_any)
 *         wrapper._ptr = _ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 *         if cclm.mus_data_exists(wrapper._ptr):
 */
  __pyx_v_wrapper->_ptr = __pyx_v__ptr;

  /* "pysndlib/clm.pyx":196
 *         cdef mus_any wrapper = mus_any.__new__(mus_any)
 *         wrapper._ptr = _ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 *         if cclm.mus_data_exists(wrapper._ptr):
 *             wrapper.set_up_data(length=length)
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "pysndlib/clm.pyx":197
 *         wrapper._ptr = _ptr
 *         wrapper.ptr_owner = owner
 *         if cclm.mus_data_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             wrapper.set_up_data(length=length)
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):
 */
  __pyx_t_2 = mus_data_exists(__pyx_v_wrapper->_ptr);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":198
 *         wrapper.ptr_owner = owner
 *         if cclm.mus_data_exists(wrapper._ptr):
 *             wrapper.set_up_data(length=length)             # <<<<<<<<<<<<<<
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.length = __pyx_v_length;
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_wrapper->__pyx_vtab)->set_up_data(__pyx_v_wrapper, 0, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":197
 *         wrapper._ptr = _ptr
 *         wrapper.ptr_owner = owner
 *         if cclm.mus_data_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             wrapper.set_up_data(length=length)
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):
 */
  }

  /* "pysndlib/clm.pyx":199
 *         if cclm.mus_data_exists(wrapper._ptr):
 *             wrapper.set_up_data(length=length)
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             # do not setup this for polywave or polyshape
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 */
  __pyx_t_2 = mus_xcoeffs_exists(__pyx_v_wrapper->_ptr);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":201
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):             # <<<<<<<<<<<<<<
 *                 wrapper.set_up_xcoeffs()
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):
 */
    __pyx_t_4 = mus_is_polywave(__pyx_v_wrapper->_ptr);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = mus_is_polyshape(__pyx_v_wrapper->_ptr);
    __pyx_t_2 = __pyx_t_4;
    __pyx_L6_bool_binop_done:;
    __pyx_t_4 = (!__pyx_t_2);
    if (__pyx_t_4) {

      /* "pysndlib/clm.pyx":202
 *             # do not setup this for polywave or polyshape
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_xcoeffs()             # <<<<<<<<<<<<<<
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_wrapper->__pyx_vtab)->set_up_xcoeffs(__pyx_v_wrapper, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":201
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):             # <<<<<<<<<<<<<<
 *                 wrapper.set_up_xcoeffs()
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):
 */
    }

    /* "pysndlib/clm.pyx":199
 *         if cclm.mus_data_exists(wrapper._ptr):
 *             wrapper.set_up_data(length=length)
 *         if cclm.mus_xcoeffs_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             # do not setup this for polywave or polyshape
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 */
  }

  /* "pysndlib/clm.pyx":203
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_xcoeffs()
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             # do not setup this for polywave or polyshape
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 */
  __pyx_t_4 = mus_ycoeffs_exists(__pyx_v_wrapper->_ptr);
  if (__pyx_t_4) {

    /* "pysndlib/clm.pyx":205
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):             # <<<<<<<<<<<<<<
 *                 wrapper.set_up_ycoeffs()
 *         if is_phase_vocoder(wrapper):
 */
    __pyx_t_2 = mus_is_polywave(__pyx_v_wrapper->_ptr);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_4 = __pyx_t_2;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_2 = mus_is_polyshape(__pyx_v_wrapper->_ptr);
    __pyx_t_4 = __pyx_t_2;
    __pyx_L10_bool_binop_done:;
    __pyx_t_2 = (!__pyx_t_4);
    if (__pyx_t_2) {

      /* "pysndlib/clm.pyx":206
 *             # do not setup this for polywave or polyshape
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_ycoeffs()             # <<<<<<<<<<<<<<
 *         if is_phase_vocoder(wrapper):
 *             wrapper.set_up_pv_data()
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_wrapper->__pyx_vtab)->set_up_ycoeffs(__pyx_v_wrapper, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":205
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):
 *             # do not setup this for polywave or polyshape
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):             # <<<<<<<<<<<<<<
 *                 wrapper.set_up_ycoeffs()
 *         if is_phase_vocoder(wrapper):
 */
    }

    /* "pysndlib/clm.pyx":203
 *             if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_xcoeffs()
 *         if cclm.mus_ycoeffs_exists(wrapper._ptr):             # <<<<<<<<<<<<<<
 *             # do not setup this for polywave or polyshape
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 */
  }

  /* "pysndlib/clm.pyx":207
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_ycoeffs()
 *         if is_phase_vocoder(wrapper):             # <<<<<<<<<<<<<<
 *             wrapper.set_up_pv_data()
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_is_phase_vocoder(__pyx_v_wrapper, 0); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":208
 *                 wrapper.set_up_ycoeffs()
 *         if is_phase_vocoder(wrapper):
 *             wrapper.set_up_pv_data()             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_wrapper->__pyx_vtab)->set_up_pv_data(__pyx_v_wrapper, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":207
 *            if not (cclm.mus_is_polywave(wrapper._ptr) or cclm.mus_is_polyshape(wrapper._ptr)):
 *                 wrapper.set_up_ycoeffs()
 *         if is_phase_vocoder(wrapper):             # <<<<<<<<<<<<<<
 *             wrapper.set_up_pv_data()
 * 
 */
  }

  /* "pysndlib/clm.pyx":210
 *             wrapper.set_up_pv_data()
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cpdef cache_append(self, obj):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":182
 * 
 *     @staticmethod
 *     cdef mus_any from_ptr(cclm.mus_any *_ptr, bint owner=True, int length=0): #adding brkpoints as want to know number of brkpoints in envelope. kind of hacky             # <<<<<<<<<<<<<<
 *         """
 *         factory function to create mus_any objects from
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":212
 *         return wrapper
 * 
 *     cpdef cache_append(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_7cache_append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_cache_append(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cache_append", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cache_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_7cache_append)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":216
 *         :meta private:
 *         """
 *         self._cache.append(obj)             # <<<<<<<<<<<<<<
 * 
 *     cpdef cache_extend(self, obj):
 */
  if (unlikely(__pyx_v_self->_cache == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 216, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_cache, __pyx_v_obj); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 216, __pyx_L1_error)

  /* "pysndlib/clm.pyx":212
 *         return wrapper
 * 
 *     cpdef cache_append(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_7cache_append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_6cache_append, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_7cache_append = {"cache_append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_7cache_append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_6cache_append};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_7cache_append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cache_append (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cache_append") < 0)) __PYX_ERR(0, 212, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cache_append", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 212, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_6cache_append(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_6cache_append(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cache_append", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_cache_append(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":218
 *         self._cache.append(obj)
 * 
 *     cpdef cache_extend(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9cache_extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_cache_extend(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cache_extend", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cache_extend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_9cache_extend)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":222
 *         :meta private:
 *         """
 *         self._cache.extend(obj)             # <<<<<<<<<<<<<<
 * 
 *     # this stuff with view.array is to work around an apparent bug when automatic string handling is turned on
 */
  if (unlikely(__pyx_v_self->_cache == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend");
    __PYX_ERR(0, 222, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_self->_cache, __pyx_v_obj); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 222, __pyx_L1_error)

  /* "pysndlib/clm.pyx":218
 *         self._cache.append(obj)
 * 
 *     cpdef cache_extend(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9cache_extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_8cache_extend, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_9cache_extend = {"cache_extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_9cache_extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_8cache_extend};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9cache_extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cache_extend (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cache_extend") < 0)) __PYX_ERR(0, 218, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cache_extend", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_8cache_extend(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8cache_extend(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cache_extend", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_cache_extend(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.cache_extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":226
 *     # this stuff with view.array is to work around an apparent bug when automatic string handling is turned on
 *     # https://github.com/cython/cython/issues/4521
 *     cpdef set_up_data(self , cython.int length=0):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11set_up_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data *__pyx_optional_args) {
  int __pyx_v_length = ((int)0);
  struct __pyx_array_obj *__pyx_v_arr = 0;
  mus_long_t __pyx_v_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_data", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_length = __pyx_optional_args->length;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_up_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_11set_up_data)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":230
 *         :meta private:
 *         """
 *         cdef view.array arr = None             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)
 * 
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_arr = ((struct __pyx_array_obj *)Py_None);

  /* "pysndlib/clm.pyx":231
 *         """
 *         cdef view.array arr = None
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *         if cclm.mus_is_env(self._ptr):
 */
  __pyx_v_size = mus_length(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":233
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)
 * 
 *         if cclm.mus_is_env(self._ptr):             # <<<<<<<<<<<<<<
 *             size = length
 * 
 */
  __pyx_t_7 = mus_is_env(__pyx_v_self->_ptr);
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":234
 * 
 *         if cclm.mus_is_env(self._ptr):
 *             size = length             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_size = __pyx_v_length;

    /* "pysndlib/clm.pyx":233
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)
 * 
 *         if cclm.mus_is_env(self._ptr):             # <<<<<<<<<<<<<<
 *             size = length
 * 
 */
  }

  /* "pysndlib/clm.pyx":237
 * 
 * 
 *         if size > 0:             # <<<<<<<<<<<<<<
 *             self._data_ptr = cclm.mus_data(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 */
  __pyx_t_7 = (__pyx_v_size > 0);
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":238
 * 
 *         if size > 0:
 *             self._data_ptr = cclm.mus_data(self._ptr)             # <<<<<<<<<<<<<<
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._data_ptr
 */
    __pyx_v_self->_data_ptr = mus_data(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":239
 *         if size > 0:
 *             self._data_ptr = cclm.mus_data(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *             arr.data = <char*>self._data_ptr
 *             self._data = np.asarray(arr)
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error);
    __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_4) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_4) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":240
 *             self._data_ptr = cclm.mus_data(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._data_ptr             # <<<<<<<<<<<<<<
 *             self._data = np.asarray(arr)
 *         else:
 */
    __pyx_v_arr->data = ((char *)__pyx_v_self->_data_ptr);

    /* "pysndlib/clm.pyx":241
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._data_ptr
 *             self._data = np.asarray(arr)             # <<<<<<<<<<<<<<
 *         else:
 *             self._data = None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_data);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_data);
    __pyx_v_self->_data = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":237
 * 
 * 
 *         if size > 0:             # <<<<<<<<<<<<<<
 *             self._data_ptr = cclm.mus_data(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 */
    goto __pyx_L4;
  }

  /* "pysndlib/clm.pyx":243
 *             self._data = np.asarray(arr)
 *         else:
 *             self._data = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_up_xcoeffs(self):
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_data);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_data);
    __pyx_v_self->_data = ((PyArrayObject *)Py_None);
  }
  __pyx_L4:;

  /* "pysndlib/clm.pyx":226
 *     # this stuff with view.array is to work around an apparent bug when automatic string handling is turned on
 *     # https://github.com/cython/cython/issues/4521
 *     cpdef set_up_data(self , cython.int length=0):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11set_up_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_10set_up_data, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_11set_up_data = {"set_up_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_11set_up_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_10set_up_data};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11set_up_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_length;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_up_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_up_data") < 0)) __PYX_ERR(0, 226, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_length = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error)
    } else {
      __pyx_v_length = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_up_data", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10set_up_data(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v_length);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10set_up_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_data", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.length = __pyx_v_length;
  __pyx_t_1 = __pyx_vtabptr_8pysndlib_3clm_mus_any->set_up_data(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":245
 *             self._data = None
 * 
 *     cpdef set_up_xcoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13set_up_xcoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_xcoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch) {
  mus_long_t __pyx_v_size;
  struct __pyx_array_obj *__pyx_v_arr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_xcoeffs", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_up_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_13set_up_xcoeffs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":249
 *         :meta private:
 *         """
 *         cdef cclm.mus_long_t size = 0             # <<<<<<<<<<<<<<
 *         cdef view.array arr = None
 *         #if simple filter the size will always be 3 and we do not want to
 */
  __pyx_v_size = 0;

  /* "pysndlib/clm.pyx":250
 *         """
 *         cdef cclm.mus_long_t size = 0
 *         cdef view.array arr = None             # <<<<<<<<<<<<<<
 *         #if simple filter the size will always be 3 and we do not want to
 *         #allocate a buffer
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_arr = ((struct __pyx_array_obj *)Py_None);

  /* "pysndlib/clm.pyx":255
 *         # in other cases mus_order will be size and we do want to allocate
 * 
 *         if is_simple_filter(self):             # <<<<<<<<<<<<<<
 *             size = 3
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_is_simple_filter(__pyx_v_self); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":256
 * 
 *         if is_simple_filter(self):
 *             size = 3             # <<<<<<<<<<<<<<
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 */
    __pyx_v_size = 3;

    /* "pysndlib/clm.pyx":257
 *         if is_simple_filter(self):
 *             size = 3
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)             # <<<<<<<<<<<<<<
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._xcoeffs_ptr
 */
    __pyx_v_self->_xcoeffs_ptr = mus_xcoeffs(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":258
 *             size = 3
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *             arr.data = <char*>self._xcoeffs_ptr
 *             self._xcoeffs = np.asarray(arr)
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error);
    __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":259
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._xcoeffs_ptr             # <<<<<<<<<<<<<<
 *             self._xcoeffs = np.asarray(arr)
 *             #print('setup xcoeffs', size,is_simple_filter(self), self._xcoeffs, arr)
 */
    __pyx_v_arr->data = ((char *)__pyx_v_self->_xcoeffs_ptr);

    /* "pysndlib/clm.pyx":260
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._xcoeffs_ptr
 *             self._xcoeffs = np.asarray(arr)             # <<<<<<<<<<<<<<
 *             #print('setup xcoeffs', size,is_simple_filter(self), self._xcoeffs, arr)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_xcoeffs);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_xcoeffs);
    __pyx_v_self->_xcoeffs = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":255
 *         # in other cases mus_order will be size and we do want to allocate
 * 
 *         if is_simple_filter(self):             # <<<<<<<<<<<<<<
 *             size = 3
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":263
 *             #print('setup xcoeffs', size,is_simple_filter(self), self._xcoeffs, arr)
 *         else:
 *             size = cclm.mus_order(self._ptr)             # <<<<<<<<<<<<<<
 *             #print(size)
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)
 */
  /*else*/ {
    __pyx_v_size = mus_order(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":265
 *             size = cclm.mus_order(self._ptr)
 *             #print(size)
 *             self._xcoeffs_ptr = cclm.mus_xcoeffs(self._ptr)             # <<<<<<<<<<<<<<
 *             # setting allocate_buffer to false because array should be already allocated (?_)
 *             # this means tis could be simplified to just us esize if simple filter all the rest would besame
 */
    __pyx_v_self->_xcoeffs_ptr = mus_xcoeffs(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":268
 *             # setting allocate_buffer to false because array should be already allocated (?_)
 *             # this means tis could be simplified to just us esize if simple filter all the rest would besame
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *             arr.data = <char*>self._xcoeffs_ptr
 *             self._xcoeffs = np.asarray(arr)
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error);
    __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_1) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":269
 *             # this means tis could be simplified to just us esize if simple filter all the rest would besame
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._xcoeffs_ptr             # <<<<<<<<<<<<<<
 *             self._xcoeffs = np.asarray(arr)
 * 
 */
    __pyx_v_arr->data = ((char *)__pyx_v_self->_xcoeffs_ptr);

    /* "pysndlib/clm.pyx":270
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._xcoeffs_ptr
 *             self._xcoeffs = np.asarray(arr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_up_ycoeffs(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_arr)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_xcoeffs);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_xcoeffs);
    __pyx_v_self->_xcoeffs = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":245
 *             self._data = None
 * 
 *     cpdef set_up_xcoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_xcoeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13set_up_xcoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_12set_up_xcoeffs, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_13set_up_xcoeffs = {"set_up_xcoeffs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_13set_up_xcoeffs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_12set_up_xcoeffs};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13set_up_xcoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_up_xcoeffs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("set_up_xcoeffs", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_up_xcoeffs", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12set_up_xcoeffs(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12set_up_xcoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_xcoeffs", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_set_up_xcoeffs(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_xcoeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":272
 *             self._xcoeffs = np.asarray(arr)
 * 
 *     cpdef set_up_ycoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15set_up_ycoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_ycoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch) {
  mus_long_t __pyx_v_size;
  struct __pyx_array_obj *__pyx_v_arr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_ycoeffs", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_up_ycoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_15set_up_ycoeffs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":276
 *         :meta private:
 *         """
 *         cdef cclm.mus_long_t size = 0             # <<<<<<<<<<<<<<
 *         cdef view.array arr = None
 *         #if simple filter the size will always be 3 and we do not want to
 */
  __pyx_v_size = 0;

  /* "pysndlib/clm.pyx":277
 *         """
 *         cdef cclm.mus_long_t size = 0
 *         cdef view.array arr = None             # <<<<<<<<<<<<<<
 *         #if simple filter the size will always be 3 and we do not want to
 *         #allocate a buffer
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_arr = ((struct __pyx_array_obj *)Py_None);

  /* "pysndlib/clm.pyx":282
 *         # in other cases mus_order will be size and we do want to allocate
 * 
 *         if is_simple_filter(self):             # <<<<<<<<<<<<<<
 *             size = 3
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_is_simple_filter(__pyx_v_self); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":283
 * 
 *         if is_simple_filter(self):
 *             size = 3             # <<<<<<<<<<<<<<
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 */
    __pyx_v_size = 3;

    /* "pysndlib/clm.pyx":284
 *         if is_simple_filter(self):
 *             size = 3
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)             # <<<<<<<<<<<<<<
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr
 */
    __pyx_v_self->_ycoeffs_ptr = mus_ycoeffs(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":285
 *             size = 3
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *             arr.data = <char*>self._ycoeffs_ptr
 *             self._ycoeffs = np.asarray(arr)
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error);
    __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":286
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr             # <<<<<<<<<<<<<<
 *             self._ycoeffs = np.asarray(arr)
 *            # print('setup ycoeffs',  size,is_simple_filter(self), self._xcoeffs, arr)
 */
    __pyx_v_arr->data = ((char *)__pyx_v_self->_ycoeffs_ptr);

    /* "pysndlib/clm.pyx":287
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr
 *             self._ycoeffs = np.asarray(arr)             # <<<<<<<<<<<<<<
 *            # print('setup ycoeffs',  size,is_simple_filter(self), self._xcoeffs, arr)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_ycoeffs);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_ycoeffs);
    __pyx_v_self->_ycoeffs = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":282
 *         # in other cases mus_order will be size and we do want to allocate
 * 
 *         if is_simple_filter(self):             # <<<<<<<<<<<<<<
 *             size = 3
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":290
 *            # print('setup ycoeffs',  size,is_simple_filter(self), self._xcoeffs, arr)
 *         else:
 *             size = cclm.mus_order(self._ptr)             # <<<<<<<<<<<<<<
 *             #print(size)
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 */
  /*else*/ {
    __pyx_v_size = mus_order(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":292
 *             size = cclm.mus_order(self._ptr)
 *             #print(size)
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)             # <<<<<<<<<<<<<<
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr
 */
    __pyx_v_self->_ycoeffs_ptr = mus_ycoeffs(__pyx_v_self->_ptr);

    /* "pysndlib/clm.pyx":293
 *             #print(size)
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *             arr.data = <char*>self._ycoeffs_ptr
 *             self._ycoeffs = np.asarray(arr)
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error);
    __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_1) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":294
 *             self._ycoeffs_ptr = cclm.mus_ycoeffs(self._ptr)
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr             # <<<<<<<<<<<<<<
 *             self._ycoeffs = np.asarray(arr)
 * 
 */
    __pyx_v_arr->data = ((char *)__pyx_v_self->_ycoeffs_ptr);

    /* "pysndlib/clm.pyx":295
 *             arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *             arr.data = <char*>self._ycoeffs_ptr
 *             self._ycoeffs = np.asarray(arr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_arr)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_ycoeffs);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_ycoeffs);
    __pyx_v_self->_ycoeffs = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":272
 *             self._xcoeffs = np.asarray(arr)
 * 
 *     cpdef set_up_ycoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_ycoeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15set_up_ycoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_14set_up_ycoeffs, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_15set_up_ycoeffs = {"set_up_ycoeffs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_15set_up_ycoeffs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_14set_up_ycoeffs};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15set_up_ycoeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_up_ycoeffs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("set_up_ycoeffs", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_up_ycoeffs", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_14set_up_ycoeffs(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_14set_up_ycoeffs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_ycoeffs", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_set_up_ycoeffs(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_ycoeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":300
 * 
 * 
 *     cpdef set_up_pv_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_17set_up_pv_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_set_up_pv_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch) {
  mus_long_t __pyx_v_size;
  struct __pyx_array_obj *__pyx_v_pvai = 0;
  struct __pyx_array_obj *__pyx_v_pva = 0;
  struct __pyx_array_obj *__pyx_v_pvf = 0;
  struct __pyx_array_obj *__pyx_v_pvp = 0;
  struct __pyx_array_obj *__pyx_v_pvpi = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_pv_data", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_up_pv_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_17set_up_pv_data)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":304
 *         :meta private:
 *         """
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *         self._pv_amp_increments_ptr = cclm.mus_phase_vocoder_amp_increments(self._ptr)
 */
  __pyx_v_size = mus_length(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":306
 *         cdef cclm.mus_long_t size = cclm.mus_length(self._ptr)
 * 
 *         self._pv_amp_increments_ptr = cclm.mus_phase_vocoder_amp_increments(self._ptr)             # <<<<<<<<<<<<<<
 *         cdef view.array pvai = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvai.data = <char*>self._pv_amp_increments_ptr
 */
  __pyx_v_self->_pv_amp_increments_ptr = mus_phase_vocoder_amp_increments(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":307
 * 
 *         self._pv_amp_increments_ptr = cclm.mus_phase_vocoder_amp_increments(self._ptr)
 *         cdef view.array pvai = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         pvai.data = <char*>self._pv_amp_increments_ptr
 *         self._pv_amp_increments = np.asarray(pvai)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pvai = ((struct __pyx_array_obj *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":308
 *         self._pv_amp_increments_ptr = cclm.mus_phase_vocoder_amp_increments(self._ptr)
 *         cdef view.array pvai = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvai.data = <char*>self._pv_amp_increments_ptr             # <<<<<<<<<<<<<<
 *         self._pv_amp_increments = np.asarray(pvai)
 *         self._pv_amp_increments.fill(0.0)
 */
  __pyx_v_pvai->data = ((char *)__pyx_v_self->_pv_amp_increments_ptr);

  /* "pysndlib/clm.pyx":309
 *         cdef view.array pvai = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvai.data = <char*>self._pv_amp_increments_ptr
 *         self._pv_amp_increments = np.asarray(pvai)             # <<<<<<<<<<<<<<
 *         self._pv_amp_increments.fill(0.0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_pvai)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pv_amp_increments);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pv_amp_increments);
  __pyx_v_self->_pv_amp_increments = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":310
 *         pvai.data = <char*>self._pv_amp_increments_ptr
 *         self._pv_amp_increments = np.asarray(pvai)
 *         self._pv_amp_increments.fill(0.0)             # <<<<<<<<<<<<<<
 * 
 *         self._pv_amps_ptr = cclm.mus_phase_vocoder_amps(self._ptr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_pv_amp_increments), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_float_0_0};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":312
 *         self._pv_amp_increments.fill(0.0)
 * 
 *         self._pv_amps_ptr = cclm.mus_phase_vocoder_amps(self._ptr)             # <<<<<<<<<<<<<<
 *         cdef view.array pva = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pva.data = <char*>self._pv_amps_ptr
 */
  __pyx_v_self->_pv_amps_ptr = mus_phase_vocoder_amps(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":313
 * 
 *         self._pv_amps_ptr = cclm.mus_phase_vocoder_amps(self._ptr)
 *         cdef view.array pva = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         pva.data = <char*>self._pv_amps_ptr
 *         self._pv_amps = np.asarray(pva)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__Pyx_div_mus_long_t(__pyx_v_size, 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_1) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_pva = ((struct __pyx_array_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":314
 *         self._pv_amps_ptr = cclm.mus_phase_vocoder_amps(self._ptr)
 *         cdef view.array pva = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pva.data = <char*>self._pv_amps_ptr             # <<<<<<<<<<<<<<
 *         self._pv_amps = np.asarray(pva)
 *         self._pv_amps.fill(0.0)
 */
  __pyx_v_pva->data = ((char *)__pyx_v_self->_pv_amps_ptr);

  /* "pysndlib/clm.pyx":315
 *         cdef view.array pva = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pva.data = <char*>self._pv_amps_ptr
 *         self._pv_amps = np.asarray(pva)             # <<<<<<<<<<<<<<
 *         self._pv_amps.fill(0.0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_pva)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pv_amps);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pv_amps);
  __pyx_v_self->_pv_amps = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":316
 *         pva.data = <char*>self._pv_amps_ptr
 *         self._pv_amps = np.asarray(pva)
 *         self._pv_amps.fill(0.0)             # <<<<<<<<<<<<<<
 * 
 *         self._pv_freqs_ptr = cclm.mus_phase_vocoder_freqs(self._ptr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_pv_amps), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_float_0_0};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":318
 *         self._pv_amps.fill(0.0)
 * 
 *         self._pv_freqs_ptr = cclm.mus_phase_vocoder_freqs(self._ptr)             # <<<<<<<<<<<<<<
 *         cdef view.array pvf = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvf.data = <char*>self._pv_freqs_ptr
 */
  __pyx_v_self->_pv_freqs_ptr = mus_phase_vocoder_freqs(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":319
 * 
 *         self._pv_freqs_ptr = cclm.mus_phase_vocoder_freqs(self._ptr)
 *         cdef view.array pvf = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         pvf.data = <char*>self._pv_freqs_ptr
 *         self._pv_freqs = np.asarray(pvf)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pvf = ((struct __pyx_array_obj *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":320
 *         self._pv_freqs_ptr = cclm.mus_phase_vocoder_freqs(self._ptr)
 *         cdef view.array pvf = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvf.data = <char*>self._pv_freqs_ptr             # <<<<<<<<<<<<<<
 *         self._pv_freqs = np.asarray(pvf)
 *         self._pv_freqs.fill(0.0)
 */
  __pyx_v_pvf->data = ((char *)__pyx_v_self->_pv_freqs_ptr);

  /* "pysndlib/clm.pyx":321
 *         cdef view.array pvf = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvf.data = <char*>self._pv_freqs_ptr
 *         self._pv_freqs = np.asarray(pvf)             # <<<<<<<<<<<<<<
 *         self._pv_freqs.fill(0.0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_pvf)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pv_freqs);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pv_freqs);
  __pyx_v_self->_pv_freqs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":322
 *         pvf.data = <char*>self._pv_freqs_ptr
 *         self._pv_freqs = np.asarray(pvf)
 *         self._pv_freqs.fill(0.0)             # <<<<<<<<<<<<<<
 * 
 *         self._pv_phases_ptr = cclm.mus_phase_vocoder_phases(self._ptr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_pv_freqs), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_float_0_0};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":324
 *         self._pv_freqs.fill(0.0)
 * 
 *         self._pv_phases_ptr = cclm.mus_phase_vocoder_phases(self._ptr)             # <<<<<<<<<<<<<<
 *         cdef view.array pvp = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvp.data = <char*>self._pv_phases_ptr
 */
  __pyx_v_self->_pv_phases_ptr = mus_phase_vocoder_phases(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":325
 * 
 *         self._pv_phases_ptr = cclm.mus_phase_vocoder_phases(self._ptr)
 *         cdef view.array pvp = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         pvp.data = <char*>self._pv_phases_ptr
 *         self._pv_phases = np.asarray(pvp)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__Pyx_div_mus_long_t(__pyx_v_size, 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_itemsize, __pyx_t_1) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_pvp = ((struct __pyx_array_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":326
 *         self._pv_phases_ptr = cclm.mus_phase_vocoder_phases(self._ptr)
 *         cdef view.array pvp = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvp.data = <char*>self._pv_phases_ptr             # <<<<<<<<<<<<<<
 *         self._pv_phases = np.asarray(pvp)
 *         self._pv_phases.fill(0.0)
 */
  __pyx_v_pvp->data = ((char *)__pyx_v_self->_pv_phases_ptr);

  /* "pysndlib/clm.pyx":327
 *         cdef view.array pvp = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvp.data = <char*>self._pv_phases_ptr
 *         self._pv_phases = np.asarray(pvp)             # <<<<<<<<<<<<<<
 *         self._pv_phases.fill(0.0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_pvp)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pv_phases);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pv_phases);
  __pyx_v_self->_pv_phases = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":328
 *         pvp.data = <char*>self._pv_phases_ptr
 *         self._pv_phases = np.asarray(pvp)
 *         self._pv_phases.fill(0.0)             # <<<<<<<<<<<<<<
 * 
 *         self._pv_phase_increments_ptr = cclm.mus_phase_vocoder_phase_increments(self._ptr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_pv_phases), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_float_0_0};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":330
 *         self._pv_phases.fill(0.0)
 * 
 *         self._pv_phase_increments_ptr = cclm.mus_phase_vocoder_phase_increments(self._ptr)             # <<<<<<<<<<<<<<
 *         cdef view.array pvpi = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvpi.data = <char*>self._pv_phase_increments_ptr
 */
  __pyx_v_self->_pv_phase_increments_ptr = mus_phase_vocoder_phase_increments(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":331
 * 
 *         self._pv_phase_increments_ptr = cclm.mus_phase_vocoder_phase_increments(self._ptr)
 *         cdef view.array pvpi = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         pvpi.data = <char*>self._pv_phase_increments_ptr
 *         self._pv_phase_increments = np.asarray(pvpi)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__Pyx_div_mus_long_t(__pyx_v_size, 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pvpi = ((struct __pyx_array_obj *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":332
 *         self._pv_phase_increments_ptr = cclm.mus_phase_vocoder_phase_increments(self._ptr)
 *         cdef view.array pvpi = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvpi.data = <char*>self._pv_phase_increments_ptr             # <<<<<<<<<<<<<<
 *         self._pv_phase_increments = np.asarray(pvpi)
 *         self._pv_phase_increments.fill(0.0)
 */
  __pyx_v_pvpi->data = ((char *)__pyx_v_self->_pv_phase_increments_ptr);

  /* "pysndlib/clm.pyx":333
 *         cdef view.array pvpi = view.array(shape=(size // 2,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *         pvpi.data = <char*>self._pv_phase_increments_ptr
 *         self._pv_phase_increments = np.asarray(pvpi)             # <<<<<<<<<<<<<<
 *         self._pv_phase_increments.fill(0.0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_pvpi)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_pv_phase_increments);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_pv_phase_increments);
  __pyx_v_self->_pv_phase_increments = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":334
 *         pvpi.data = <char*>self._pv_phase_increments_ptr
 *         self._pv_phase_increments = np.asarray(pvpi)
 *         self._pv_phase_increments.fill(0.0)             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, arg1=0.0, arg2=0.0):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_pv_phase_increments), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_float_0_0};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":300
 * 
 * 
 *     cpdef set_up_pv_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_pv_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pvai);
  __Pyx_XDECREF((PyObject *)__pyx_v_pva);
  __Pyx_XDECREF((PyObject *)__pyx_v_pvf);
  __Pyx_XDECREF((PyObject *)__pyx_v_pvp);
  __Pyx_XDECREF((PyObject *)__pyx_v_pvpi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_17set_up_pv_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_7mus_any_16set_up_pv_data, "\n        :meta private:\n        ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_17set_up_pv_data = {"set_up_pv_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_17set_up_pv_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_7mus_any_16set_up_pv_data};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_17set_up_pv_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_up_pv_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("set_up_pv_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_up_pv_data", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_16set_up_pv_data(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_16set_up_pv_data(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_up_pv_data", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_set_up_pv_data(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.set_up_pv_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":336
 *         self._pv_phase_increments.fill(0.0)
 * 
 *     def __call__(self, arg1=0.0, arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_19__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_19__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arg1 = 0;
  PyObject *__pyx_v_arg2 = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg1,&__pyx_n_s_arg2,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_float_0_0));
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_float_0_0));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg1);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg2);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 336, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arg1 = values[0];
    __pyx_v_arg2 = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 336, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_18__call__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v_arg1, __pyx_v_arg2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_18__call__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  mus_float_t __pyx_t_1;
  mus_float_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 1);

  /* "pysndlib/clm.pyx":337
 * 
 *     def __call__(self, arg1=0.0, arg2=0.0):
 *         return cclm.mus_run(self._ptr, arg1,arg2)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_arg1); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_arg2); if (unlikely((__pyx_t_2 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(mus_run(__pyx_v_self->_ptr, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":336
 *         self._pv_phase_increments.fill(0.0)
 * 
 *     def __call__(self, arg1=0.0, arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":339
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_21__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_21__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_20__str__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_20__str__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 1);

  /* "pysndlib/clm.pyx":340
 * 
 *     def __str__(self):
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'             # <<<<<<<<<<<<<<
 * 
 *     cpdef mus_reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__17);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__17);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__17);
  __pyx_t_4 = __Pyx_PyUnicode_FromString(mus_describe(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":339
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":342
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 *     cpdef mus_reset(self):             # <<<<<<<<<<<<<<
 *         cclm.mus_reset(self._ptr)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_23mus_reset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_reset", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mus_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_23mus_reset)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":343
 * 
 *     cpdef mus_reset(self):
 *         cclm.mus_reset(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):
 */
  mus_reset(__pyx_v_self->_ptr);

  /* "pysndlib/clm.pyx":342
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 *     cpdef mus_reset(self):             # <<<<<<<<<<<<<<
 *         cclm.mus_reset(self._ptr)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_23mus_reset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_23mus_reset = {"mus_reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_23mus_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_23mus_reset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("mus_reset", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "mus_reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_22mus_reset(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_22mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_reset", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_7mus_any_mus_reset(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":345
 *         cclm.mus_reset(self._ptr)
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_25next(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_7mus_any_next(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next *__pyx_optional_args) {
  double __pyx_v_arg1 = ((double)0.0);
  double __pyx_v_arg2 = ((double)0.0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arg1 = __pyx_optional_args->arg1;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_arg2 = __pyx_optional_args->arg2;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_8pysndlib_3clm_7mus_any_25next)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_arg1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyFloat_FromDouble(__pyx_v_arg2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysndlib/clm.pyx":346
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):
 *         return cclm.mus_run(self._ptr, arg1,arg2)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_run(__pyx_v_self->_ptr, __pyx_v_arg1, __pyx_v_arg2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":345
 *         cclm.mus_reset(self._ptr)
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_25next(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_25next = {"next", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_25next, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_25next(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_arg1;
  double __pyx_v_arg2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg1,&__pyx_n_s_arg2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg1);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg2);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "next") < 0)) __PYX_ERR(0, 345, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_arg1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_arg1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
    } else {
      __pyx_v_arg1 = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_arg2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_arg2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
    } else {
      __pyx_v_arg2 = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("next", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 345, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_24next(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v_arg1, __pyx_v_arg2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_24next(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, double __pyx_v_arg1, double __pyx_v_arg2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.arg1 = __pyx_v_arg1;
  __pyx_t_2.arg2 = __pyx_v_arg2;
  __pyx_t_1 = __pyx_vtabptr_8pysndlib_3clm_mus_any->next(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":349
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_frequency(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":354
 *         frequency (hz), float
 *         """
 *         return cclm.mus_frequency(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_frequency.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_frequency(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":349
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_frequency(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_frequency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":356
 *         return cclm.mus_frequency(self._ptr)
 * 
 *     @mus_frequency.setter             # <<<<<<<<<<<<<<
 *     def mus_frequency(self, v):
 *         cclm.mus_set_frequency(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_13mus_frequency_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":358
 *     @mus_frequency.setter
 *     def mus_frequency(self, v):
 *         cclm.mus_set_frequency(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L1_error)
  (void)(mus_set_frequency(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":356
 *         return cclm.mus_frequency(self._ptr)
 * 
 *     @mus_frequency.setter             # <<<<<<<<<<<<<<
 *     def mus_frequency(self, v):
 *         cclm.mus_set_frequency(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_frequency.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":360
 *         cclm.mus_set_frequency(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_phase(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":365
 *         phase (radians), float
 *         """
 *         return cclm.mus_phase(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_phase.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_phase(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":360
 *         cclm.mus_set_frequency(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_phase(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_phase.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":367
 *         return cclm.mus_phase(self._ptr)
 * 
 *     @mus_phase.setter             # <<<<<<<<<<<<<<
 *     def mus_phase(self, v):
 *         cclm.mus_set_phase(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_9mus_phase_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":369
 *     @mus_phase.setter
 *     def mus_phase(self, v):
 *         cclm.mus_set_phase(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error)
  (void)(mus_set_phase(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":367
 *         return cclm.mus_phase(self._ptr)
 * 
 *     @mus_phase.setter             # <<<<<<<<<<<<<<
 *     def mus_phase(self, v):
 *         cclm.mus_set_phase(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_phase.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":371
 *         cclm.mus_set_phase(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_length(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_length___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_length___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":376
 *         data length, int
 *         """
 *         return cclm.mus_length(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_length.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_length(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":371
 *         cclm.mus_set_phase(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_length(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":378
 *         return cclm.mus_length(self._ptr)
 * 
 *     @mus_length.setter             # <<<<<<<<<<<<<<
 *     def mus_length(self, v):
 *         cclm.mus_set_length(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_length_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_length_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_long_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":380
 *     @mus_length.setter
 *     def mus_length(self, v):
 *         cclm.mus_set_length(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L1_error)
  (void)(mus_set_length(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":378
 *         return cclm.mus_length(self._ptr)
 * 
 *     @mus_length.setter             # <<<<<<<<<<<<<<
 *     def mus_length(self, v):
 *         cclm.mus_set_length(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":382
 *         cclm.mus_set_length(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_increment(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":387
 *         various increments, int
 *         """
 *         return cclm.mus_increment(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_increment.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_increment(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":382
 *         cclm.mus_set_length(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_increment(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_increment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":389
 *         return cclm.mus_increment(self._ptr)
 * 
 *     @mus_increment.setter             # <<<<<<<<<<<<<<
 *     def mus_increment(self, v):
 *         cclm.mus_set_increment(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_13mus_increment_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":391
 *     @mus_increment.setter
 *     def mus_increment(self, v):
 *         cclm.mus_set_increment(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 391, __pyx_L1_error)
  (void)(mus_set_increment(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":389
 *         return cclm.mus_increment(self._ptr)
 * 
 *     @mus_increment.setter             # <<<<<<<<<<<<<<
 *     def mus_increment(self, v):
 *         cclm.mus_set_increment(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_increment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":393
 *         cclm.mus_set_increment(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_location(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12mus_location___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_location___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":398
 *         sample location for reads/write, int
 *         """
 *         return cclm.mus_location(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_location.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_location(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":393
 *         cclm.mus_set_increment(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_location(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_location.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":400
 *         return cclm.mus_location(self._ptr)
 * 
 *     @mus_location.setter             # <<<<<<<<<<<<<<
 *     def mus_location(self, v):
 *         cclm.mus_set_location(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12mus_location_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_12mus_location_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_long_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":402
 *     @mus_location.setter
 *     def mus_location(self, v):
 *         cclm.mus_set_location(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error)
  (void)(mus_set_location(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":400
 *         return cclm.mus_location(self._ptr)
 * 
 *     @mus_location.setter             # <<<<<<<<<<<<<<
 *     def mus_location(self, v):
 *         cclm.mus_set_location(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_location.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":404
 *         cclm.mus_set_location(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_offset(self):
 *         return cclm.mus_offset(self._ptr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":406
 *     @property
 *     def mus_offset(self):
 *         return cclm.mus_offset(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_offset.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_offset(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":404
 *         cclm.mus_set_location(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_offset(self):
 *         return cclm.mus_offset(self._ptr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":408
 *         return cclm.mus_offset(self._ptr)
 * 
 *     @mus_offset.setter             # <<<<<<<<<<<<<<
 *     def mus_offset(self, v):
 *         """
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_offset_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":413
 *         envelope offset, int
 *         """
 *         cclm.mus_set_offset(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
  (void)(mus_set_offset(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":408
 *         return cclm.mus_offset(self._ptr)
 * 
 *     @mus_offset.setter             # <<<<<<<<<<<<<<
 *     def mus_offset(self, v):
 *         """
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":415
 *         cclm.mus_set_offset(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channels(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_channels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_channels_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12mus_channels___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_channels___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":420
 *         channels open, int
 *         """
 *         return cclm.mus_channels(self._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(mus_channels(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":415
 *         cclm.mus_set_offset(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channels(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_channels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":423
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_interp_type(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15mus_interp_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15mus_interp_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_15mus_interp_type___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_15mus_interp_type___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":429
 *         not setable
 *         """
 *         return cclm.mus_interp_type(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(mus_interp_type(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":423
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_interp_type(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_interp_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":431
 *         return cclm.mus_interp_type(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_width(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_9mus_width___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_width___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":436
 *         width of interpolation tables, etc, int
 *         """
 *         return cclm.mus_width(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_width.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_width(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":431
 *         return cclm.mus_interp_type(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_width(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":438
 *         return cclm.mus_width(self._ptr)
 * 
 *     @mus_width.setter             # <<<<<<<<<<<<<<
 *     def mus_width(self, v):
 *         cclm.mus_set_width(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_9mus_width_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_9mus_width_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":440
 *     @mus_width.setter
 *     def mus_width(self, v):
 *         cclm.mus_set_width(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error)
  (void)(mus_set_width(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":438
 *         return cclm.mus_width(self._ptr)
 * 
 *     @mus_width.setter             # <<<<<<<<<<<<<<
 *     def mus_width(self, v):
 *         cclm.mus_set_width(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":442
 *         cclm.mus_set_width(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_order(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_order_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_9mus_order_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_9mus_order___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_9mus_order___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":447
 *         filter order, int
 *         """
 *         return cclm.mus_order(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_order(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":442
 *         cclm.mus_set_width(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_order(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_order.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":449
 *         return cclm.mus_order(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_scaler(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":454
 *         scaler, normally on an amplitude, float
 *         """
 *         return cclm.mus_scaler(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_scaler.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_scaler(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":449
 *         return cclm.mus_order(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_scaler(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_scaler.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":456
 *         return cclm.mus_scaler(self._ptr)
 * 
 *     @mus_scaler.setter             # <<<<<<<<<<<<<<
 *     def mus_scaler(self, v):
 *         cclm.mus_set_scaler(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_10mus_scaler_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":458
 *     @mus_scaler.setter
 *     def mus_scaler(self, v):
 *         cclm.mus_set_scaler(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L1_error)
  (void)(mus_set_scaler(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":456
 *         return cclm.mus_scaler(self._ptr)
 * 
 *     @mus_scaler.setter             # <<<<<<<<<<<<<<
 *     def mus_scaler(self, v):
 *         cclm.mus_set_scaler(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_scaler.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":460
 *         cclm.mus_set_scaler(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_feedback(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":465
 *         feedback coefficient, float
 *         """
 *         return cclm.mus_feedback(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_feedback.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_feedback(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":460
 *         cclm.mus_set_scaler(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_feedback(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_feedback.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":467
 *         return cclm.mus_feedback(self._ptr)
 * 
 *     @mus_feedback.setter             # <<<<<<<<<<<<<<
 *     def mus_feedback(self, v):
 *         cclm.mus_set_feedback(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_12mus_feedback_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":469
 *     @mus_feedback.setter
 *     def mus_feedback(self, v):
 *         cclm.mus_set_feedback(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L1_error)
  (void)(mus_set_feedback(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":467
 *         return cclm.mus_feedback(self._ptr)
 * 
 *     @mus_feedback.setter             # <<<<<<<<<<<<<<
 *     def mus_feedback(self, v):
 *         cclm.mus_set_feedback(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_feedback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":471
 *         cclm.mus_set_feedback(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_feedforward(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":476
 *         feedforward coefficient, float
 *         """
 *         return cclm.mus_feedforward(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_feedforward.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_feedforward(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":471
 *         cclm.mus_set_feedback(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_feedforward(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_feedforward.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":478
 *         return cclm.mus_feedforward(self._ptr)
 * 
 *     @mus_feedforward.setter             # <<<<<<<<<<<<<<
 *     def mus_feedforward(self, v):
 *         cclm.mus_set_feedforward(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_15mus_feedforward_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":480
 *     @mus_feedforward.setter
 *     def mus_feedforward(self, v):
 *         cclm.mus_set_feedforward(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L1_error)
  (void)(mus_set_feedforward(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":478
 *         return cclm.mus_feedforward(self._ptr)
 * 
 *     @mus_feedforward.setter             # <<<<<<<<<<<<<<
 *     def mus_feedforward(self, v):
 *         cclm.mus_set_feedforward(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_feedforward.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":482
 *         cclm.mus_set_feedforward(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_hop(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":487
 *         hop size for block processing, int
 *         """
 *         return cclm.mus_hop(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_hop.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_hop(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":482
 *         cclm.mus_set_feedforward(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_hop(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_hop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":489
 *         return cclm.mus_hop(self._ptr)
 * 
 *     @mus_hop.setter             # <<<<<<<<<<<<<<
 *     def mus_hop(self, v):
 *         cclm.mus_set_hop(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_7mus_hop_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_long_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":491
 *     @mus_hop.setter
 *     def mus_hop(self, v):
 *         cclm.mus_set_hop(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
  (void)(mus_set_hop(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":489
 *         return cclm.mus_hop(self._ptr)
 * 
 *     @mus_hop.setter             # <<<<<<<<<<<<<<
 *     def mus_hop(self, v):
 *         cclm.mus_set_hop(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_hop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":493
 *         cclm.mus_set_hop(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_ramp(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":498
 *         granulate grain envelope ramp setting, int
 *         """
 *         return cclm.mus_ramp(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @mus_ramp.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_ramp(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":493
 *         cclm.mus_set_hop(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_ramp(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_ramp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":500
 *         return cclm.mus_ramp(self._ptr)
 * 
 *     @mus_ramp.setter             # <<<<<<<<<<<<<<
 *     def mus_ramp(self, v):
 *         cclm.mus_set_ramp(self._ptr, v)
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_v));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_8mus_ramp_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  mus_long_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":502
 *     @mus_ramp.setter
 *     def mus_ramp(self, v):
 *         cclm.mus_set_ramp(self._ptr, v)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_v); if (unlikely((__pyx_t_1 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
  (void)(mus_set_ramp(__pyx_v_self->_ptr, __pyx_t_1));

  /* "pysndlib/clm.pyx":500
 *         return cclm.mus_ramp(self._ptr)
 * 
 *     @mus_ramp.setter             # <<<<<<<<<<<<<<
 *     def mus_ramp(self, v):
 *         cclm.mus_set_ramp(self._ptr, v)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_ramp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":504
 *         cclm.mus_set_ramp(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channel(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_channel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_channel_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_11mus_channel___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_channel___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":509
 *         channel being read/written, int
 *         """
 *         return cclm.mus_channel(self._ptr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(mus_channel(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":504
 *         cclm.mus_set_ramp(self._ptr, v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channel(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_channel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":511
 *         return cclm.mus_channel(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_data(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_8mus_data___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_8mus_data___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":516
 *         array of data, np.ndarray
 *         """
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._data
 */
  __pyx_t_1 = (!mus_data_exists(__pyx_v_self->_ptr));
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":517
 *         """
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')             # <<<<<<<<<<<<<<
 *         return self._data
 * 
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(mus_name(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mus_data_can_not_be_called_on, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 517, __pyx_L1_error)

    /* "pysndlib/clm.pyx":516
 *         array of data, np.ndarray
 *         """
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._data
 */
  }

  /* "pysndlib/clm.pyx":518
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._data             # <<<<<<<<<<<<<<
 * 
 *     @mus_data.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_data);
  __pyx_r = ((PyObject *)__pyx_v_self->_data);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":511
 *         return cclm.mus_channel(self._ptr)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_data(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_data.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":520
 *         return self._data
 * 
 *     @mus_data.setter             # <<<<<<<<<<<<<<
 *     def mus_data(self, data: npt.NDArray[np.float64]):
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static int __pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_8mus_data_2__set__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_7mus_any_8mus_data_2__set__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, PyObject *__pyx_v_data) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);

  /* "pysndlib/clm.pyx":522
 *     @mus_data.setter
 *     def mus_data(self, data: npt.NDArray[np.float64]):
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 * 
 */
  __pyx_t_1 = (!mus_data_exists(__pyx_v_self->_ptr));
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":523
 *     def mus_data(self, data: npt.NDArray[np.float64]):
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')             # <<<<<<<<<<<<<<
 * 
 *         np.copyto(self._data , data)
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(mus_name(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mus_data_can_not_be_called_on, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 523, __pyx_L1_error)

    /* "pysndlib/clm.pyx":522
 *     @mus_data.setter
 *     def mus_data(self, data: npt.NDArray[np.float64]):
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 * 
 */
  }

  /* "pysndlib/clm.pyx":525
 *             raise TypeError(f'mus_data can not be called on {cclm.mus_name(self._ptr)}')
 * 
 *         np.copyto(self._data , data)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copyto); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self->_data), __pyx_v_data};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":520
 *         return self._data
 * 
 *     @mus_data.setter             # <<<<<<<<<<<<<<
 *     def mus_data(self, data: npt.NDArray[np.float64]):
 *         if not cclm.mus_data_exists(self._ptr):   #could do this on all properties but seems best with array
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":527
 *         np.copyto(self._data , data)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_xcoeffs(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_xcoeffs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_xcoeffs_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_11mus_xcoeffs___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_xcoeffs___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":533
 *         not setable
 *         """
 *         if not cclm.mus_xcoeffs_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_xcoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._xcoeffs
 */
  __pyx_t_1 = (!mus_xcoeffs_exists(__pyx_v_self->_ptr));
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":534
 *         """
 *         if not cclm.mus_xcoeffs_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_xcoeffs can not be called on {cclm.mus_name(self._ptr)}')             # <<<<<<<<<<<<<<
 *         return self._xcoeffs
 * 
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(mus_name(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mus_xcoeffs_can_not_be_called_on, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 534, __pyx_L1_error)

    /* "pysndlib/clm.pyx":533
 *         not setable
 *         """
 *         if not cclm.mus_xcoeffs_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_xcoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._xcoeffs
 */
  }

  /* "pysndlib/clm.pyx":535
 *         if not cclm.mus_xcoeffs_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_xcoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._xcoeffs             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_xcoeffs);
  __pyx_r = ((PyObject *)__pyx_v_self->_xcoeffs);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":527
 *         np.copyto(self._data , data)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_xcoeffs(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_xcoeffs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":537
 *         return self._xcoeffs
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_ycoeffs(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_ycoeffs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_11mus_ycoeffs_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_11mus_ycoeffs___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_11mus_ycoeffs___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":543
 *         not setable
 *         """
 *         if not cclm.mus_ycoeffs_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_ycoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._ycoeffs
 */
  __pyx_t_1 = (!mus_ycoeffs_exists(__pyx_v_self->_ptr));
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":544
 *         """
 *         if not cclm.mus_ycoeffs_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_ycoeffs can not be called on {cclm.mus_name(self._ptr)}')             # <<<<<<<<<<<<<<
 *         return self._ycoeffs
 * 
 */
    __pyx_t_2 = __Pyx_PyUnicode_FromString(mus_name(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mus_ycoeffs_can_not_be_called_on, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 544, __pyx_L1_error)

    /* "pysndlib/clm.pyx":543
 *         not setable
 *         """
 *         if not cclm.mus_ycoeffs_exists(self._ptr):   #could do this on all properties but seems best with array             # <<<<<<<<<<<<<<
 *             raise TypeError(f'mus_ycoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._ycoeffs
 */
  }

  /* "pysndlib/clm.pyx":545
 *         if not cclm.mus_ycoeffs_exists(self._ptr):   #could do this on all properties but seems best with array
 *             raise TypeError(f'mus_ycoeffs can not be called on {cclm.mus_name(self._ptr)}')
 *         return self._ycoeffs             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_ycoeffs);
  __pyx_r = ((PyObject *)__pyx_v_self->_ycoeffs);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":537
 *         return self._xcoeffs
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_ycoeffs(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_ycoeffs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":547
 *         return self._ycoeffs
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_file_name(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_file_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_13mus_file_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_13mus_file_name___get__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_13mus_file_name___get__(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":552
 *         file being read/written
 *         """
 *         return cclm.mus_file_name(self._ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef class mus_any_array:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_FromString(mus_file_name(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":547
 *         return self._ycoeffs
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_file_name(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_any.mus_file_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_27__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_27__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_26__reduce_cython__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_29__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7mus_any_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_7mus_any_29__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_7mus_any_28__setstate_cython__(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_7mus_any_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":561
 *     cdef  cclm.mus_any_ptr_ptr data
 *     item_count: cython.size_t
 *     def __cinit__(self, number: cython.size_t):             # <<<<<<<<<<<<<<
 *         # allocate some memory (uninitialised, may contain arbitrary data)
 *         if number > 0:
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_13mus_any_array_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8pysndlib_3clm_13mus_any_array_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_number;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_number,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_number)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 561, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_number = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_number == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 561, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_13mus_any_array___cinit__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self), __pyx_v_number);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_13mus_any_array___cinit__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self, size_t __pyx_v_number) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":563
 *     def __cinit__(self, number: cython.size_t):
 *         # allocate some memory (uninitialised, may contain arbitrary data)
 *         if number > 0:             # <<<<<<<<<<<<<<
 *             self.data = cython.cast(cclm.mus_any_ptr_ptr, PyMem_Malloc(
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 */
  __pyx_t_1 = (__pyx_v_number > 0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":564
 *         # allocate some memory (uninitialised, may contain arbitrary data)
 *         if number > 0:
 *             self.data = cython.cast(cclm.mus_any_ptr_ptr, PyMem_Malloc(             # <<<<<<<<<<<<<<
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 *             if not self.data:
 */
    __pyx_v_self->data = ((mus_any_ptr_ptr)PyMem_Malloc((__pyx_v_number * (sizeof(mus_any_ptr)))));

    /* "pysndlib/clm.pyx":566
 *             self.data = cython.cast(cclm.mus_any_ptr_ptr, PyMem_Malloc(
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *         self.item_count = number
 */
    __pyx_t_1 = (!(__pyx_v_self->data != 0));
    if (unlikely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":567
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 *             if not self.data:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 *         self.item_count = number
 * 
 */
      PyErr_NoMemory(); __PYX_ERR(0, 567, __pyx_L1_error)

      /* "pysndlib/clm.pyx":566
 *             self.data = cython.cast(cclm.mus_any_ptr_ptr, PyMem_Malloc(
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *         self.item_count = number
 */
    }

    /* "pysndlib/clm.pyx":563
 *     def __cinit__(self, number: cython.size_t):
 *         # allocate some memory (uninitialised, may contain arbitrary data)
 *         if number > 0:             # <<<<<<<<<<<<<<
 *             self.data = cython.cast(cclm.mus_any_ptr_ptr, PyMem_Malloc(
 *                 number * cython.sizeof(cclm.mus_any_ptr)))
 */
  }

  /* "pysndlib/clm.pyx":568
 *             if not self.data:
 *                 raise MemoryError()
 *         self.item_count = number             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->item_count = __pyx_v_number;

  /* "pysndlib/clm.pyx":561
 *     cdef  cclm.mus_any_ptr_ptr data
 *     item_count: cython.size_t
 *     def __cinit__(self, number: cython.size_t):             # <<<<<<<<<<<<<<
 *         # allocate some memory (uninitialised, may contain arbitrary data)
 *         if number > 0:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":571
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.data)  # no-op if self.data is null
 * 
 */

/* Python wrapper */
static void __pyx_pw_8pysndlib_3clm_13mus_any_array_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_8pysndlib_3clm_13mus_any_array_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_8pysndlib_3clm_13mus_any_array_2__dealloc__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_8pysndlib_3clm_13mus_any_array_2__dealloc__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self) {

  /* "pysndlib/clm.pyx":572
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self.data)  # no-op if self.data is null             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  PyMem_Free(__pyx_v_self->data);

  /* "pysndlib/clm.pyx":571
 * 
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.data)  # no-op if self.data is null
 * 
 */

  /* function exit code */
}

/* "pysndlib/clm.pyx":574
 *         PyMem_Free(self.data)  # no-op if self.data is null
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.item_count
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_13mus_any_array_4__len__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_8pysndlib_3clm_13mus_any_array_4__len__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self) {
  Py_ssize_t __pyx_r;

  /* "pysndlib/clm.pyx":575
 * 
 *     def __len__(self):
 *         return self.item_count             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = __pyx_v_self->item_count;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":574
 *         PyMem_Free(self.data)  # no-op if self.data is null
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.item_count
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":577
 *         return self.item_count
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"count {self.item_count}"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_7__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_13mus_any_array_6__str__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_6__str__(struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 1);

  /* "pysndlib/clm.pyx":578
 * 
 *     def __str__(self):
 *         return f"count {self.item_count}"             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_size_t(__pyx_v_self->item_count, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_count, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":577
 *         return self.item_count
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"count {self.item_count}"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":581
 * 
 *     @staticmethod
 *     cdef mus_any_array from_pylist(lst: list):             # <<<<<<<<<<<<<<
 *         """
 *         factory function to create a wrapper around mus_float_t (double) and fill it with values from the list
 */

static struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(PyObject *__pyx_v_lst) {
  int __pyx_v_i;
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_wrapper = 0;
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  mus_any *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_pylist", 1);

  /* "pysndlib/clm.pyx":587
 *         cdef int i
 * 
 *         cdef mus_any_array wrapper = mus_any_array(len(lst))             # <<<<<<<<<<<<<<
 *         for i in range(len(lst)):
 *             wrapper.data[i] = (<mus_any>lst[i])._ptr
 */
  __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_lst); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any_array), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_wrapper = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":588
 * 
 *         cdef mus_any_array wrapper = mus_any_array(len(lst))
 *         for i in range(len(lst)):             # <<<<<<<<<<<<<<
 *             wrapper.data[i] = (<mus_any>lst[i])._ptr
 *         return wrapper
 */
  __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_lst); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 588, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pysndlib/clm.pyx":589
 *         cdef mus_any_array wrapper = mus_any_array(len(lst))
 *         for i in range(len(lst)):
 *             wrapper.data[i] = (<mus_any>lst[i])._ptr             # <<<<<<<<<<<<<<
 *         return wrapper
 * 
 */
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_lst, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_wrapper->data[__pyx_v_i]) = __pyx_t_6;
  }

  /* "pysndlib/clm.pyx":590
 *         for i in range(len(lst)):
 *             wrapper.data[i] = (<mus_any>lst[i])._ptr
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":581
 * 
 *     @staticmethod
 *     cdef mus_any_array from_pylist(lst: list):             # <<<<<<<<<<<<<<
 *         """
 *         factory function to create a wrapper around mus_float_t (double) and fill it with values from the list
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.from_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_13mus_any_array_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13mus_any_array_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_13mus_any_array_8__reduce_cython__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_13mus_any_array_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13mus_any_array_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_13mus_any_array_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_13mus_any_array_10__setstate_cython__(((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_13mus_any_array_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.mus_any_array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":597
 * # --------------- callbacks ---------------- #
 * 
 * cdef double input_callback_func(void* arg, int direction):             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_any_ptr gen = <cclm.mus_any_ptr>arg
 *     return cclm.mus_apply(gen, direction, 0.)
 */

static double __pyx_f_8pysndlib_3clm_input_callback_func(void *__pyx_v_arg, int __pyx_v_direction) {
  mus_any_ptr __pyx_v_gen;
  double __pyx_r;

  /* "pysndlib/clm.pyx":598
 * 
 * cdef double input_callback_func(void* arg, int direction):
 *     cdef cclm.mus_any_ptr gen = <cclm.mus_any_ptr>arg             # <<<<<<<<<<<<<<
 *     return cclm.mus_apply(gen, direction, 0.)
 * 
 */
  __pyx_v_gen = ((mus_any_ptr)__pyx_v_arg);

  /* "pysndlib/clm.pyx":599
 * cdef double input_callback_func(void* arg, int direction):
 *     cdef cclm.mus_any_ptr gen = <cclm.mus_any_ptr>arg
 *     return cclm.mus_apply(gen, direction, 0.)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_apply(__pyx_v_gen, __pyx_v_direction, 0.);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":597
 * # --------------- callbacks ---------------- #
 * 
 * cdef double input_callback_func(void* arg, int direction):             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_any_ptr gen = <cclm.mus_any_ptr>arg
 *     return cclm.mus_apply(gen, direction, 0.)
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":602
 * 
 * 
 * cdef void locsig_detour_callback_func(cclm.mus_any *ptr, cclm.mus_long_t val):             # <<<<<<<<<<<<<<
 *     cdef int channels = cclm.mus_locsig_channels(ptr)
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)
 */

static void __pyx_f_8pysndlib_3clm_locsig_detour_callback_func(mus_any *__pyx_v_ptr, mus_long_t __pyx_v_val) {
  int __pyx_v_channels;
  int __pyx_v_reverb_channels;
  mus_float_t *__pyx_v_outf;
  mus_float_t *__pyx_v_revf;
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  mus_long_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig_detour_callback_func", 1);

  /* "pysndlib/clm.pyx":603
 * 
 * cdef void locsig_detour_callback_func(cclm.mus_any *ptr, cclm.mus_long_t val):
 *     cdef int channels = cclm.mus_locsig_channels(ptr)             # <<<<<<<<<<<<<<
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)
 *     cdef cclm.mus_float_t* outf = cclm.mus_locsig_outf(ptr)
 */
  __pyx_v_channels = mus_locsig_channels(__pyx_v_ptr);

  /* "pysndlib/clm.pyx":604
 * cdef void locsig_detour_callback_func(cclm.mus_any *ptr, cclm.mus_long_t val):
 *     cdef int channels = cclm.mus_locsig_channels(ptr)
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t* outf = cclm.mus_locsig_outf(ptr)
 *     cdef cclm.mus_float_t* revf = cclm.mus_locsig_revf(ptr)
 */
  __pyx_v_reverb_channels = mus_locsig_reverb_channels(__pyx_v_ptr);

  /* "pysndlib/clm.pyx":605
 *     cdef int channels = cclm.mus_locsig_channels(ptr)
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)
 *     cdef cclm.mus_float_t* outf = cclm.mus_locsig_outf(ptr)             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t* revf = cclm.mus_locsig_revf(ptr)
 *     for i in range(channels):
 */
  __pyx_v_outf = mus_locsig_outf(__pyx_v_ptr);

  /* "pysndlib/clm.pyx":606
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)
 *     cdef cclm.mus_float_t* outf = cclm.mus_locsig_outf(ptr)
 *     cdef cclm.mus_float_t* revf = cclm.mus_locsig_revf(ptr)             # <<<<<<<<<<<<<<
 *     for i in range(channels):
 *          default.output[i][val] += outf[i]
 */
  __pyx_v_revf = mus_locsig_revf(__pyx_v_ptr);

  /* "pysndlib/clm.pyx":607
 *     cdef cclm.mus_float_t* outf = cclm.mus_locsig_outf(ptr)
 *     cdef cclm.mus_float_t* revf = cclm.mus_locsig_revf(ptr)
 *     for i in range(channels):             # <<<<<<<<<<<<<<
 *          default.output[i][val] += outf[i]
 *     for i in range(reverb_channels):
 */
  __pyx_t_1 = __pyx_v_channels;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pysndlib/clm.pyx":608
 *     cdef cclm.mus_float_t* revf = cclm.mus_locsig_revf(ptr)
 *     for i in range(channels):
 *          default.output[i][val] += outf[i]             # <<<<<<<<<<<<<<
 *     for i in range(reverb_channels):
 *          default.reverb[i][val] += revf[i]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_output); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_v_val;
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, __pyx_t_6, mus_long_t, 1, __Pyx_PyInt_From_int64_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyFloat_FromDouble((__pyx_v_outf[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_t_6, __pyx_t_8, mus_long_t, 1, __Pyx_PyInt_From_int64_t, 0, 1, 1) < 0))) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pysndlib/clm.pyx":609
 *     for i in range(channels):
 *          default.output[i][val] += outf[i]
 *     for i in range(reverb_channels):             # <<<<<<<<<<<<<<
 *          default.reverb[i][val] += revf[i]
 * 
 */
  __pyx_t_1 = __pyx_v_reverb_channels;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pysndlib/clm.pyx":610
 *          default.output[i][val] += outf[i]
 *     for i in range(reverb_channels):
 *          default.reverb[i][val] += revf[i]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reverb); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_6 = __pyx_v_val;
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, __pyx_t_6, mus_long_t, 1, __Pyx_PyInt_From_int64_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyFloat_FromDouble((__pyx_v_revf[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_t_6, __pyx_t_5, mus_long_t, 1, __Pyx_PyInt_From_int64_t, 0, 1, 1) < 0))) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pysndlib/clm.pyx":602
 * 
 * 
 * cdef void locsig_detour_callback_func(cclm.mus_any *ptr, cclm.mus_long_t val):             # <<<<<<<<<<<<<<
 *     cdef int channels = cclm.mus_locsig_channels(ptr)
 *     cdef int reverb_channels = cclm.mus_locsig_reverb_channels(ptr)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysndlib.clm.locsig_detour_callback_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysndlib/clm.pyx":614
 * 
 * # --------------- file2ndarray, ndarray2file ---------------- #
 * cpdef file2ndarray(str filename, channel=None, beg=None, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an ndarray with samples from file and the sample rate of the data
 */

static PyObject *__pyx_pw_8pysndlib_3clm_7file2ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_file2ndarray(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2ndarray *__pyx_optional_args) {
  PyObject *__pyx_v_channel = ((PyObject *)Py_None);
  PyObject *__pyx_v_beg = ((PyObject *)Py_None);
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  long __pyx_v_chans;
  double __pyx_v_sr;
  PyObject *__pyx_v_bg = NULL;
  PyObject *__pyx_v_out = NULL;
  __Pyx_memviewslice __pyx_v_arr_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  long __pyx_t_9;
  double __pyx_t_10;
  struct __pyx_opt_args_8pysndlib_3clm_get_srate __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
  long __pyx_t_15;
  long __pyx_t_16;
  char const *__pyx_t_17;
  mus_long_t __pyx_t_18;
  mus_long_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file2ndarray", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_channel = __pyx_optional_args->channel;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_beg = __pyx_optional_args->beg;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_size = __pyx_optional_args->size;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_size);

  /* "pysndlib/clm.pyx":626
 * 
 *     """
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2ndarray: {filename} does not exist.')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "pysndlib/clm.pyx":627
 *     """
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'file2ndarray: {filename} does not exist.')             # <<<<<<<<<<<<<<
 * 
 *     size = size or get_length(filename)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_file2ndarray);
    __pyx_t_7 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_file2ndarray);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_file2ndarray);
    __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_does_not_exist);
    __pyx_t_7 += 16;
    __Pyx_GIVEREF(__pyx_kp_u_does_not_exist);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_exist);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 627, __pyx_L1_error)

    /* "pysndlib/clm.pyx":626
 * 
 *     """
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2ndarray: {filename} does not exist.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":629
 *         raise FileNotFoundError(f'file2ndarray: {filename} does not exist.')
 * 
 *     size = size or get_length(filename)             # <<<<<<<<<<<<<<
 *     chans = get_channels(filename)
 *     sr = get_srate(filename)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 629, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __Pyx_INCREF(__pyx_v_size);
    __pyx_t_2 = __pyx_v_size;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_v_filename, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":630
 * 
 *     size = size or get_length(filename)
 *     chans = get_channels(filename)             # <<<<<<<<<<<<<<
 *     sr = get_srate(filename)
 *     bg = beg or 0
 */
  __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_v_filename, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error)
  __pyx_v_chans = __pyx_t_9;

  /* "pysndlib/clm.pyx":631
 *     size = size or get_length(filename)
 *     chans = get_channels(filename)
 *     sr = get_srate(filename)             # <<<<<<<<<<<<<<
 *     bg = beg or 0
 *     out = np.zeros((1 if (channel != None) else chans, size), dtype=np.double)
 */
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.obj = __pyx_v_filename;
  __pyx_t_10 = __pyx_f_8pysndlib_3clm_get_srate(0, &__pyx_t_11); if (unlikely(__pyx_t_10 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_10;

  /* "pysndlib/clm.pyx":632
 *     chans = get_channels(filename)
 *     sr = get_srate(filename)
 *     bg = beg or 0             # <<<<<<<<<<<<<<
 *     out = np.zeros((1 if (channel != None) else chans, size), dtype=np.double)
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_beg); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 632, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __Pyx_INCREF(__pyx_v_beg);
    __pyx_t_2 = __pyx_v_beg;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyInt_From_long(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L6_bool_binop_done:;
  __pyx_v_bg = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":633
 *     sr = get_srate(filename)
 *     bg = beg or 0
 *     out = np.zeros((1 if (channel != None) else chans, size), dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [: , :] arr_view = out
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_channel, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_2 = __pyx_int_1;
  } else {
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_size);
  __Pyx_GIVEREF(__pyx_v_size);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_size)) __PYX_ERR(0, 633, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_double); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_13) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "pysndlib/clm.pyx":635
 *     out = np.zeros((1 if (channel != None) else chans, size), dtype=np.double)
 * 
 *     cdef double [: , :] arr_view = out             # <<<<<<<<<<<<<<
 * 
 *     if channel is None:
 */
  __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 635, __pyx_L1_error)
  __pyx_v_arr_view = __pyx_t_14;
  __pyx_t_14.memview = NULL;
  __pyx_t_14.data = NULL;

  /* "pysndlib/clm.pyx":637
 *     cdef double [: , :] arr_view = out
 * 
 *     if channel is None:             # <<<<<<<<<<<<<<
 *         for i in range(chans):
 *             csndlib.mus_file_to_array(filename, i, bg, size, &arr_view[i][0])
 */
  __pyx_t_6 = (__pyx_v_channel == Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":638
 * 
 *     if channel is None:
 *         for i in range(chans):             # <<<<<<<<<<<<<<
 *             csndlib.mus_file_to_array(filename, i, bg, size, &arr_view[i][0])
 *     else:
 */
    __pyx_t_9 = __pyx_v_chans;
    __pyx_t_15 = __pyx_t_9;
    for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
      __pyx_v_i = __pyx_t_16;

      /* "pysndlib/clm.pyx":639
 *     if channel is None:
 *         for i in range(chans):
 *             csndlib.mus_file_to_array(filename, i, bg, size, &arr_view[i][0])             # <<<<<<<<<<<<<<
 *     else:
 *         csndlib.mus_file_to_array(filename,channel, bg, size, &arr_view[0][0])
 */
      __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L1_error)
      __pyx_t_18 = __Pyx_PyInt_As_int64_t(__pyx_v_bg); if (unlikely((__pyx_t_18 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L1_error)
      __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_19 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L1_error)
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_21 = 0;
      __pyx_t_4 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_v_arr_view.shape[0];
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_view.shape[0])) __pyx_t_4 = 0;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_v_arr_view.shape[1];
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_4 = 1;
      } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_view.shape[1])) __pyx_t_4 = 1;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        __PYX_ERR(0, 639, __pyx_L1_error)
      }
      (void)(mus_file_to_array(__pyx_t_17, __pyx_v_i, __pyx_t_18, __pyx_t_19, (&(*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_view.data + __pyx_t_20 * __pyx_v_arr_view.strides[0]) ) + __pyx_t_21 * __pyx_v_arr_view.strides[1]) ))))));
    }

    /* "pysndlib/clm.pyx":637
 *     cdef double [: , :] arr_view = out
 * 
 *     if channel is None:             # <<<<<<<<<<<<<<
 *         for i in range(chans):
 *             csndlib.mus_file_to_array(filename, i, bg, size, &arr_view[i][0])
 */
    goto __pyx_L8;
  }

  /* "pysndlib/clm.pyx":641
 *             csndlib.mus_file_to_array(filename, i, bg, size, &arr_view[i][0])
 *     else:
 *         csndlib.mus_file_to_array(filename,channel, bg, size, &arr_view[0][0])             # <<<<<<<<<<<<<<
 *     return out, sr
 * 
 */
  /*else*/ {
    __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_channel); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_v_bg); if (unlikely((__pyx_t_19 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_18 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_18 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error)
    __pyx_t_21 = 0;
    __pyx_t_20 = 0;
    __pyx_t_22 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_v_arr_view.shape[0];
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_22 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_view.shape[0])) __pyx_t_22 = 0;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_v_arr_view.shape[1];
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_22 = 1;
    } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_view.shape[1])) __pyx_t_22 = 1;
    if (unlikely(__pyx_t_22 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_22);
      __PYX_ERR(0, 641, __pyx_L1_error)
    }
    (void)(mus_file_to_array(__pyx_t_17, __pyx_t_4, __pyx_t_19, __pyx_t_18, (&(*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_view.data + __pyx_t_21 * __pyx_v_arr_view.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_view.strides[1]) ))))));
  }
  __pyx_L8:;

  /* "pysndlib/clm.pyx":642
 *     else:
 *         csndlib.mus_file_to_array(filename,channel, bg, size, &arr_view[0][0])
 *     return out, sr             # <<<<<<<<<<<<<<
 * 
 * cpdef ndarray2file(str filename, np.ndarray arr, size=None, sr=None, sample_type=None, header_type=None, comment=None ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_13 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_out);
  __Pyx_GIVEREF(__pyx_v_out);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_out)) __PYX_ERR(0, 642, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13)) __PYX_ERR(0, 642, __pyx_L1_error);
  __pyx_t_13 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":614
 * 
 * # --------------- file2ndarray, ndarray2file ---------------- #
 * cpdef file2ndarray(str filename, channel=None, beg=None, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an ndarray with samples from file and the sample rate of the data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_14, 1);
  __Pyx_AddTraceback("pysndlib.clm.file2ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bg);
  __Pyx_XDECREF(__pyx_v_out);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_arr_view, 1);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_7file2ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_6file2ndarray, "\n    return an ndarray with samples from file and the sample rate of the data\n    \n    :param filename: filename\n    :param channel: if None, will read all channels, otherwise just channel specified \n    :param beg: beginning positions to read in samples\n    :param size: size in samples to read\n    :return: tuple of np.ndarray and sample rate\n    :rtype: tuple\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_7file2ndarray = {"file2ndarray", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7file2ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_6file2ndarray};
static PyObject *__pyx_pw_8pysndlib_3clm_7file2ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_channel = 0;
  PyObject *__pyx_v_beg = 0;
  PyObject *__pyx_v_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("file2ndarray (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_channel,&__pyx_n_s_beg,&__pyx_n_s_size,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_channel);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_beg);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "file2ndarray") < 0)) __PYX_ERR(0, 614, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    __pyx_v_channel = values[1];
    __pyx_v_beg = values[2];
    __pyx_v_size = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("file2ndarray", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 614, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.file2ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 614, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_6file2ndarray(__pyx_self, __pyx_v_filename, __pyx_v_channel, __pyx_v_beg, __pyx_v_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_6file2ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_channel, PyObject *__pyx_v_beg, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_file2ndarray __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file2ndarray", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.channel = __pyx_v_channel;
  __pyx_t_2.beg = __pyx_v_beg;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_file2ndarray(__pyx_v_filename, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.file2ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":644
 *     return out, sr
 * 
 * cpdef ndarray2file(str filename, np.ndarray arr, size=None, sr=None, sample_type=None, header_type=None, comment=None ):             # <<<<<<<<<<<<<<
 *     """
 *     write an ndarray of samples to file
 */

static PyObject *__pyx_pw_8pysndlib_3clm_9ndarray2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_ndarray2file(PyObject *__pyx_v_filename, PyArrayObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ndarray2file *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_v_sr = ((PyObject *)Py_None);
  PyObject *__pyx_v_sample_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_header_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_chans = NULL;
  int __pyx_v_fd;
  mus_float_t **__pyx_v_obuf;
  __Pyx_memviewslice __pyx_v_arr_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_i = NULL;
  CYTHON_UNUSED int __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char const *__pyx_t_7;
  int __pyx_t_8;
  mus_sample_t __pyx_t_9;
  mus_header_t __pyx_t_10;
  size_t __pyx_t_11;
  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  mus_long_t __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ndarray2file", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_sr = __pyx_optional_args->sr;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_sample_type = __pyx_optional_args->sample_type;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_header_type = __pyx_optional_args->header_type;
          }
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_v_size);
  __Pyx_INCREF(__pyx_v_sr);
  __Pyx_INCREF(__pyx_v_sample_type);
  __Pyx_INCREF(__pyx_v_header_type);

  /* "pysndlib/clm.pyx":659
 *     """
 *     #sample_type: Optional[sndlib.sample]=CLM.sample_type, header_type: Optional[sndlib.header]=CLM.header_type
 *     sr = sr or default.srate             # <<<<<<<<<<<<<<
 * 
 *     sample_type = sample_type or default.sample_type
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sr); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 659, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_sr);
    __pyx_t_1 = __pyx_v_sr;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_srate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_sr, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":661
 *     sr = sr or default.srate
 * 
 *     sample_type = sample_type or default.sample_type             # <<<<<<<<<<<<<<
 *     header_type = header_type or default.header_type
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sample_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 661, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_sample_type);
    __pyx_t_1 = __pyx_v_sample_type;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_sample_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":662
 * 
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type             # <<<<<<<<<<<<<<
 * 
 *     if arr.ndim == 1:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_header_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 662, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_header_type);
    __pyx_t_1 = __pyx_v_header_type;
    goto __pyx_L7_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_header_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L7_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_header_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":664
 *     header_type = header_type or default.header_type
 * 
 *     if arr.ndim == 1:             # <<<<<<<<<<<<<<
 *         print('ndim', arr.ndim)
 *         arr = np.copy(arr)
 */
  __pyx_t_5 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_5 == 1);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":665
 * 
 *     if arr.ndim == 1:
 *         print('ndim', arr.ndim)             # <<<<<<<<<<<<<<
 *         arr = np.copy(arr)
 *         size = size or np.shape(arr)[0]
 */
    __pyx_t_5 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_u_ndim);
    __Pyx_GIVEREF(__pyx_n_u_ndim);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_ndim)) __PYX_ERR(0, 665, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":666
 *     if arr.ndim == 1:
 *         print('ndim', arr.ndim)
 *         arr = np.copy(arr)             # <<<<<<<<<<<<<<
 *         size = size or np.shape(arr)[0]
 *         arr.resize(size)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_arr)};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":667
 *         print('ndim', arr.ndim)
 *         arr = np.copy(arr)
 *         size = size or np.shape(arr)[0]             # <<<<<<<<<<<<<<
 *         arr.resize(size)
 *         arr = np.reshape(arr,(1,size))
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 667, __pyx_L1_error)
    if (!__pyx_t_2) {
    } else {
      __Pyx_INCREF(__pyx_v_size);
      __pyx_t_1 = __pyx_v_size;
      goto __pyx_L10_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_arr)};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_1 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_L10_bool_binop_done:;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":668
 *         arr = np.copy(arr)
 *         size = size or np.shape(arr)[0]
 *         arr.resize(size)             # <<<<<<<<<<<<<<
 *         arr = np.reshape(arr,(1,size))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_resize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_size};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":669
 *         size = size or np.shape(arr)[0]
 *         arr.resize(size)
 *         arr = np.reshape(arr,(1,size))             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 669, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size)) __PYX_ERR(0, 669, __pyx_L1_error);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_arr), __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":664
 *     header_type = header_type or default.header_type
 * 
 *     if arr.ndim == 1:             # <<<<<<<<<<<<<<
 *         print('ndim', arr.ndim)
 *         arr = np.copy(arr)
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":673
 *     else:
 * 
 *         size = size or np.shape(arr)[1]             # <<<<<<<<<<<<<<
 * 
 *     chans = np.shape(arr)[0]
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 673, __pyx_L1_error)
    if (!__pyx_t_2) {
    } else {
      __Pyx_INCREF(__pyx_v_size);
      __pyx_t_1 = __pyx_v_size;
      goto __pyx_L12_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_L12_bool_binop_done:;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":675
 *         size = size or np.shape(arr)[1]
 * 
 *     chans = np.shape(arr)[0]             # <<<<<<<<<<<<<<
 * 
 *     fd = csndlib.mus_sound_open_output(filename, int(sr), chans, sample_type, header_type, NULL)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_arr)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_chans = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":677
 *     chans = np.shape(arr)[0]
 * 
 *     fd = csndlib.mus_sound_open_output(filename, int(sr), chans, sample_type, header_type, NULL)             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t **obuf = <cclm.mus_float_t**>PyMem_Malloc(chans * sizeof(cclm.mus_float_t*))
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_chans); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_t_9 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_t_10 = ((mus_header_t)__Pyx_PyInt_As_mus_header_t(__pyx_v_header_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_v_fd = mus_sound_open_output(__pyx_t_7, __pyx_t_5, __pyx_t_8, __pyx_t_9, __pyx_t_10, NULL);

  /* "pysndlib/clm.pyx":678
 * 
 *     fd = csndlib.mus_sound_open_output(filename, int(sr), chans, sample_type, header_type, NULL)
 *     cdef cclm.mus_float_t **obuf = <cclm.mus_float_t**>PyMem_Malloc(chans * sizeof(cclm.mus_float_t*))             # <<<<<<<<<<<<<<
 * 
 *     if not obuf:
 */
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(mus_float_t *))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_chans, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_obuf = ((mus_float_t **)PyMem_Malloc(__pyx_t_11));

  /* "pysndlib/clm.pyx":680
 *     cdef cclm.mus_float_t **obuf = <cclm.mus_float_t**>PyMem_Malloc(chans * sizeof(cclm.mus_float_t*))
 * 
 *     if not obuf:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 * 
 */
  __pyx_t_2 = (!(__pyx_v_obuf != 0));
  if (unlikely(__pyx_t_2)) {

    /* "pysndlib/clm.pyx":681
 * 
 *     if not obuf:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] arr_view = arr[0]
 */
    PyErr_NoMemory(); __PYX_ERR(0, 681, __pyx_L1_error)

    /* "pysndlib/clm.pyx":680
 *     cdef cclm.mus_float_t **obuf = <cclm.mus_float_t**>PyMem_Malloc(chans * sizeof(cclm.mus_float_t*))
 * 
 *     if not obuf:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 * 
 */
  }

  /* "pysndlib/clm.pyx":683
 *         raise MemoryError()
 * 
 *     cdef double [:] arr_view = arr[0]             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr_view = __pyx_t_12;
  __pyx_t_12.memview = NULL;
  __pyx_t_12.data = NULL;

  /* "pysndlib/clm.pyx":685
 *     cdef double [:] arr_view = arr[0]
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(chans):
 *             arr_view = arr[i]
 */
  /*try:*/ {

    /* "pysndlib/clm.pyx":686
 * 
 *     try:
 *         for i in range(chans):             # <<<<<<<<<<<<<<
 *             arr_view = arr[i]
 *             obuf[i] = &arr_view[0]
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_chans); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L16_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 686, __pyx_L16_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 686, __pyx_L16_error)
            #endif
            if (__pyx_t_13 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 686, __pyx_L16_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 686, __pyx_L16_error)
            #endif
            if (__pyx_t_13 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 686, __pyx_L16_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_14(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 686, __pyx_L16_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":687
 *     try:
 *         for i in range(chans):
 *             arr_view = arr[i]             # <<<<<<<<<<<<<<
 *             obuf[i] = &arr_view[0]
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_arr), __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 687, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_arr_view, 1);
      __pyx_v_arr_view = __pyx_t_12;
      __pyx_t_12.memview = NULL;
      __pyx_t_12.data = NULL;

      /* "pysndlib/clm.pyx":688
 *         for i in range(chans):
 *             arr_view = arr[i]
 *             obuf[i] = &arr_view[0]             # <<<<<<<<<<<<<<
 * 
 *     finally:
 */
      __pyx_t_15 = 0;
      __pyx_t_8 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_v_arr_view.shape[0];
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_v_arr_view.shape[0])) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        __PYX_ERR(0, 688, __pyx_L16_error)
      }
      __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L16_error)
      (__pyx_v_obuf[__pyx_t_16]) = (&(*((double *) ( /* dim=0 */ (__pyx_v_arr_view.data + __pyx_t_15 * __pyx_v_arr_view.strides[0]) ))));

      /* "pysndlib/clm.pyx":686
 * 
 *     try:
 *         for i in range(chans):             # <<<<<<<<<<<<<<
 *             arr_view = arr[i]
 *             obuf[i] = &arr_view[0]
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "pysndlib/clm.pyx":691
 * 
 *     finally:
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)             # <<<<<<<<<<<<<<
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)
 *         PyMem_Free(obuf)
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_17 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_chans); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L1_error)
      __pyx_v_err = mus_file_write(__pyx_v_fd, 0, __pyx_t_17, __pyx_t_8, __pyx_v_obuf);

      /* "pysndlib/clm.pyx":692
 *     finally:
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)             # <<<<<<<<<<<<<<
 *         PyMem_Free(obuf)
 * 
 */
      __pyx_t_9 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_From_int(mus_bytes_per_sample(__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyNumber_Multiply(__pyx_v_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_chans); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_17 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      (void)(mus_sound_close_output(__pyx_v_fd, __pyx_t_17));

      /* "pysndlib/clm.pyx":693
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)
 *         PyMem_Free(obuf)             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
      PyMem_Free(__pyx_v_obuf);
      goto __pyx_L17;
    }
    __pyx_L16_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1);
      __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_24);
      __pyx_t_8 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
      {

        /* "pysndlib/clm.pyx":691
 * 
 *     finally:
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)             # <<<<<<<<<<<<<<
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)
 *         PyMem_Free(obuf)
 */
        __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_17 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L22_error)
        __pyx_t_25 = __Pyx_PyInt_As_int(__pyx_v_chans); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L22_error)
        __pyx_v_err = mus_file_write(__pyx_v_fd, 0, __pyx_t_17, __pyx_t_25, __pyx_v_obuf);

        /* "pysndlib/clm.pyx":692
 *     finally:
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)             # <<<<<<<<<<<<<<
 *         PyMem_Free(obuf)
 * 
 */
        __pyx_t_9 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L22_error)
        __pyx_t_3 = __Pyx_PyInt_From_int(mus_bytes_per_sample(__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyNumber_Multiply(__pyx_v_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_chans); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_17 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L22_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        (void)(mus_sound_close_output(__pyx_v_fd, __pyx_t_17));

        /* "pysndlib/clm.pyx":693
 *         err = csndlib.mus_file_write(fd, 0, size, chans, obuf)
 *         csndlib.mus_sound_close_output(fd, size * csndlib.mus_bytes_per_sample(sample_type)*chans)
 *         PyMem_Free(obuf)             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
        PyMem_Free(__pyx_v_obuf);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_XGIVEREF(__pyx_t_24);
        __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_18;
      goto __pyx_L1_error;
      __pyx_L22_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_XGIVEREF(__pyx_t_24);
        __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
      }
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L17:;
  }

  /* "pysndlib/clm.pyx":695
 *         PyMem_Free(obuf)
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * # --------------- with sound context manager ---------------- #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_size);
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":644
 *     return out, sr
 * 
 * cpdef ndarray2file(str filename, np.ndarray arr, size=None, sr=None, sample_type=None, header_type=None, comment=None ):             # <<<<<<<<<<<<<<
 *     """
 *     write an ndarray of samples to file
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1);
  __Pyx_AddTraceback("pysndlib.clm.ndarray2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_chans);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_arr_view, 1);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_sr);
  __Pyx_XDECREF(__pyx_v_sample_type);
  __Pyx_XDECREF(__pyx_v_header_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_9ndarray2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_8ndarray2file, "\n    write an ndarray of samples to file\n    \n    :param filename: name of file\n    :param arr: np.ndarray of samples\n    :param size: number of samples to write. if None write all\n    :param sr: sample rate of file to write\n    :param sample_type: type of sample type to use. defaults to clm.sample_type\n    :param header_type: header of sample type to use. defaults to clm.header_type\n    :return: length in samples of file\n    :rtype: int\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_9ndarray2file = {"ndarray2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_9ndarray2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_8ndarray2file};
static PyObject *__pyx_pw_8pysndlib_3clm_9ndarray2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_sr = 0;
  PyObject *__pyx_v_sample_type = 0;
  PyObject *__pyx_v_header_type = 0;
  PyObject *__pyx_v_comment = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ndarray2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_arr,&__pyx_n_s_size,&__pyx_n_s_sr,&__pyx_n_s_sample_type,&__pyx_n_s_header_type,&__pyx_n_s_comment,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("ndarray2file", 0, 2, 7, 1); __PYX_ERR(0, 644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sr);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ndarray2file") < 0)) __PYX_ERR(0, 644, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    __pyx_v_arr = ((PyArrayObject *)values[1]);
    __pyx_v_size = values[2];
    __pyx_v_sr = values[3];
    __pyx_v_sample_type = values[4];
    __pyx_v_header_type = values[5];
    __pyx_v_comment = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ndarray2file", 0, 2, 7, __pyx_nargs); __PYX_ERR(0, 644, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ndarray2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 644, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_8ndarray2file(__pyx_self, __pyx_v_filename, __pyx_v_arr, __pyx_v_size, __pyx_v_sr, __pyx_v_sample_type, __pyx_v_header_type, __pyx_v_comment);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_8ndarray2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_size, PyObject *__pyx_v_sr, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_ndarray2file __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ndarray2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.sr = __pyx_v_sr;
  __pyx_t_2.sample_type = __pyx_v_sample_type;
  __pyx_t_2.header_type = __pyx_v_header_type;
  __pyx_t_2.comment = __pyx_v_comment;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ndarray2file(__pyx_v_filename, __pyx_v_arr, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.ndarray2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":722
 *     """
 * 
 *     def __init__(self, output=None,             # <<<<<<<<<<<<<<
 *                         channels=None,
 *                         srate=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_5Sound_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_5Sound_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_output = 0;
  PyObject *__pyx_v_channels = 0;
  PyObject *__pyx_v_srate = 0;
  PyObject *__pyx_v_sample_type = 0;
  PyObject *__pyx_v_header_type = 0;
  PyObject *__pyx_v_comment = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_reverb = 0;
  PyObject *__pyx_v_revfile = 0;
  PyObject *__pyx_v_reverb_data = 0;
  PyObject *__pyx_v_reverb_channels = 0;
  PyObject *__pyx_v_continue_old_file = 0;
  PyObject *__pyx_v_statistics = 0;
  PyObject *__pyx_v_scaled_to = 0;
  PyObject *__pyx_v_scaled_by = 0;
  PyObject *__pyx_v_play = 0;
  PyObject *__pyx_v_clipped = 0;
  PyObject *__pyx_v_finalize = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_output,&__pyx_n_s_channels,&__pyx_n_s_srate,&__pyx_n_s_sample_type,&__pyx_n_s_header_type,&__pyx_n_s_comment,&__pyx_n_s_verbose,&__pyx_n_s_reverb,&__pyx_n_s_revfile,&__pyx_n_s_reverb_data,&__pyx_n_s_reverb_channels,&__pyx_n_s_continue_old_file,&__pyx_n_s_statistics,&__pyx_n_s_scaled_to,&__pyx_n_s_scaled_by,&__pyx_n_s_play,&__pyx_n_s_clipped,&__pyx_n_s_finalize,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":723
 * 
 *     def __init__(self, output=None,
 *                         channels=None,             # <<<<<<<<<<<<<<
 *                         srate=None,
 *                         sample_type = None,
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":724
 *     def __init__(self, output=None,
 *                         channels=None,
 *                         srate=None,             # <<<<<<<<<<<<<<
 *                         sample_type = None,
 *                         header_type = None,
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":725
 *                         channels=None,
 *                         srate=None,
 *                         sample_type = None,             # <<<<<<<<<<<<<<
 *                         header_type = None,
 *                         comment = False,
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":726
 *                         srate=None,
 *                         sample_type = None,
 *                         header_type = None,             # <<<<<<<<<<<<<<
 *                         comment = False,
 *                         verbose = False,
 */
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":727
 *                         sample_type = None,
 *                         header_type = None,
 *                         comment = False,             # <<<<<<<<<<<<<<
 *                         verbose = False,
 *                         reverb = None,
 */
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));

    /* "pysndlib/clm.pyx":728
 *                         header_type = None,
 *                         comment = False,
 *                         verbose = False,             # <<<<<<<<<<<<<<
 *                         reverb = None,
 *                         revfile = None,
 */
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));

    /* "pysndlib/clm.pyx":729
 *                         comment = False,
 *                         verbose = False,
 *                         reverb = None,             # <<<<<<<<<<<<<<
 *                         revfile = None,
 *                         reverb_data = None,
 */
    values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":730
 *                         verbose = False,
 *                         reverb = None,
 *                         revfile = None,             # <<<<<<<<<<<<<<
 *                         reverb_data = None,
 *                         reverb_channels = None,
 */
    values[9] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":731
 *                         reverb = None,
 *                         revfile = None,
 *                         reverb_data = None,             # <<<<<<<<<<<<<<
 *                         reverb_channels = None,
 *                         continue_old_file = False,
 */
    values[10] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":732
 *                         revfile = None,
 *                         reverb_data = None,
 *                         reverb_channels = None,             # <<<<<<<<<<<<<<
 *                         continue_old_file = False,
 *                         statistics = None,
 */
    values[11] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":733
 *                         reverb_data = None,
 *                         reverb_channels = None,
 *                         continue_old_file = False,             # <<<<<<<<<<<<<<
 *                         statistics = None,
 *                         scaled_to = False,
 */
    values[12] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));

    /* "pysndlib/clm.pyx":734
 *                         reverb_channels = None,
 *                         continue_old_file = False,
 *                         statistics = None,             # <<<<<<<<<<<<<<
 *                         scaled_to = False,
 *                         scaled_by = False,
 */
    values[13] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":735
 *                         continue_old_file = False,
 *                         statistics = None,
 *                         scaled_to = False,             # <<<<<<<<<<<<<<
 *                         scaled_by = False,
 *                         play = None,
 */
    values[14] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));

    /* "pysndlib/clm.pyx":736
 *                         statistics = None,
 *                         scaled_to = False,
 *                         scaled_by = False,             # <<<<<<<<<<<<<<
 *                         play = None,
 *                         clipped = None,
 */
    values[15] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));

    /* "pysndlib/clm.pyx":737
 *                         scaled_to = False,
 *                         scaled_by = False,
 *                         play = None,             # <<<<<<<<<<<<<<
 *                         clipped = None,
 *                         finalize = None):
 */
    values[16] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":738
 *                         scaled_by = False,
 *                         play = None,
 *                         clipped = None,             # <<<<<<<<<<<<<<
 *                         finalize = None):
 *         self.output = output if output is not None else default.file_name
 */
    values[17] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":739
 *                         play = None,
 *                         clipped = None,
 *                         finalize = None):             # <<<<<<<<<<<<<<
 *         self.output = output if output is not None else default.file_name
 *         self.channels = channels if channels is not None else default.channels
 */
    values[18] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case 19: values[18] = __Pyx_Arg_FASTCALL(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = __Pyx_Arg_FASTCALL(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = __Pyx_Arg_FASTCALL(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = __Pyx_Arg_FASTCALL(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = __Pyx_Arg_FASTCALL(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = __Pyx_Arg_FASTCALL(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_channels);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_srate);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverb);
          if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_revfile);
          if (value) { values[9] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverb_data);
          if (value) { values[10] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverb_channels);
          if (value) { values[11] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_continue_old_file);
          if (value) { values[12] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_statistics);
          if (value) { values[13] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scaled_to);
          if (value) { values[14] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scaled_by);
          if (value) { values[15] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 16:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_play);
          if (value) { values[16] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 17:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_clipped);
          if (value) { values[17] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 18:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_finalize);
          if (value) { values[18] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 722, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case 19: values[18] = __Pyx_Arg_FASTCALL(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = __Pyx_Arg_FASTCALL(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = __Pyx_Arg_FASTCALL(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = __Pyx_Arg_FASTCALL(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = __Pyx_Arg_FASTCALL(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = __Pyx_Arg_FASTCALL(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_output = values[1];
    __pyx_v_channels = values[2];
    __pyx_v_srate = values[3];
    __pyx_v_sample_type = values[4];
    __pyx_v_header_type = values[5];
    __pyx_v_comment = values[6];
    __pyx_v_verbose = values[7];
    __pyx_v_reverb = values[8];
    __pyx_v_revfile = values[9];
    __pyx_v_reverb_data = values[10];
    __pyx_v_reverb_channels = values[11];
    __pyx_v_continue_old_file = values[12];
    __pyx_v_statistics = values[13];
    __pyx_v_scaled_to = values[14];
    __pyx_v_scaled_by = values[15];
    __pyx_v_play = values[16];
    __pyx_v_clipped = values[17];
    __pyx_v_finalize = values[18];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 19, __pyx_nargs); __PYX_ERR(0, 722, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.Sound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_5Sound___init__(__pyx_self, __pyx_v_self, __pyx_v_output, __pyx_v_channels, __pyx_v_srate, __pyx_v_sample_type, __pyx_v_header_type, __pyx_v_comment, __pyx_v_verbose, __pyx_v_reverb, __pyx_v_revfile, __pyx_v_reverb_data, __pyx_v_reverb_channels, __pyx_v_continue_old_file, __pyx_v_statistics, __pyx_v_scaled_to, __pyx_v_scaled_by, __pyx_v_play, __pyx_v_clipped, __pyx_v_finalize);

  /* "pysndlib/clm.pyx":722
 *     """
 * 
 *     def __init__(self, output=None,             # <<<<<<<<<<<<<<
 *                         channels=None,
 *                         srate=None,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_5Sound___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_output, PyObject *__pyx_v_channels, PyObject *__pyx_v_srate, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment, PyObject *__pyx_v_verbose, PyObject *__pyx_v_reverb, PyObject *__pyx_v_revfile, PyObject *__pyx_v_reverb_data, PyObject *__pyx_v_reverb_channels, PyObject *__pyx_v_continue_old_file, PyObject *__pyx_v_statistics, PyObject *__pyx_v_scaled_to, PyObject *__pyx_v_scaled_by, PyObject *__pyx_v_play, PyObject *__pyx_v_clipped, PyObject *__pyx_v_finalize) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysndlib/clm.pyx":740
 *                         clipped = None,
 *                         finalize = None):
 *         self.output = output if output is not None else default.file_name             # <<<<<<<<<<<<<<
 *         self.channels = channels if channels is not None else default.channels
 *         self.srate = srate if srate is not None else default.srate
 */
  __pyx_t_2 = (__pyx_v_output != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_output);
    __pyx_t_1 = __pyx_v_output;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output, __pyx_t_1) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":741
 *                         finalize = None):
 *         self.output = output if output is not None else default.file_name
 *         self.channels = channels if channels is not None else default.channels             # <<<<<<<<<<<<<<
 *         self.srate = srate if srate is not None else default.srate
 *         self.sample_type = sample_type if sample_type is not None else default.sample_type
 */
  __pyx_t_2 = (__pyx_v_channels != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_channels);
    __pyx_t_1 = __pyx_v_channels;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_channels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_channels, __pyx_t_1) < 0) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":742
 *         self.output = output if output is not None else default.file_name
 *         self.channels = channels if channels is not None else default.channels
 *         self.srate = srate if srate is not None else default.srate             # <<<<<<<<<<<<<<
 *         self.sample_type = sample_type if sample_type is not None else default.sample_type
 *         self.header_type = header_type if header_type is not None else  default.header_type
 */
  __pyx_t_2 = (__pyx_v_srate != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_srate);
    __pyx_t_1 = __pyx_v_srate;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_srate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_srate, __pyx_t_1) < 0) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":743
 *         self.channels = channels if channels is not None else default.channels
 *         self.srate = srate if srate is not None else default.srate
 *         self.sample_type = sample_type if sample_type is not None else default.sample_type             # <<<<<<<<<<<<<<
 *         self.header_type = header_type if header_type is not None else  default.header_type
 *         self.comment = comment
 */
  __pyx_t_2 = (__pyx_v_sample_type != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_sample_type);
    __pyx_t_1 = __pyx_v_sample_type;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sample_type, __pyx_t_1) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":744
 *         self.srate = srate if srate is not None else default.srate
 *         self.sample_type = sample_type if sample_type is not None else default.sample_type
 *         self.header_type = header_type if header_type is not None else  default.header_type             # <<<<<<<<<<<<<<
 *         self.comment = comment
 *         self.verbose = verbose if verbose is not None else default.verbose
 */
  __pyx_t_2 = (__pyx_v_header_type != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_header_type);
    __pyx_t_1 = __pyx_v_header_type;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_header_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_type, __pyx_t_1) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":745
 *         self.sample_type = sample_type if sample_type is not None else default.sample_type
 *         self.header_type = header_type if header_type is not None else  default.header_type
 *         self.comment = comment             # <<<<<<<<<<<<<<
 *         self.verbose = verbose if verbose is not None else default.verbose
 *         self.reverb = reverb
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment, __pyx_v_comment) < 0) __PYX_ERR(0, 745, __pyx_L1_error)

  /* "pysndlib/clm.pyx":746
 *         self.header_type = header_type if header_type is not None else  default.header_type
 *         self.comment = comment
 *         self.verbose = verbose if verbose is not None else default.verbose             # <<<<<<<<<<<<<<
 *         self.reverb = reverb
 *         self.revfile = revfile if revfile is not None else default.reverb_file_name
 */
  __pyx_t_2 = (__pyx_v_verbose != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_verbose);
    __pyx_t_1 = __pyx_v_verbose;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_verbose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_verbose, __pyx_t_1) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":747
 *         self.comment = comment
 *         self.verbose = verbose if verbose is not None else default.verbose
 *         self.reverb = reverb             # <<<<<<<<<<<<<<
 *         self.revfile = revfile if revfile is not None else default.reverb_file_name
 *         self.reverb_data = reverb_data if reverb_data is not None else default.reverb_data
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reverb, __pyx_v_reverb) < 0) __PYX_ERR(0, 747, __pyx_L1_error)

  /* "pysndlib/clm.pyx":748
 *         self.verbose = verbose if verbose is not None else default.verbose
 *         self.reverb = reverb
 *         self.revfile = revfile if revfile is not None else default.reverb_file_name             # <<<<<<<<<<<<<<
 *         self.reverb_data = reverb_data if reverb_data is not None else default.reverb_data
 *         self.reverb_channels = reverb_channels if reverb_channels is not None else default.reverb_channels
 */
  __pyx_t_2 = (__pyx_v_revfile != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_revfile);
    __pyx_t_1 = __pyx_v_revfile;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverb_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_revfile, __pyx_t_1) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":749
 *         self.reverb = reverb
 *         self.revfile = revfile if revfile is not None else default.reverb_file_name
 *         self.reverb_data = reverb_data if reverb_data is not None else default.reverb_data             # <<<<<<<<<<<<<<
 *         self.reverb_channels = reverb_channels if reverb_channels is not None else default.reverb_channels
 *         self.continue_old_file = continue_old_file
 */
  __pyx_t_2 = (__pyx_v_reverb_data != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_reverb_data);
    __pyx_t_1 = __pyx_v_reverb_data;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reverb_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reverb_data, __pyx_t_1) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":750
 *         self.revfile = revfile if revfile is not None else default.reverb_file_name
 *         self.reverb_data = reverb_data if reverb_data is not None else default.reverb_data
 *         self.reverb_channels = reverb_channels if reverb_channels is not None else default.reverb_channels             # <<<<<<<<<<<<<<
 *         self.continue_old_file = continue_old_file
 *         self.statistics = statistics if statistics is not None else default.statistics
 */
  __pyx_t_2 = (__pyx_v_reverb_channels != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_reverb_channels);
    __pyx_t_1 = __pyx_v_reverb_channels;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverb_channels); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reverb_channels, __pyx_t_1) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":751
 *         self.reverb_data = reverb_data if reverb_data is not None else default.reverb_data
 *         self.reverb_channels = reverb_channels if reverb_channels is not None else default.reverb_channels
 *         self.continue_old_file = continue_old_file             # <<<<<<<<<<<<<<
 *         self.statistics = statistics if statistics is not None else default.statistics
 *         self.scaled_to = scaled_to
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_continue_old_file, __pyx_v_continue_old_file) < 0) __PYX_ERR(0, 751, __pyx_L1_error)

  /* "pysndlib/clm.pyx":752
 *         self.reverb_channels = reverb_channels if reverb_channels is not None else default.reverb_channels
 *         self.continue_old_file = continue_old_file
 *         self.statistics = statistics if statistics is not None else default.statistics             # <<<<<<<<<<<<<<
 *         self.scaled_to = scaled_to
 *         self.scaled_by = scaled_by
 */
  __pyx_t_2 = (__pyx_v_statistics != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_statistics);
    __pyx_t_1 = __pyx_v_statistics;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_statistics); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_statistics, __pyx_t_1) < 0) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":753
 *         self.continue_old_file = continue_old_file
 *         self.statistics = statistics if statistics is not None else default.statistics
 *         self.scaled_to = scaled_to             # <<<<<<<<<<<<<<
 *         self.scaled_by = scaled_by
 *         self.play = play if play is not None else default.play
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to, __pyx_v_scaled_to) < 0) __PYX_ERR(0, 753, __pyx_L1_error)

  /* "pysndlib/clm.pyx":754
 *         self.statistics = statistics if statistics is not None else default.statistics
 *         self.scaled_to = scaled_to
 *         self.scaled_by = scaled_by             # <<<<<<<<<<<<<<
 *         self.play = play if play is not None else default.play
 *         self.clipped = clipped if clipped is not None else default.clipped
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by, __pyx_v_scaled_by) < 0) __PYX_ERR(0, 754, __pyx_L1_error)

  /* "pysndlib/clm.pyx":755
 *         self.scaled_to = scaled_to
 *         self.scaled_by = scaled_by
 *         self.play = play if play is not None else default.play             # <<<<<<<<<<<<<<
 *         self.clipped = clipped if clipped is not None else default.clipped
 *         self.output_to_file = isinstance(self.output, str)
 */
  __pyx_t_2 = (__pyx_v_play != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_play);
    __pyx_t_1 = __pyx_v_play;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_play); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_play, __pyx_t_1) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":756
 *         self.scaled_by = scaled_by
 *         self.play = play if play is not None else default.play
 *         self.clipped = clipped if clipped is not None else default.clipped             # <<<<<<<<<<<<<<
 *         self.output_to_file = isinstance(self.output, str)
 *         self.reverb_to_file = self.reverb is not None and isinstance(self.output, str)
 */
  __pyx_t_2 = (__pyx_v_clipped != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_clipped);
    __pyx_t_1 = __pyx_v_clipped;
  } else {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clipped); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_clipped, __pyx_t_1) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":757
 *         self.play = play if play is not None else default.play
 *         self.clipped = clipped if clipped is not None else default.clipped
 *         self.output_to_file = isinstance(self.output, str)             # <<<<<<<<<<<<<<
 *         self.reverb_to_file = self.reverb is not None and isinstance(self.output, str)
 *         self.old_srate = get_srate()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyUnicode_Check(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file, __pyx_t_1) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":758
 *         self.clipped = clipped if clipped is not None else default.clipped
 *         self.output_to_file = isinstance(self.output, str)
 *         self.reverb_to_file = self.reverb is not None and isinstance(self.output, str)             # <<<<<<<<<<<<<<
 *         self.old_srate = get_srate()
 *         self.finalize = finalize
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyUnicode_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file, __pyx_t_1) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":759
 *         self.output_to_file = isinstance(self.output, str)
 *         self.reverb_to_file = self.reverb is not None and isinstance(self.output, str)
 *         self.old_srate = get_srate()             # <<<<<<<<<<<<<<
 *         self.finalize = finalize
 * 
 */
  __pyx_t_5 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_old_srate, __pyx_t_1) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":760
 *         self.reverb_to_file = self.reverb is not None and isinstance(self.output, str)
 *         self.old_srate = get_srate()
 *         self.finalize = finalize             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_finalize, __pyx_v_finalize) < 0) __PYX_ERR(0, 760, __pyx_L1_error)

  /* "pysndlib/clm.pyx":722
 *     """
 * 
 *     def __init__(self, output=None,             # <<<<<<<<<<<<<<
 *                         channels=None,
 *                         srate=None,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.Sound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":762
 *         self.finalize = finalize
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_3__enter__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_5Sound_3__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_5Sound_3__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_3__enter__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__enter__") < 0)) __PYX_ERR(0, 762, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 762, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.Sound.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_5Sound_2__enter__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_5Sound_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  double __pyx_t_7;
  double __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_sample2file __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_UCS4 __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__enter__", 1);

  /* "pysndlib/clm.pyx":763
 * 
 *     def __enter__(self):
 *         if not self.clipped:             # <<<<<<<<<<<<<<
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 *                 csndlib.mus_set_clipping(False)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clipped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":764
 *     def __enter__(self):
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):             # <<<<<<<<<<<<<<
 *                 csndlib.mus_set_clipping(False)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_2) {
    } else {
      goto __pyx_L6_next_and;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_L6_next_and:;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_BFLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_LFLOAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_BDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_LDOUBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __pyx_t_6;
    __pyx_L8_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_2;
    __pyx_t_3 = __pyx_t_6;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_3) {

      /* "pysndlib/clm.pyx":765
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 *                 csndlib.mus_set_clipping(False)             # <<<<<<<<<<<<<<
 *             else:
 *                 csndlib.mus_set_clipping(default.clipped)
 */
      (void)(mus_set_clipping(0));

      /* "pysndlib/clm.pyx":764
 *     def __enter__(self):
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):             # <<<<<<<<<<<<<<
 *                 csndlib.mus_set_clipping(False)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "pysndlib/clm.pyx":767
 *                 csndlib.mus_set_clipping(False)
 *             else:
 *                 csndlib.mus_set_clipping(default.clipped)             # <<<<<<<<<<<<<<
 *         else:
 *             csndlib.mus_set_clipping(self.clipped)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clipped); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(mus_set_clipping(__pyx_t_3));
    }
    __pyx_L4:;

    /* "pysndlib/clm.pyx":763
 * 
 *     def __enter__(self):
 *         if not self.clipped:             # <<<<<<<<<<<<<<
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 *                 csndlib.mus_set_clipping(False)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":769
 *                 csndlib.mus_set_clipping(default.clipped)
 *         else:
 *             csndlib.mus_set_clipping(self.clipped)             # <<<<<<<<<<<<<<
 * 
 *         set_srate(self.srate)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clipped); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (void)(mus_set_clipping(__pyx_t_3));
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":771
 *             csndlib.mus_set_clipping(self.clipped)
 * 
 *         set_srate(self.srate)             # <<<<<<<<<<<<<<
 *         default.srate = self.srate
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_srate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __pyx_f_8pysndlib_3clm_set_srate(__pyx_t_7, 0); if (unlikely(__pyx_t_8 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error)

  /* "pysndlib/clm.pyx":772
 * 
 *         set_srate(self.srate)
 *         default.srate = self.srate             # <<<<<<<<<<<<<<
 * 
 *         # in original why use reverb-1?
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_srate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_srate, __pyx_t_4) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":775
 * 
 *         # in original why use reverb-1?
 *         if  self.statistics :             # <<<<<<<<<<<<<<
 *             self.tic = time.perf_counter()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_statistics); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":776
 *         # in original why use reverb-1?
 *         if  self.statistics :
 *             self.tic = time.perf_counter()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_perf_counter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tic, __pyx_t_1) < 0) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":775
 * 
 *         # in original why use reverb-1?
 *         if  self.statistics :             # <<<<<<<<<<<<<<
 *             self.tic = time.perf_counter()
 * 
 */
  }

  /* "pysndlib/clm.pyx":780
 * 
 * 
 *         if self.output_to_file :             # <<<<<<<<<<<<<<
 *             if self.continue_old_file:
 *                 default.output = continue_sample2file(self.filename)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":781
 * 
 *         if self.output_to_file :
 *             if self.continue_old_file:             # <<<<<<<<<<<<<<
 *                 default.output = continue_sample2file(self.filename)
 *                 set_srate(csndlib.mus_sound_srate(self.filename)) # maybe print warning or at least note
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_continue_old_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "pysndlib/clm.pyx":782
 *         if self.output_to_file :
 *             if self.continue_old_file:
 *                 default.output = continue_sample2file(self.filename)             # <<<<<<<<<<<<<<
 *                 set_srate(csndlib.mus_sound_srate(self.filename)) # maybe print warning or at least note
 *             else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 782, __pyx_L1_error)
      __pyx_t_5 = ((PyObject *)__pyx_f_8pysndlib_3clm_continue_sample2file(((PyObject*)__pyx_t_1), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_output, __pyx_t_5) < 0) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":783
 *             if self.continue_old_file:
 *                 default.output = continue_sample2file(self.filename)
 *                 set_srate(csndlib.mus_sound_srate(self.filename)) # maybe print warning or at least note             # <<<<<<<<<<<<<<
 *             else:
 *                 default.output = make_sample2file(self.output,self.channels, sample_type=self.sample_type , header_type=self.header_type)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
      __pyx_t_8 = __pyx_f_8pysndlib_3clm_set_srate(mus_sound_srate(__pyx_t_10), 0); if (unlikely(__pyx_t_8 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":781
 * 
 *         if self.output_to_file :
 *             if self.continue_old_file:             # <<<<<<<<<<<<<<
 *                 default.output = continue_sample2file(self.filename)
 *                 set_srate(csndlib.mus_sound_srate(self.filename)) # maybe print warning or at least note
 */
      goto __pyx_L14;
    }

    /* "pysndlib/clm.pyx":785
 *                 set_srate(csndlib.mus_sound_srate(self.filename)) # maybe print warning or at least note
 *             else:
 *                 default.output = make_sample2file(self.output,self.channels, sample_type=self.sample_type , header_type=self.header_type)             # <<<<<<<<<<<<<<
 *         elif is_list_or_ndarray(self.output):
 *             default.output = self.output
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 785, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12.__pyx_n = 3;
      __pyx_t_12.chans = __pyx_t_9;
      __pyx_t_12.sample_type = __pyx_t_5;
      __pyx_t_12.header_type = __pyx_t_4;
      __pyx_t_11 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_sample2file(((PyObject*)__pyx_t_1), 0, &__pyx_t_12)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_output, __pyx_t_11) < 0) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L14:;

    /* "pysndlib/clm.pyx":780
 * 
 * 
 *         if self.output_to_file :             # <<<<<<<<<<<<<<
 *             if self.continue_old_file:
 *                 default.output = continue_sample2file(self.filename)
 */
    goto __pyx_L13;
  }

  /* "pysndlib/clm.pyx":786
 *             else:
 *                 default.output = make_sample2file(self.output,self.channels, sample_type=self.sample_type , header_type=self.header_type)
 *         elif is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *             default.output = self.output
 *         else:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_t_4, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (likely(__pyx_t_3)) {

    /* "pysndlib/clm.pyx":787
 *                 default.output = make_sample2file(self.output,self.channels, sample_type=self.sample_type , header_type=self.header_type)
 *         elif is_list_or_ndarray(self.output):
 *             default.output = self.output             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(f"writing to  {type(self.output)} not supported")
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_output, __pyx_t_11) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":786
 *             else:
 *                 default.output = make_sample2file(self.output,self.channels, sample_type=self.sample_type , header_type=self.header_type)
 *         elif is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *             default.output = self.output
 *         else:
 */
    goto __pyx_L13;
  }

  /* "pysndlib/clm.pyx":789
 *             default.output = self.output
 *         else:
 *             raise TypeError(f"writing to  {type(self.output)} not supported")             # <<<<<<<<<<<<<<
 * 
 *         if self.reverb_to_file:
 */
  /*else*/ {
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = 0;
    __pyx_t_14 = 127;
    __Pyx_INCREF(__pyx_kp_u_writing_to);
    __pyx_t_13 += 12;
    __Pyx_GIVEREF(__pyx_kp_u_writing_to);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_writing_to);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_t_11)), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_14;
    __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_not_supported);
    __pyx_t_13 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_not_supported);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_not_supported);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 789, __pyx_L1_error)
  }
  __pyx_L13:;

  /* "pysndlib/clm.pyx":791
 *             raise TypeError(f"writing to  {type(self.output)} not supported")
 * 
 *         if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *             if self.continue_old_file:
 *                 default.reverb = continue_sample2file(self.revfile)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":792
 * 
 *         if self.reverb_to_file:
 *             if self.continue_old_file:             # <<<<<<<<<<<<<<
 *                 default.reverb = continue_sample2file(self.revfile)
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_continue_old_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "pysndlib/clm.pyx":793
 *         if self.reverb_to_file:
 *             if self.continue_old_file:
 *                 default.reverb = continue_sample2file(self.revfile)             # <<<<<<<<<<<<<<
 *             else:
 *                 default.reverb = make_sample2file(self.revfile,self.reverb_channels, sample_type=self.sample_type , header_type=self.header_type)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_revfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_4))) __PYX_ERR(0, 793, __pyx_L1_error)
      __pyx_t_5 = ((PyObject *)__pyx_f_8pysndlib_3clm_continue_sample2file(((PyObject*)__pyx_t_4), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_reverb, __pyx_t_5) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pysndlib/clm.pyx":792
 * 
 *         if self.reverb_to_file:
 *             if self.continue_old_file:             # <<<<<<<<<<<<<<
 *                 default.reverb = continue_sample2file(self.revfile)
 *             else:
 */
      goto __pyx_L16;
    }

    /* "pysndlib/clm.pyx":795
 *                 default.reverb = continue_sample2file(self.revfile)
 *             else:
 *                 default.reverb = make_sample2file(self.revfile,self.reverb_channels, sample_type=self.sample_type , header_type=self.header_type)             # <<<<<<<<<<<<<<
 * 
 *         if self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_revfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_4))) __PYX_ERR(0, 795, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_channels); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12.__pyx_n = 3;
      __pyx_t_12.chans = __pyx_t_9;
      __pyx_t_12.sample_type = __pyx_t_5;
      __pyx_t_12.header_type = __pyx_t_11;
      __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_sample2file(((PyObject*)__pyx_t_4), 0, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_default); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_11, __pyx_n_s_reverb, __pyx_t_1) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_L16:;

    /* "pysndlib/clm.pyx":791
 *             raise TypeError(f"writing to  {type(self.output)} not supported")
 * 
 *         if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *             if self.continue_old_file:
 *                 default.reverb = continue_sample2file(self.revfile)
 */
  }

  /* "pysndlib/clm.pyx":797
 *                 default.reverb = make_sample2file(self.revfile,self.reverb_channels, sample_type=self.sample_type , header_type=self.header_type)
 * 
 *         if self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *             default.reverb = np.zeros((self.reverb_channels, np.shape(default.output)[1]), dtype=default.output.dtype)
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_2 = (!__pyx_t_6);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_t_11, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L18_bool_binop_done:;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":798
 * 
 *         if self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):
 *             default.reverb = np.zeros((self.reverb_channels, np.shape(default.output)[1]), dtype=default.output.dtype)             # <<<<<<<<<<<<<<
 * 
 *         return self
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_channels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_output); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_16};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_15);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_15 = 0;
    __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_output); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_default); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_reverb, __pyx_t_1) < 0) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":797
 *                 default.reverb = make_sample2file(self.revfile,self.reverb_channels, sample_type=self.sample_type , header_type=self.header_type)
 * 
 *         if self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *             default.reverb = np.zeros((self.reverb_channels, np.shape(default.output)[1]), dtype=default.output.dtype)
 * 
 */
  }

  /* "pysndlib/clm.pyx":800
 *             default.reverb = np.zeros((self.reverb_channels, np.shape(default.output)[1]), dtype=default.output.dtype)
 * 
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, *args):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":762
 *         self.finalize = finalize
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pysndlib.clm.Sound.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":802
 *         return self
 * 
 *     def __exit__(self, *args):             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_5__exit__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_5Sound_5__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_5Sound_5__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_5Sound_5__exit__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 802, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 802, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("pysndlib.clm.Sound.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_5Sound_4__exit__(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_5Sound_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  __Pyx_memviewslice __pyx_v_vals_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_times_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  CYTHON_UNUSED PyObject *__pyx_v_maxamp_result = NULL;
  PyObject *__pyx_v_toc = NULL;
  PyObject *__pyx_v_statstr = NULL;
  long __pyx_v_chans;
  PyObject *__pyx_v_vals = NULL;
  PyObject *__pyx_v_times = NULL;
  mus_long_t __pyx_v_maxamp;
  long __pyx_v_i;
  PyObject *__pyx_v_mabs = NULL;
  PyObject *__pyx_v_arr = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  long __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  char const *__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  double __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  PyObject *(*__pyx_t_21)(PyObject *);
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  double __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 1);

  /* "pysndlib/clm.pyx":803
 * 
 *     def __exit__(self, *args):
 *         cdef cclm.mus_float_t [:] vals_view = None             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_long_t [:] times_view = None
 *         maxamp_result = [0.0] * self.channels
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 803, __pyx_L1_error)
  __pyx_v_vals_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":804
 *     def __exit__(self, *args):
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None             # <<<<<<<<<<<<<<
 *         maxamp_result = [0.0] * self.channels
 *         if self.reverb:
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_long_t(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 804, __pyx_L1_error)
  __pyx_v_times_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":805
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None
 *         maxamp_result = [0.0] * self.channels             # <<<<<<<<<<<<<<
 *         if self.reverb:
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_float_0_0)) __PYX_ERR(0, 805, __pyx_L1_error);
  { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_temp);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_temp;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_maxamp_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":806
 *         cdef cclm.mus_long_t [:] times_view = None
 *         maxamp_result = [0.0] * self.channels
 *         if self.reverb:             # <<<<<<<<<<<<<<
 * 
 *             if self.reverb_to_file:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":808
 *         if self.reverb:
 * 
 *             if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *                 mus_close(default.reverb)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":809
 * 
 *             if self.reverb_to_file:
 *                 mus_close(default.reverb)             # <<<<<<<<<<<<<<
 * 
 *                 default.reverb = make_file2sample(self.revfile)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 809, __pyx_L1_error)
      __pyx_t_6 = __pyx_f_8pysndlib_3clm_mus_close(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3), 0); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":811
 *                 mus_close(default.reverb)
 * 
 *                 default.reverb = make_file2sample(self.revfile)             # <<<<<<<<<<<<<<
 * 
 *                 if isinstance(self.reverb, functools.partial):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_revfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_3))) __PYX_ERR(0, 811, __pyx_L1_error)
      __pyx_t_4 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_file2sample(((PyObject*)__pyx_t_3), 0, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_reverb, __pyx_t_4) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":813
 *                 default.reverb = make_file2sample(self.revfile)
 * 
 *                 if isinstance(self.reverb, functools.partial):             # <<<<<<<<<<<<<<
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = PyObject_IsInstance(__pyx_t_3, __pyx_t_7); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_5) {

        /* "pysndlib/clm.pyx":814
 * 
 *                 if isinstance(self.reverb, functools.partial):
 *                     self.reverb() ## reverb_data will be ignored in this case             # <<<<<<<<<<<<<<
 *                 else:
 *                     if self.reverb_data:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 814, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pysndlib/clm.pyx":813
 *                 default.reverb = make_file2sample(self.revfile)
 * 
 *                 if isinstance(self.reverb, functools.partial):             # <<<<<<<<<<<<<<
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 */
        goto __pyx_L5;
      }

      /* "pysndlib/clm.pyx":816
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 *                     if self.reverb_data:             # <<<<<<<<<<<<<<
 *                         self.reverb(**self.reverb_data)
 *                     else:
 */
      /*else*/ {
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 816, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_5) {

          /* "pysndlib/clm.pyx":817
 *                 else:
 *                     if self.reverb_data:
 *                         self.reverb(**self.reverb_data)             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.reverb()()
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__pyx_t_4 == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
            __PYX_ERR(0, 817, __pyx_L1_error)
          }
          if (likely(PyDict_CheckExact(__pyx_t_4))) {
            __pyx_t_3 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pysndlib/clm.pyx":816
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 *                     if self.reverb_data:             # <<<<<<<<<<<<<<
 *                         self.reverb(**self.reverb_data)
 *                     else:
 */
          goto __pyx_L6;
        }

        /* "pysndlib/clm.pyx":819
 *                         self.reverb(**self.reverb_data)
 *                     else:
 *                         self.reverb()()             # <<<<<<<<<<<<<<
 * 
 *                 mus_close(default.reverb)
 */
        /*else*/ {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 819, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __pyx_t_7 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_L6:;
      }
      __pyx_L5:;

      /* "pysndlib/clm.pyx":821
 *                         self.reverb()()
 * 
 *                 mus_close(default.reverb)             # <<<<<<<<<<<<<<
 * 
 *             if is_list_or_ndarray(default.reverb):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 821, __pyx_L1_error)
      __pyx_t_6 = __pyx_f_8pysndlib_3clm_mus_close(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3), 0); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":808
 *         if self.reverb:
 * 
 *             if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *                 mus_close(default.reverb)
 * 
 */
    }

    /* "pysndlib/clm.pyx":823
 *                 mus_close(default.reverb)
 * 
 *             if is_list_or_ndarray(default.reverb):             # <<<<<<<<<<<<<<
 *                 if isinstance(self.reverb, functools.partial):
 *                     self.reverb() ## reverb_data will be ignored in this case
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":824
 * 
 *             if is_list_or_ndarray(default.reverb):
 *                 if isinstance(self.reverb, functools.partial):             # <<<<<<<<<<<<<<
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = PyObject_IsInstance(__pyx_t_3, __pyx_t_7); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_5) {

        /* "pysndlib/clm.pyx":825
 *             if is_list_or_ndarray(default.reverb):
 *                 if isinstance(self.reverb, functools.partial):
 *                     self.reverb() ## reverb_data will be ignored in this case             # <<<<<<<<<<<<<<
 *                 else:
 *                     if self.reverb_data:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pysndlib/clm.pyx":824
 * 
 *             if is_list_or_ndarray(default.reverb):
 *                 if isinstance(self.reverb, functools.partial):             # <<<<<<<<<<<<<<
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 */
        goto __pyx_L8;
      }

      /* "pysndlib/clm.pyx":827
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 *                     if self.reverb_data:             # <<<<<<<<<<<<<<
 *                         self.reverb()(**self.reverb_data)
 *                     else:
 */
      /*else*/ {
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_5) {

          /* "pysndlib/clm.pyx":828
 *                 else:
 *                     if self.reverb_data:
 *                         self.reverb()(**self.reverb_data)             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.reverb()()
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
            __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 828, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__pyx_t_4 == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
            __PYX_ERR(0, 828, __pyx_L1_error)
          }
          if (likely(PyDict_CheckExact(__pyx_t_4))) {
            __pyx_t_3 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pysndlib/clm.pyx":827
 *                     self.reverb() ## reverb_data will be ignored in this case
 *                 else:
 *                     if self.reverb_data:             # <<<<<<<<<<<<<<
 *                         self.reverb()(**self.reverb_data)
 *                     else:
 */
          goto __pyx_L9;
        }

        /* "pysndlib/clm.pyx":830
 *                         self.reverb()(**self.reverb_data)
 *                     else:
 *                         self.reverb()()             # <<<<<<<<<<<<<<
 * 
 *         if self.output_to_file:
 */
        /*else*/ {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __pyx_t_7 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_L9:;
      }
      __pyx_L8:;

      /* "pysndlib/clm.pyx":823
 *                 mus_close(default.reverb)
 * 
 *             if is_list_or_ndarray(default.reverb):             # <<<<<<<<<<<<<<
 *                 if isinstance(self.reverb, functools.partial):
 *                     self.reverb() ## reverb_data will be ignored in this case
 */
    }

    /* "pysndlib/clm.pyx":806
 *         cdef cclm.mus_long_t [:] times_view = None
 *         maxamp_result = [0.0] * self.channels
 *         if self.reverb:             # <<<<<<<<<<<<<<
 * 
 *             if self.reverb_to_file:
 */
  }

  /* "pysndlib/clm.pyx":832
 *                         self.reverb()()
 * 
 *         if self.output_to_file:             # <<<<<<<<<<<<<<
 *             mus_close(default.output)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":833
 * 
 *         if self.output_to_file:
 *             mus_close(default.output)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 833, __pyx_L1_error)
    __pyx_t_6 = __pyx_f_8pysndlib_3clm_mus_close(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3), 0); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":832
 *                         self.reverb()()
 * 
 *         if self.output_to_file:             # <<<<<<<<<<<<<<
 *             mus_close(default.output)
 * 
 */
  }

  /* "pysndlib/clm.pyx":836
 * 
 * 
 *         if  self.statistics :             # <<<<<<<<<<<<<<
 *             toc = time.perf_counter()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_statistics); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":837
 * 
 *         if  self.statistics :
 *             toc = time.perf_counter()             # <<<<<<<<<<<<<<
 * 
 *             statstr = ''
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_perf_counter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_v_toc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":839
 *             toc = time.perf_counter()
 * 
 *             statstr = ''             # <<<<<<<<<<<<<<
 *             if isinstance(self.output, str):
 *                 statstr = f"{self.output}: "
 */
    __Pyx_INCREF(__pyx_kp_u__3);
    __pyx_v_statstr = __pyx_kp_u__3;

    /* "pysndlib/clm.pyx":840
 * 
 *             statstr = ''
 *             if isinstance(self.output, str):             # <<<<<<<<<<<<<<
 *                 statstr = f"{self.output}: "
 *             if self.output_to_file:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Check(__pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":841
 *             statstr = ''
 *             if isinstance(self.output, str):
 *                 statstr = f"{self.output}: "             # <<<<<<<<<<<<<<
 *             if self.output_to_file:
 *                     chans = get_channels(self.output)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_kp_u__5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":840
 * 
 *             statstr = ''
 *             if isinstance(self.output, str):             # <<<<<<<<<<<<<<
 *                 statstr = f"{self.output}: "
 *             if self.output_to_file:
 */
    }

    /* "pysndlib/clm.pyx":842
 *             if isinstance(self.output, str):
 *                 statstr = f"{self.output}: "
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                     chans = get_channels(self.output)
 *                     vals = np.zeros(chans, dtype=np.double)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":843
 *                 statstr = f"{self.output}: "
 *             if self.output_to_file:
 *                     chans = get_channels(self.output)             # <<<<<<<<<<<<<<
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int64)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_3, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_chans = __pyx_t_9;

      /* "pysndlib/clm.pyx":844
 *             if self.output_to_file:
 *                     chans = get_channels(self.output)
 *                     vals = np.zeros(chans, dtype=np.double)             # <<<<<<<<<<<<<<
 *                     times = np.zeros(chans, dtype=np.int64)
 *                     vals_view = vals
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_vals = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "pysndlib/clm.pyx":845
 *                     chans = get_channels(self.output)
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int64)             # <<<<<<<<<<<<<<
 *                     vals_view = vals
 *                     times_view = times
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10)) __PYX_ERR(0, 845, __pyx_L1_error);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_v_times = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":846
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int64)
 *                     vals_view = vals             # <<<<<<<<<<<<<<
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.output, chans, &vals_view[0], &times_view[0])
 */
      __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(__pyx_v_vals, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 846, __pyx_L1_error)
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_vals_view, 1);
      __pyx_v_vals_view = __pyx_t_1;
      __pyx_t_1.memview = NULL;
      __pyx_t_1.data = NULL;

      /* "pysndlib/clm.pyx":847
 *                     times = np.zeros(chans, dtype=np.int64)
 *                     vals_view = vals
 *                     times_view = times             # <<<<<<<<<<<<<<
 *                     maxamp = csndlib.mus_sound_maxamps(self.output, chans, &vals_view[0], &times_view[0])
 *                     maxamp_result = maxamp
 */
      __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_long_t(__pyx_v_times, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 847, __pyx_L1_error)
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_times_view, 1);
      __pyx_v_times_view = __pyx_t_2;
      __pyx_t_2.memview = NULL;
      __pyx_t_2.data = NULL;

      /* "pysndlib/clm.pyx":848
 *                     vals_view = vals
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.output, chans, &vals_view[0], &times_view[0])             # <<<<<<<<<<<<<<
 *                     maxamp_result = maxamp
 *                     statstr += f" channels: {get_channels(self.output)},"
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_8); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error)
      __pyx_t_12 = 0;
      __pyx_t_6 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_v_vals_view.shape[0];
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_v_vals_view.shape[0])) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        __PYX_ERR(0, 848, __pyx_L1_error)
      }
      __pyx_t_13 = 0;
      __pyx_t_6 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_times_view.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_times_view.shape[0])) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        __PYX_ERR(0, 848, __pyx_L1_error)
      }
      __pyx_v_maxamp = mus_sound_maxamps(__pyx_t_11, __pyx_v_chans, (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_vals_view.data + __pyx_t_12 * __pyx_v_vals_view.strides[0]) )))), (&(*((mus_long_t *) ( /* dim=0 */ (__pyx_v_times_view.data + __pyx_t_13 * __pyx_v_times_view.strides[0]) )))));
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":849
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.output, chans, &vals_view[0], &times_view[0])
 *                     maxamp_result = maxamp             # <<<<<<<<<<<<<<
 *                     statstr += f" channels: {get_channels(self.output)},"
 *                     statstr += f" length: {get_length(self.output)} samples,"
 */
      __pyx_t_8 = __Pyx_PyInt_From_int64_t(__pyx_v_maxamp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_maxamp_result, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":850
 *                     maxamp = csndlib.mus_sound_maxamps(self.output, chans, &vals_view[0], &times_view[0])
 *                     maxamp_result = maxamp
 *                     statstr += f" channels: {get_channels(self.output)},"             # <<<<<<<<<<<<<<
 *                     statstr += f" length: {get_length(self.output)} samples,"
 *                     statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 */
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_channels_2);
      __pyx_t_14 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_channels_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_channels_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__18);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":851
 *                     maxamp_result = maxamp
 *                     statstr += f" channels: {get_channels(self.output)},"
 *                     statstr += f" length: {get_length(self.output)} samples,"             # <<<<<<<<<<<<<<
 *                     statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 *                     statstr += f" maxamp: {vals} {times}, "
 */
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_length_2);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_length_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_length_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_samples);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_samples);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_samples);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":852
 *                     statstr += f" channels: {get_channels(self.output)},"
 *                     statstr += f" length: {get_length(self.output)} samples,"
 *                     statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"             # <<<<<<<<<<<<<<
 *                     statstr += f" maxamp: {vals} {times}, "
 * 
 */
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_duration);
      __pyx_t_14 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_duration);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_duration);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_16 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error)
      if (unlikely(__pyx_t_16 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 852, __pyx_L1_error)
      }
      __pyx_t_10 = PyFloat_FromDouble((((double)__pyx_t_9) / __pyx_t_16)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u_seconds);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_seconds);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_seconds);
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":853
 *                     statstr += f" length: {get_length(self.output)} samples,"
 *                     statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 *                     statstr += f" maxamp: {vals} {times}, "             # <<<<<<<<<<<<<<
 * 
 *             else:
 */
      __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_maxamp);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_maxamp);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_maxamp);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_vals, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__17);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_times, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__19);
      __pyx_t_14 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__19);
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":842
 *             if isinstance(self.output, str):
 *                 statstr = f"{self.output}: "
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                     chans = get_channels(self.output)
 *                     vals = np.zeros(chans, dtype=np.double)
 */
      goto __pyx_L13;
    }

    /* "pysndlib/clm.pyx":856
 * 
 *             else:
 *                 chans = get_channels(self.output)             # <<<<<<<<<<<<<<
 *                 vals = np.zeros(chans, dtype=np.double)
 *                 times = np.zeros(chans, dtype=np.int64)
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_8, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_chans = __pyx_t_9;

      /* "pysndlib/clm.pyx":857
 *             else:
 *                 chans = get_channels(self.output)
 *                 vals = np.zeros(chans, dtype=np.double)             # <<<<<<<<<<<<<<
 *                 times = np.zeros(chans, dtype=np.int64)
 *                 for i in range(chans):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_vals = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":858
 *                 chans = get_channels(self.output)
 *                 vals = np.zeros(chans, dtype=np.double)
 *                 times = np.zeros(chans, dtype=np.int64)             # <<<<<<<<<<<<<<
 *                 for i in range(chans):
 *                     mabs = np.abs(self.output[i])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7)) __PYX_ERR(0, 858, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_times = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":859
 *                 vals = np.zeros(chans, dtype=np.double)
 *                 times = np.zeros(chans, dtype=np.int64)
 *                 for i in range(chans):             # <<<<<<<<<<<<<<
 *                     mabs = np.abs(self.output[i])
 *                     vals[i] = np.amax(mabs)
 */
      __pyx_t_9 = __pyx_v_chans;
      __pyx_t_17 = __pyx_t_9;
      for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
        __pyx_v_i = __pyx_t_18;

        /* "pysndlib/clm.pyx":860
 *                 times = np.zeros(chans, dtype=np.int64)
 *                 for i in range(chans):
 *                     mabs = np.abs(self.output[i])             # <<<<<<<<<<<<<<
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_abs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 860, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_mabs, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pysndlib/clm.pyx":861
 *                 for i in range(chans):
 *                     mabs = np.abs(self.output[i])
 *                     vals[i] = np.amax(mabs)             # <<<<<<<<<<<<<<
 *                     times[i] = np.argmax(mabs)
 *                 statstr += f" channels: {get_channels(self.output)},"
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_amax); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_mabs};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely((__Pyx_SetItemInt(__pyx_v_vals, __pyx_v_i, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pysndlib/clm.pyx":862
 *                     mabs = np.abs(self.output[i])
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)             # <<<<<<<<<<<<<<
 *                 statstr += f" channels: {get_channels(self.output)},"
 *                 statstr += f" length: {get_length(self.output)} samples,"
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 862, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_argmax); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 862, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_mabs};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        if (unlikely((__Pyx_SetItemInt(__pyx_v_times, __pyx_v_i, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 862, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "pysndlib/clm.pyx":863
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)
 *                 statstr += f" channels: {get_channels(self.output)},"             # <<<<<<<<<<<<<<
 *                 statstr += f" length: {get_length(self.output)} samples,"
 *                 statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_channels_2);
      __pyx_t_14 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_channels_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_channels_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__18);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":864
 *                     times[i] = np.argmax(mabs)
 *                 statstr += f" channels: {get_channels(self.output)},"
 *                 statstr += f" length: {get_length(self.output)} samples,"             # <<<<<<<<<<<<<<
 *                 statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 *                 statstr += f" maxamp: {vals} {times}, "
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_length_2);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_length_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_length_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_samples);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_samples);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_samples);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":865
 *                 statstr += f" channels: {get_channels(self.output)},"
 *                 statstr += f" length: {get_length(self.output)} samples,"
 *                 statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"             # <<<<<<<<<<<<<<
 *                 statstr += f" maxamp: {vals} {times}, "
 *                 maxamp_result = vals
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_duration);
      __pyx_t_14 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_duration);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_duration);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_10, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_16 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L1_error)
      if (unlikely(__pyx_t_16 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 865, __pyx_L1_error)
      }
      __pyx_t_10 = PyFloat_FromDouble((((double)__pyx_t_9) / __pyx_t_16)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_kp_u_seconds);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_seconds);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_seconds);
      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":866
 *                 statstr += f" length: {get_length(self.output)} samples,"
 *                 statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 *                 statstr += f" maxamp: {vals} {times}, "             # <<<<<<<<<<<<<<
 *                 maxamp_result = vals
 * 
 */
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_maxamp);
      __pyx_t_14 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_maxamp);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_maxamp);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_vals, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_times, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_kp_u__19);
      __pyx_t_14 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__19);
      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":867
 *                 statstr += f" duration: {get_length(self.output) / get_srate()} seconds,"
 *                 statstr += f" maxamp: {vals} {times}, "
 *                 maxamp_result = vals             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_INCREF(__pyx_v_vals);
      __Pyx_DECREF_SET(__pyx_v_maxamp_result, __pyx_v_vals);
    }
    __pyx_L13:;

    /* "pysndlib/clm.pyx":870
 * 
 * 
 *             if self.scaled_by or self.scaled_to:             # <<<<<<<<<<<<<<
 *                 statstr += "(before scaling) "
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_19) {
    } else {
      __pyx_t_5 = __pyx_t_19;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_19;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":871
 * 
 *             if self.scaled_by or self.scaled_to:
 *                 statstr += "(before scaling) "             # <<<<<<<<<<<<<<
 * 
 *             statstr += f"compute time: {toc - self.tic:0.8f} seconds, "
 */
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_kp_u_before_scaling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":870
 * 
 * 
 *             if self.scaled_by or self.scaled_to:             # <<<<<<<<<<<<<<
 *                 statstr += "(before scaling) "
 * 
 */
    }

    /* "pysndlib/clm.pyx":873
 *                 statstr += "(before scaling) "
 * 
 *             statstr += f"compute time: {toc - self.tic:0.8f} seconds, "             # <<<<<<<<<<<<<<
 *             statstr += f"compute ratio: {(toc - self.tic) / (get_length(self.output) / get_srate())}"
 * 
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = 0;
    __pyx_t_15 = 127;
    __Pyx_INCREF(__pyx_kp_u_compute_time);
    __pyx_t_14 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_compute_time);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_compute_time);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tic); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyNumber_Subtract(__pyx_v_toc, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_kp_u_0_8f); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
    __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_seconds_2);
    __pyx_t_14 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_seconds_2);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_seconds_2);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":874
 * 
 *             statstr += f"compute time: {toc - self.tic:0.8f} seconds, "
 *             statstr += f"compute ratio: {(toc - self.tic) / (get_length(self.output) / get_srate())}"             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyNumber_Subtract(__pyx_v_toc, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_3, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_16 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_16 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error)
    if (unlikely(__pyx_t_16 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 874, __pyx_L1_error)
    }
    __pyx_t_3 = PyFloat_FromDouble((((double)__pyx_t_9) / __pyx_t_16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_kp_u_compute_ratio, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":877
 * 
 * 
 *             if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *                     chans = get_channels(self.revfile)
 *                     vals = np.zeros(chans, dtype=np.double)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":878
 * 
 *             if self.reverb_to_file:
 *                     chans = get_channels(self.revfile)             # <<<<<<<<<<<<<<
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int_)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_revfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_3, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_chans = __pyx_t_9;

      /* "pysndlib/clm.pyx":879
 *             if self.reverb_to_file:
 *                     chans = get_channels(self.revfile)
 *                     vals = np.zeros(chans, dtype=np.double)             # <<<<<<<<<<<<<<
 *                     times = np.zeros(chans, dtype=np.int_)
 *                     vals_view = vals
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_vals, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pysndlib/clm.pyx":880
 *                     chans = get_channels(self.revfile)
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int_)             # <<<<<<<<<<<<<<
 *                     vals_view = vals
 *                     times_view = times
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":881
 *                     vals = np.zeros(chans, dtype=np.double)
 *                     times = np.zeros(chans, dtype=np.int_)
 *                     vals_view = vals             # <<<<<<<<<<<<<<
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])
 */
      __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(__pyx_v_vals, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 881, __pyx_L1_error)
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_vals_view, 1);
      __pyx_v_vals_view = __pyx_t_1;
      __pyx_t_1.memview = NULL;
      __pyx_t_1.data = NULL;

      /* "pysndlib/clm.pyx":882
 *                     times = np.zeros(chans, dtype=np.int_)
 *                     vals_view = vals
 *                     times_view = times             # <<<<<<<<<<<<<<
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])
 *                     statstr += f"revmax: {vals} {times}"
 */
      __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_long_t(__pyx_v_times, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 882, __pyx_L1_error)
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_times_view, 1);
      __pyx_v_times_view = __pyx_t_2;
      __pyx_t_2.memview = NULL;
      __pyx_t_2.data = NULL;

      /* "pysndlib/clm.pyx":883
 *                     vals_view = vals
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])             # <<<<<<<<<<<<<<
 *                     statstr += f"revmax: {vals} {times}"
 *             elif self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_revfile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_7); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L1_error)
      __pyx_t_13 = 0;
      __pyx_t_6 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_vals_view.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_vals_view.shape[0])) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        __PYX_ERR(0, 883, __pyx_L1_error)
      }
      __pyx_t_12 = 0;
      __pyx_t_6 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_v_times_view.shape[0];
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_v_times_view.shape[0])) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        __PYX_ERR(0, 883, __pyx_L1_error)
      }
      __pyx_v_maxamp = mus_sound_maxamps(__pyx_t_11, __pyx_v_chans, (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_vals_view.data + __pyx_t_13 * __pyx_v_vals_view.strides[0]) )))), (&(*((mus_long_t *) ( /* dim=0 */ (__pyx_v_times_view.data + __pyx_t_12 * __pyx_v_times_view.strides[0]) )))));
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":884
 *                     times_view = times
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])
 *                     statstr += f"revmax: {vals} {times}"             # <<<<<<<<<<<<<<
 *             elif self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):
 *                 chans = get_channels(default.reverb)
 */
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_revmax);
      __pyx_t_14 += 8;
      __Pyx_GIVEREF(__pyx_kp_u_revmax);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_revmax);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_vals, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__17);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_times, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":877
 * 
 * 
 *             if self.reverb_to_file:             # <<<<<<<<<<<<<<
 *                     chans = get_channels(self.revfile)
 *                     vals = np.zeros(chans, dtype=np.double)
 */
      goto __pyx_L19;
    }

    /* "pysndlib/clm.pyx":885
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])
 *                     statstr += f"revmax: {vals} {times}"
 *             elif self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *                 chans = get_channels(default.reverb)
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_19) {
    } else {
      __pyx_t_5 = __pyx_t_19;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reverb_to_file); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_20 = (!__pyx_t_19);
    if (__pyx_t_20) {
    } else {
      __pyx_t_5 = __pyx_t_20;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_20 < 0))) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_t_20;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":886
 *                     statstr += f"revmax: {vals} {times}"
 *             elif self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):
 *                 chans = get_channels(default.reverb)             # <<<<<<<<<<<<<<
 * 
 *                 vals = np.zeros(chans, dtype=np.double)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_9 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_7, 0); if (unlikely(__pyx_t_9 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_chans = __pyx_t_9;

      /* "pysndlib/clm.pyx":888
 *                 chans = get_channels(default.reverb)
 * 
 *                 vals = np.zeros(chans, dtype=np.double)             # <<<<<<<<<<<<<<
 *                 times = np.zeros(chans, dtype=np.int_)
 *                 for i in range(chans):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_vals, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "pysndlib/clm.pyx":889
 * 
 *                 vals = np.zeros(chans, dtype=np.double)
 *                 times = np.zeros(chans, dtype=np.int_)             # <<<<<<<<<<<<<<
 *                 for i in range(chans):
 *                     mabs = np.abs(default.reverb[i])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_v_chans); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":890
 *                 vals = np.zeros(chans, dtype=np.double)
 *                 times = np.zeros(chans, dtype=np.int_)
 *                 for i in range(chans):             # <<<<<<<<<<<<<<
 *                     mabs = np.abs(default.reverb[i])
 *                     vals[i] = np.amax(mabs)
 */
      __pyx_t_9 = __pyx_v_chans;
      __pyx_t_17 = __pyx_t_9;
      for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
        __pyx_v_i = __pyx_t_18;

        /* "pysndlib/clm.pyx":891
 *                 times = np.zeros(chans, dtype=np.int_)
 *                 for i in range(chans):
 *                     mabs = np.abs(default.reverb[i])             # <<<<<<<<<<<<<<
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_abs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_default); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_reverb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_mabs, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pysndlib/clm.pyx":892
 *                 for i in range(chans):
 *                     mabs = np.abs(default.reverb[i])
 *                     vals[i] = np.amax(mabs)             # <<<<<<<<<<<<<<
 *                     times[i] = np.argmax(mabs)
 *                 statstr += f"revmax: {vals} {times}"
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_amax); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_mabs};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        if (unlikely((__Pyx_SetItemInt(__pyx_v_vals, __pyx_v_i, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pysndlib/clm.pyx":893
 *                     mabs = np.abs(default.reverb[i])
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)             # <<<<<<<<<<<<<<
 *                 statstr += f"revmax: {vals} {times}"
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_argmax); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_mabs};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely((__Pyx_SetItemInt(__pyx_v_times, __pyx_v_i, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "pysndlib/clm.pyx":894
 *                     vals[i] = np.amax(mabs)
 *                     times[i] = np.argmax(mabs)
 *                 statstr += f"revmax: {vals} {times}"             # <<<<<<<<<<<<<<
 * 
 *             print(statstr)
 */
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_revmax);
      __pyx_t_14 += 8;
      __Pyx_GIVEREF(__pyx_kp_u_revmax);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_revmax);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_vals, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_14 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_times, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_statstr, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_statstr, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":885
 *                     maxamp = csndlib.mus_sound_maxamps(self.revfile, chans, &vals_view[0], &times_view[0])
 *                     statstr += f"revmax: {vals} {times}"
 *             elif self.reverb and not self.reverb_to_file and is_list_or_ndarray(self.output):             # <<<<<<<<<<<<<<
 *                 chans = get_channels(default.reverb)
 * 
 */
    }
    __pyx_L19:;

    /* "pysndlib/clm.pyx":896
 *                 statstr += f"revmax: {vals} {times}"
 * 
 *             print(statstr)             # <<<<<<<<<<<<<<
 * 
 *         if self.scaled_to:
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_statstr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":836
 * 
 * 
 *         if  self.statistics :             # <<<<<<<<<<<<<<
 *             toc = time.perf_counter()
 * 
 */
  }

  /* "pysndlib/clm.pyx":898
 *             print(statstr)
 * 
 *         if self.scaled_to:             # <<<<<<<<<<<<<<
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":899
 * 
 *         if self.scaled_to:
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= (self.scaled_to / np.max(np.abs(arr)))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":900
 *         if self.scaled_to:
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)             # <<<<<<<<<<<<<<
 *                 arr *= (self.scaled_to / np.max(np.abs(arr)))
 *                 # handle error
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_3))) __PYX_ERR(0, 900, __pyx_L1_error)
      __pyx_t_8 = __pyx_f_8pysndlib_3clm_file2ndarray(((PyObject*)__pyx_t_3), 0, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
        PyObject* sequence = __pyx_t_8;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 900, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_21 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
        index = 0; __pyx_t_3 = __pyx_t_21(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L27_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_10 = __pyx_t_21(__pyx_t_7); if (unlikely(!__pyx_t_10)) goto __pyx_L27_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_7), 2) < 0) __PYX_ERR(0, 900, __pyx_L1_error)
        __pyx_t_21 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L28_unpacking_done;
        __pyx_L27_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_21 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 900, __pyx_L1_error)
        __pyx_L28_unpacking_done:;
      }
      __pyx_v_arr = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v__ = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "pysndlib/clm.pyx":901
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= (self.scaled_to / np.max(np.abs(arr)))             # <<<<<<<<<<<<<<
 *                 # handle error
 *                 ndarray2file(self.output, arr)
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_max); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abs); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_22))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_22);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_22, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_arr};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_22, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      }
      __pyx_t_22 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_22)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_22);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_t_3};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_InPlaceMultiply(__pyx_v_arr, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "pysndlib/clm.pyx":903
 *                 arr *= (self.scaled_to / np.max(np.abs(arr)))
 *                 # handle error
 *                 ndarray2file(self.output, arr)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_10))) __PYX_ERR(0, 903, __pyx_L1_error)
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 903, __pyx_L1_error)
      __pyx_t_7 = __pyx_f_8pysndlib_3clm_ndarray2file(((PyObject*)__pyx_t_10), ((PyArrayObject *)__pyx_v_arr), 0, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":899
 * 
 *         if self.scaled_to:
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= (self.scaled_to / np.max(np.abs(arr)))
 */
      goto __pyx_L26;
    }

    /* "pysndlib/clm.pyx":905
 *                 ndarray2file(self.output, arr)
 *             else:
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))             # <<<<<<<<<<<<<<
 *         elif self.scaled_by:
 *             if self.output_to_file:
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_to); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_max); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abs); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_24 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_23))) {
        __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_23);
        if (likely(__pyx_t_24)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_23, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_24, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_23, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      }
      __pyx_t_23 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_22))) {
        __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_22);
        if (likely(__pyx_t_23)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
          __Pyx_INCREF(__pyx_t_23);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_22, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_3};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_22, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      }
      __pyx_t_22 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_t_7, __pyx_t_22); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output, __pyx_t_8) < 0) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L26:;

    /* "pysndlib/clm.pyx":898
 *             print(statstr)
 * 
 *         if self.scaled_to:             # <<<<<<<<<<<<<<
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 */
    goto __pyx_L25;
  }

  /* "pysndlib/clm.pyx":906
 *             else:
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))
 *         elif self.scaled_by:             # <<<<<<<<<<<<<<
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":907
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))
 *         elif self.scaled_by:
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= self.scaled_by
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 907, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":908
 *         elif self.scaled_by:
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)             # <<<<<<<<<<<<<<
 *                 arr *= self.scaled_by
 *                 ndarray2file(self.output, arr)
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_8))) __PYX_ERR(0, 908, __pyx_L1_error)
      __pyx_t_22 = __pyx_f_8pysndlib_3clm_file2ndarray(((PyObject*)__pyx_t_8), 0, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_22))) || (PyList_CheckExact(__pyx_t_22))) {
        PyObject* sequence = __pyx_t_22;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 908, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_22); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __pyx_t_21 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
        index = 0; __pyx_t_8 = __pyx_t_21(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L30_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 1; __pyx_t_7 = __pyx_t_21(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L30_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_10), 2) < 0) __PYX_ERR(0, 908, __pyx_L1_error)
        __pyx_t_21 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L31_unpacking_done;
        __pyx_L30_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_21 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 908, __pyx_L1_error)
        __pyx_L31_unpacking_done:;
      }
      __pyx_v_arr = __pyx_t_8;
      __pyx_t_8 = 0;
      __pyx_v__ = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":909
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= self.scaled_by             # <<<<<<<<<<<<<<
 *                 ndarray2file(self.output, arr)
 *             else:
 */
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_7 = PyNumber_InPlaceMultiply(__pyx_v_arr, __pyx_t_22); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":910
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= self.scaled_by
 *                 ndarray2file(self.output, arr)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.output *= self.scaled_by
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_7))) __PYX_ERR(0, 910, __pyx_L1_error)
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 910, __pyx_L1_error)
      __pyx_t_22 = __pyx_f_8pysndlib_3clm_ndarray2file(((PyObject*)__pyx_t_7), ((PyArrayObject *)__pyx_v_arr), 0, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

      /* "pysndlib/clm.pyx":907
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))
 *         elif self.scaled_by:
 *             if self.output_to_file:             # <<<<<<<<<<<<<<
 *                 arr, _ = file2ndarray(self.output)
 *                 arr *= self.scaled_by
 */
      goto __pyx_L29;
    }

    /* "pysndlib/clm.pyx":912
 *                 ndarray2file(self.output, arr)
 *             else:
 *                 self.output *= self.scaled_by             # <<<<<<<<<<<<<<
 * 
 *         if self.play and self.output_to_file:
 */
    /*else*/ {
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scaled_by); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_t_22, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output, __pyx_t_8) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L29:;

    /* "pysndlib/clm.pyx":906
 *             else:
 *                 self.output *= (self.scaled_to / np.max(np.abs(self.output)))
 *         elif self.scaled_by:             # <<<<<<<<<<<<<<
 *             if self.output_to_file:
 *                 arr, _ = file2ndarray(self.output)
 */
  }
  __pyx_L25:;

  /* "pysndlib/clm.pyx":914
 *                 self.output *= self.scaled_by
 * 
 *         if self.play and self.output_to_file:             # <<<<<<<<<<<<<<
 *             if self.play:
 *                 subprocess.run([default.player,self.output])
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_play); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_20 < 0))) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_20) {
  } else {
    __pyx_t_5 = __pyx_t_20;
    goto __pyx_L33_bool_binop_done;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output_to_file); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_20 < 0))) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_5 = __pyx_t_20;
  __pyx_L33_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":915
 * 
 *         if self.play and self.output_to_file:
 *             if self.play:             # <<<<<<<<<<<<<<
 *                 subprocess.run([default.player,self.output])
 *             else:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_play); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(__pyx_t_5)) {

      /* "pysndlib/clm.pyx":916
 *         if self.play and self.output_to_file:
 *             if self.play:
 *                 subprocess.run([default.player,self.output])             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError("no player specified")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_run); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_default); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_player); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)) __PYX_ERR(0, 916, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error);
      __pyx_t_10 = 0;
      __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_22))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_22);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_22, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_22, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":915
 * 
 *         if self.play and self.output_to_file:
 *             if self.play:             # <<<<<<<<<<<<<<
 *                 subprocess.run([default.player,self.output])
 *             else:
 */
      goto __pyx_L35;
    }

    /* "pysndlib/clm.pyx":918
 *                 subprocess.run([default.player,self.output])
 *             else:
 *                 raise RuntimeError("no player specified")             # <<<<<<<<<<<<<<
 *         # need some safety if errors
 * 
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 918, __pyx_L1_error)
    }
    __pyx_L35:;

    /* "pysndlib/clm.pyx":914
 *                 self.output *= self.scaled_by
 * 
 *         if self.play and self.output_to_file:             # <<<<<<<<<<<<<<
 *             if self.play:
 *                 subprocess.run([default.player,self.output])
 */
  }

  /* "pysndlib/clm.pyx":921
 *         # need some safety if errors
 * 
 *         set_srate(self.old_srate)             # <<<<<<<<<<<<<<
 *         default.srate = self.old_srate
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_old_srate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_25 = __pyx_f_8pysndlib_3clm_set_srate(__pyx_t_16, 0); if (unlikely(__pyx_t_25 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 921, __pyx_L1_error)

  /* "pysndlib/clm.pyx":922
 * 
 *         set_srate(self.old_srate)
 *         default.srate = self.old_srate             # <<<<<<<<<<<<<<
 * 
 *         if self.finalize:
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_old_srate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_default); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_22, __pyx_n_s_srate, __pyx_t_8) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pysndlib/clm.pyx":924
 *         default.srate = self.old_srate
 * 
 *         if self.finalize:             # <<<<<<<<<<<<<<
 *             self.finalize(self.output)
 * 
 */
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finalize); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":925
 * 
 *         if self.finalize:
 *             self.finalize(self.output)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finalize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
      __pyx_t_22 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

    /* "pysndlib/clm.pyx":924
 *         default.srate = self.old_srate
 * 
 *         if self.finalize:             # <<<<<<<<<<<<<<
 *             self.finalize(self.output)
 * 
 */
  }

  /* "pysndlib/clm.pyx":802
 *         return self
 * 
 *     def __exit__(self, *args):             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_AddTraceback("pysndlib.clm.Sound.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_vals_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_times_view, 1);
  __Pyx_XDECREF(__pyx_v_maxamp_result);
  __Pyx_XDECREF(__pyx_v_toc);
  __Pyx_XDECREF(__pyx_v_statstr);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_XDECREF(__pyx_v_times);
  __Pyx_XDECREF(__pyx_v_mabs);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":928
 * 
 * 
 * cpdef is_list_or_ndarray(x):             # <<<<<<<<<<<<<<
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_11is_list_or_ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_list_or_ndarray(PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_list_or_ndarray", 1);

  /* "pysndlib/clm.pyx":929
 * 
 * cpdef is_list_or_ndarray(x):
 *     return isinstance(x, list) or isinstance(x, np.ndarray)             # <<<<<<<<<<<<<<
 * 
 * cpdef is_power_of_2(x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_Check(__pyx_v_x); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_x, __pyx_ptype_5numpy_ndarray); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":928
 * 
 * 
 * cpdef is_list_or_ndarray(x):             # <<<<<<<<<<<<<<
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.is_list_or_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_11is_list_or_ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_11is_list_or_ndarray = {"is_list_or_ndarray", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_11is_list_or_ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_11is_list_or_ndarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_list_or_ndarray (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 928, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_list_or_ndarray") < 0)) __PYX_ERR(0, 928, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_list_or_ndarray", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 928, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_list_or_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_10is_list_or_ndarray(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_10is_list_or_ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_list_or_ndarray", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_v_x, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_list_or_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":931
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 * cpdef is_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return (((x) - 1) & (x)) == 0
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_13is_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_power_of_2(PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_power_of_2", 1);

  /* "pysndlib/clm.pyx":932
 * 
 * cpdef is_power_of_2(x):
 *     return (((x) - 1) & (x)) == 0             # <<<<<<<<<<<<<<
 * 
 * cpdef next_power_of_2(x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_x, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":931
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 * cpdef is_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return (((x) - 1) & (x)) == 0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_13is_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_13is_power_of_2 = {"is_power_of_2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13is_power_of_2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_13is_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_power_of_2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_power_of_2") < 0)) __PYX_ERR(0, 931, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_power_of_2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 931, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_12is_power_of_2(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_12is_power_of_2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_power_of_2", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_power_of_2(__pyx_v_x, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":934
 *     return (((x) - 1) & (x)) == 0
 * 
 * cpdef next_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return 2**int(1 + (float(math.log(x + 1)) / math.log(2.0)))
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_15next_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_next_power_of_2(PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next_power_of_2", 1);

  /* "pysndlib/clm.pyx":935
 * 
 * cpdef next_power_of_2(x):
 *     return 2**int(1 + (float(math.log(x + 1)) / math.log(2.0)))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_x, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_float_2_0};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_t_4, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_PowerOf2(__pyx_int_2, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":934
 *     return (((x) - 1) & (x)) == 0
 * 
 * cpdef next_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return 2**int(1 + (float(math.log(x + 1)) / math.log(2.0)))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.next_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_15next_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_15next_power_of_2 = {"next_power_of_2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_15next_power_of_2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_15next_power_of_2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next_power_of_2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "next_power_of_2") < 0)) __PYX_ERR(0, 934, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("next_power_of_2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 934, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.next_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_14next_power_of_2(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_14next_power_of_2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next_power_of_2", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_next_power_of_2(__pyx_v_x, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.next_power_of_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":939
 * 
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):             # <<<<<<<<<<<<<<
 *     if isinstance(harms, list):
 *         p = harms[::2]
 */

static PyObject *__pyx_pw_8pysndlib_3clm_17to_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_to_partials(PyObject *__pyx_v_harms, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_maxpartial = NULL;
  PyObject *__pyx_v_partials = NULL;
  PyObject *__pyx_v_i = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_partials", 1);

  /* "pysndlib/clm.pyx":940
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):
 *     if isinstance(harms, list):             # <<<<<<<<<<<<<<
 *         p = harms[::2]
 *         maxpartial = max(p)
 */
  __pyx_t_1 = PyList_Check(__pyx_v_harms); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":941
 * cpdef np.ndarray to_partials(harms):
 *     if isinstance(harms, list):
 *         p = harms[::2]             # <<<<<<<<<<<<<<
 *         maxpartial = max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 */
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_slice__21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_p = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":942
 *     if isinstance(harms, list):
 *         p = harms[::2]
 *         maxpartial = max(p)             # <<<<<<<<<<<<<<
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_maxpartial = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":943
 *         p = harms[::2]
 *         maxpartial = max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_maxpartial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_partials = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":944
 *         maxpartial = max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)             # <<<<<<<<<<<<<<
 *         for i in range(0, len(harms),2):
 *             partials[int(harms[i])] = harms[i+1]
 */
    __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":945
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):             # <<<<<<<<<<<<<<
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_harms); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 945, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 945, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_2)) __PYX_ERR(0, 945, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 945, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 945, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 945, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 945, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 945, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pysndlib/clm.pyx":946
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):
 *             partials[int(harms[i])] = harms[i+1]             # <<<<<<<<<<<<<<
 *         #print('to_partials', partials)
 *         return partials
 */
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_partials, __pyx_t_3, __pyx_t_2) < 0))) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pysndlib/clm.pyx":945
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):             # <<<<<<<<<<<<<<
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":948
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 *         return partials             # <<<<<<<<<<<<<<
 *     elif isinstance(harms[0], np.double):
 *         p = harms[::2]
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (!(likely(((__pyx_v_partials) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_partials, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 948, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_partials);
    __pyx_r = ((PyArrayObject *)__pyx_v_partials);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":940
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):
 *     if isinstance(harms, list):             # <<<<<<<<<<<<<<
 *         p = harms[::2]
 *         maxpartial = max(p)
 */
  }

  /* "pysndlib/clm.pyx":949
 *         #print('to_partials', partials)
 *         return partials
 *     elif isinstance(harms[0], np.double):             # <<<<<<<<<<<<<<
 *         p = harms[::2]
 *         maxpartial = np.max(p)
 */
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_harms, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_t_4, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":950
 *         return partials
 *     elif isinstance(harms[0], np.double):
 *         p = harms[::2]             # <<<<<<<<<<<<<<
 *         maxpartial = np.max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_slice__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_p = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":951
 *     elif isinstance(harms[0], np.double):
 *         p = harms[::2]
 *         maxpartial = np.max(p)             # <<<<<<<<<<<<<<
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_p};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_maxpartial = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":952
 *         p = harms[::2]
 *         maxpartial = np.max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_maxpartial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_partials = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":953
 *         maxpartial = np.max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)             # <<<<<<<<<<<<<<
 *         for i in range(0, len(harms),2):
 *             partials[int(harms[i])] = harms[i+1]
 */
    __pyx_t_5 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":954
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):             # <<<<<<<<<<<<<<
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_harms); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 954, __pyx_L1_error)
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 954, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_2)) __PYX_ERR(0, 954, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 954, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "pysndlib/clm.pyx":955
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):
 *             partials[int(harms[i])] = harms[i+1]             # <<<<<<<<<<<<<<
 *         #print('to_partials', partials)
 *         return partials
 */
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_harms, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_partials, __pyx_t_2, __pyx_t_3) < 0))) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":954
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 *         check_ndim(partials)
 *         for i in range(0, len(harms),2):             # <<<<<<<<<<<<<<
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":957
 *             partials[int(harms[i])] = harms[i+1]
 *         #print('to_partials', partials)
 *         return partials             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(f'{type(harms)} cannot be converted to a mus_float_array')
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (!(likely(((__pyx_v_partials) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_partials, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_partials);
    __pyx_r = ((PyArrayObject *)__pyx_v_partials);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":949
 *         #print('to_partials', partials)
 *         return partials
 *     elif isinstance(harms[0], np.double):             # <<<<<<<<<<<<<<
 *         p = harms[::2]
 *         maxpartial = np.max(p)
 */
  }

  /* "pysndlib/clm.pyx":959
 *         return partials
 *     else:
 *         raise TypeError(f'{type(harms)} cannot be converted to a mus_float_array')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_harms)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_cannot_be_converted_to_a_mus_fl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 959, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":939
 * 
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):             # <<<<<<<<<<<<<<
 *     if isinstance(harms, list):
 *         p = harms[::2]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.to_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_maxpartial);
  __Pyx_XDECREF(__pyx_v_partials);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_17to_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_17to_partials = {"to_partials", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_17to_partials, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_17to_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_harms = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_partials (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_harms,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_harms)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_partials") < 0)) __PYX_ERR(0, 939, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_harms = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_partials", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 939, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.to_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_16to_partials(__pyx_self, __pyx_v_harms);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16to_partials(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_harms) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_partials", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_to_partials(__pyx_v_harms, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.to_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":965
 * 
 * 
 * cpdef int mus_close(mus_any obj):             # <<<<<<<<<<<<<<
 *     return cclm.mus_close_file(obj._ptr)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_19mus_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_mus_close(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":966
 * 
 * cpdef int mus_close(mus_any obj):
 *     return cclm.mus_close_file(obj._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint mus_is_output(mus_any obj):
 */
  __pyx_r = mus_close_file(__pyx_v_obj->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":965
 * 
 * 
 * cpdef int mus_close(mus_any obj):             # <<<<<<<<<<<<<<
 *     return cclm.mus_close_file(obj._ptr)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_19mus_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_19mus_close = {"mus_close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_19mus_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_19mus_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_close") < 0)) __PYX_ERR(0, 965, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 965, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "obj", 0))) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_18mus_close(__pyx_self, __pyx_v_obj);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_18mus_close(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_close", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_mus_close(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.mus_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":968
 *     return cclm.mus_close_file(obj._ptr)
 * 
 * cpdef bint mus_is_output(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */

static PyObject *__pyx_pw_8pysndlib_3clm_21mus_is_output(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_mus_is_output(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":972
 *     returns True if gen is a type of output
 *     """
 *     return cclm.mus_is_output(obj._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint mus_is_input(mus_any obj):
 */
  __pyx_r = mus_is_output(__pyx_v_obj->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":968
 *     return cclm.mus_close_file(obj._ptr)
 * 
 * cpdef bint mus_is_output(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_21mus_is_output(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_20mus_is_output, "\n    returns True if gen is a type of output\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_21mus_is_output = {"mus_is_output", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_21mus_is_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_20mus_is_output};
static PyObject *__pyx_pw_8pysndlib_3clm_21mus_is_output(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_is_output (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_is_output") < 0)) __PYX_ERR(0, 968, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_is_output", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 968, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_is_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "obj", 0))) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_20mus_is_output(__pyx_self, __pyx_v_obj);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_20mus_is_output(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_is_output", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_mus_is_output(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.mus_is_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":974
 *     return cclm.mus_is_output(obj._ptr)
 * 
 * cpdef bint mus_is_input(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */

static PyObject *__pyx_pw_8pysndlib_3clm_23mus_is_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_mus_is_input(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":978
 *     returns True if gen is a type of output
 *     """
 *     return cclm.mus_is_input(obj._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_reset(mus_any obj):
 */
  __pyx_r = mus_is_input(__pyx_v_obj->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":974
 *     return cclm.mus_is_output(obj._ptr)
 * 
 * cpdef bint mus_is_input(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_23mus_is_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_22mus_is_input, "\n    returns True if gen is a type of output\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_23mus_is_input = {"mus_is_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_23mus_is_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_22mus_is_input};
static PyObject *__pyx_pw_8pysndlib_3clm_23mus_is_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_is_input (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_is_input") < 0)) __PYX_ERR(0, 974, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_is_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 974, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_is_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "obj", 0))) __PYX_ERR(0, 974, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_22mus_is_input(__pyx_self, __pyx_v_obj);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_22mus_is_input(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_is_input", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_mus_is_input(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.mus_is_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":980
 *     return cclm.mus_is_input(obj._ptr)
 * 
 * cpdef mus_reset(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     set gen to default starting state
 */

static PyObject *__pyx_pw_8pysndlib_3clm_25mus_reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_mus_reset(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_reset", 1);

  /* "pysndlib/clm.pyx":984
 *     set gen to default starting state
 *     """
 *     cclm.mus_reset(obj._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  mus_reset(__pyx_v_obj->_ptr);

  /* "pysndlib/clm.pyx":980
 *     return cclm.mus_is_input(obj._ptr)
 * 
 * cpdef mus_reset(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     set gen to default starting state
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_25mus_reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_24mus_reset, "\n    set gen to default starting state\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_25mus_reset = {"mus_reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_25mus_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_24mus_reset};
static PyObject *__pyx_pw_8pysndlib_3clm_25mus_reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 980, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_reset") < 0)) __PYX_ERR(0, 980, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 980, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "obj", 0))) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_24mus_reset(__pyx_self, __pyx_v_obj);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_24mus_reset(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_reset", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_mus_reset(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":991
 * # --------------- length ---------------- #
 * 
 * cpdef cython.long get_length(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 */

static PyObject *__pyx_pw_8pysndlib_3clm_27get_length(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_length(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  long __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_length", 1);

  /* "pysndlib/clm.pyx":994
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_framples(obj)
 *     #sndlib gen
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":995
 *     #assume file
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_framples(obj)             # <<<<<<<<<<<<<<
 *     #sndlib gen
 *     elif  isinstance(obj, mus_any):
 */
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_obj); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L1_error)
    __pyx_r = mus_sound_framples(__pyx_t_2);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":994
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_framples(obj)
 *     #sndlib gen
 */
  }

  /* "pysndlib/clm.pyx":997
 *         return csndlib.mus_sound_framples(obj)
 *     #sndlib gen
 *     elif  isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_8pysndlib_3clm_mus_any); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":998
 *     #sndlib gen
 *     elif  isinstance(obj, mus_any):
 *         return obj.mus_length             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_mus_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":997
 *         return csndlib.mus_sound_framples(obj)
 *     #sndlib gen
 *     elif  isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 */
  }

  /* "pysndlib/clm.pyx":999
 *     elif  isinstance(obj, mus_any):
 *         return obj.mus_length
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         if isinstance(obj[0], list):
 *             return len(obj[0])
 */
  __pyx_t_1 = PyList_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1000
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):             # <<<<<<<<<<<<<<
 *             return len(obj[0])
 *         else:
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyList_Check(__pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1001
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):
 *             return len(obj[0])             # <<<<<<<<<<<<<<
 *         else:
 *             return len(obj)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1001, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1000
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):             # <<<<<<<<<<<<<<
 *             return len(obj[0])
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":1003
 *             return len(obj[0])
 *         else:
 *             return len(obj)             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 */
    /*else*/ {
      __pyx_t_5 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1003, __pyx_L1_error)
      __pyx_r = __pyx_t_5;
      goto __pyx_L0;
    }

    /* "pysndlib/clm.pyx":999
 *     elif  isinstance(obj, mus_any):
 *         return obj.mus_length
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         if isinstance(obj[0], list):
 *             return len(obj[0])
 */
  }

  /* "pysndlib/clm.pyx":1004
 *         else:
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_5numpy_ndarray); 
  if (likely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":1005
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1006
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]             # <<<<<<<<<<<<<<
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[1]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_obj};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1005
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 */
    }

    /* "pysndlib/clm.pyx":1007
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[1]
 *         else:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_7, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":1008
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[1]             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}.')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1008, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1007
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[1]
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":1010
 *             return np.shape(obj)[1]
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}.')             # <<<<<<<<<<<<<<
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful length. ')
 */
    /*else*/ {
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_5 += 40;
      __Pyx_GIVEREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_);
      __pyx_t_5 += 1;
      __Pyx_GIVEREF(__pyx_kp_u_);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1010, __pyx_L1_error)
    }

    /* "pysndlib/clm.pyx":1004
 *         else:
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 */
  }

  /* "pysndlib/clm.pyx":1012
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}.')
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful length. ')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_object_2);
    __pyx_t_5 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_object_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_object_2);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_obj, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_no_meaningful_length);
    __pyx_t_5 += 27;
    __Pyx_GIVEREF(__pyx_kp_u_has_no_meaningful_length);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_has_no_meaningful_length);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1012, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":991
 * # --------------- length ---------------- #
 * 
 * cpdef cython.long get_length(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.get_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_27get_length(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_26get_length, "Returns length in samples of a sound file, list, ndarray, or generator");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_27get_length = {"get_length", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_27get_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_26get_length};
static PyObject *__pyx_pw_8pysndlib_3clm_27get_length(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_length (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_length") < 0)) __PYX_ERR(0, 991, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_length", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 991, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.get_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_26get_length(__pyx_self, __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_26get_length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_length", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_length(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.get_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1019
 * # --------------- channels ---------------- #
 * 
 * cpdef cython.long get_channels(obj):             # <<<<<<<<<<<<<<
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):
 */

static PyObject *__pyx_pw_8pysndlib_3clm_29get_channels(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_channels(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  long __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_channels", 1);

  /* "pysndlib/clm.pyx":1021
 * cpdef cython.long get_channels(obj):
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_chans(obj)
 *     elif isinstance(obj, mus_any):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1022
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_chans(obj)             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_channels
 */
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_obj); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)
    __pyx_r = mus_sound_chans(__pyx_t_2);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1021
 * cpdef cython.long get_channels(obj):
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_chans(obj)
 *     elif isinstance(obj, mus_any):
 */
  }

  /* "pysndlib/clm.pyx":1023
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_chans(obj)
 *     elif isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_channels
 *     elif isinstance(obj, list):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_8pysndlib_3clm_mus_any); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1024
 *         return csndlib.mus_sound_chans(obj)
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_channels             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, list):
 *         return len(obj)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_mus_channels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1023
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_chans(obj)
 *     elif isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_channels
 *     elif isinstance(obj, list):
 */
  }

  /* "pysndlib/clm.pyx":1025
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_channels
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):
 */
  __pyx_t_1 = PyList_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1026
 *         return obj.mus_channels
 *     elif isinstance(obj, list):
 *         return len(obj)             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1026, __pyx_L1_error)
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1025
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_channels
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):
 */
  }

  /* "pysndlib/clm.pyx":1027
 *     elif isinstance(obj, list):
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return 1
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_5numpy_ndarray); 
  if (likely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":1028
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return 1
 *         elif obj.ndim == 2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1028, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1029
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 *             return 1             # <<<<<<<<<<<<<<
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[0]
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1028
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return 1
 *         elif obj.ndim == 2:
 */
    }

    /* "pysndlib/clm.pyx":1030
 *         if obj.ndim == 1:
 *             return 1
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":1031
 *             return 1
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[0]             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_obj};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1030
 *         if obj.ndim == 1:
 *             return 1
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":1033
 *             return np.shape(obj)[0]
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')             # <<<<<<<<<<<<<<
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful channels. ')
 */
    /*else*/ {
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_5 += 40;
      __Pyx_GIVEREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__13);
      __pyx_t_5 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__13);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__13);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1033, __pyx_L1_error)
    }

    /* "pysndlib/clm.pyx":1027
 *     elif isinstance(obj, list):
 *         return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return 1
 */
  }

  /* "pysndlib/clm.pyx":1035
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful channels. ')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_object_2);
    __pyx_t_5 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_object_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_object_2);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_obj, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_no_meaningful_channels);
    __pyx_t_5 += 29;
    __Pyx_GIVEREF(__pyx_kp_u_has_no_meaningful_channels);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_has_no_meaningful_channels);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 1035, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":1019
 * # --------------- channels ---------------- #
 * 
 * cpdef cython.long get_channels(obj):             # <<<<<<<<<<<<<<
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.get_channels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_29get_channels(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_28get_channels, "Returns number of channels of a sound file, list, ndarray");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_29get_channels = {"get_channels", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_29get_channels, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_28get_channels};
static PyObject *__pyx_pw_8pysndlib_3clm_29get_channels(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_channels (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_channels") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_channels", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1019, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.get_channels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_28get_channels(__pyx_self, __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_28get_channels(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_channels", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.get_channels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1042
 * 
 * 
 * cpdef cython.double get_srate(obj=None):             # <<<<<<<<<<<<<<
 *     """Return current sample rate"""
 *     if obj is None:
 */

static PyObject *__pyx_pw_8pysndlib_3clm_31get_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_get_srate(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_get_srate *__pyx_optional_args) {
  PyObject *__pyx_v_obj = ((PyObject *)Py_None);
  double __pyx_r;
  int __pyx_t_1;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_obj = __pyx_optional_args->obj;
    }
  }

  /* "pysndlib/clm.pyx":1044
 * cpdef cython.double get_srate(obj=None):
 *     """Return current sample rate"""
 *     if obj is None:             # <<<<<<<<<<<<<<
 *             return cclm.mus_srate()
 *     else:
 */
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1045
 *     """Return current sample rate"""
 *     if obj is None:
 *             return cclm.mus_srate()             # <<<<<<<<<<<<<<
 *     else:
 *         return csndlib.mus_sound_srate(obj)
 */
    __pyx_r = mus_srate();
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1044
 * cpdef cython.double get_srate(obj=None):
 *     """Return current sample rate"""
 *     if obj is None:             # <<<<<<<<<<<<<<
 *             return cclm.mus_srate()
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":1047
 *             return cclm.mus_srate()
 *     else:
 *         return csndlib.mus_sound_srate(obj)             # <<<<<<<<<<<<<<
 * 
 * # --------------- framples ---------------- #
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_obj); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1047, __pyx_L1_error)
    __pyx_r = mus_sound_srate(__pyx_t_2);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":1042
 * 
 * 
 * cpdef cython.double get_srate(obj=None):             # <<<<<<<<<<<<<<
 *     """Return current sample rate"""
 *     if obj is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.get_srate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_31get_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_30get_srate, "Return current sample rate");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_31get_srate = {"get_srate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_31get_srate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_30get_srate};
static PyObject *__pyx_pw_8pysndlib_3clm_31get_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_srate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_srate") < 0)) __PYX_ERR(0, 1042, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_srate", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1042, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.get_srate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_30get_srate(__pyx_self, __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_30get_srate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_get_srate __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_srate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.obj = __pyx_v_obj;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.get_srate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1051
 * # --------------- framples ---------------- #
 * 
 * cpdef cython.long get_framples(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):
 */

static PyObject *__pyx_pw_8pysndlib_3clm_33get_framples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static long __pyx_f_8pysndlib_3clm_get_framples(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  long __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_framples", 1);

  /* "pysndlib/clm.pyx":1053
 * cpdef cython.long get_framples(obj):
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_framples(obj)
 *     elif isinstance(obj, mus_any):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1054
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_framples(obj)             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_length
 */
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_obj); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1054, __pyx_L1_error)
    __pyx_r = mus_sound_framples(__pyx_t_2);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1053
 * cpdef cython.long get_framples(obj):
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):             # <<<<<<<<<<<<<<
 *         return csndlib.mus_sound_framples(obj)
 *     elif isinstance(obj, mus_any):
 */
  }

  /* "pysndlib/clm.pyx":1055
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_framples(obj)
 *     elif isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_8pysndlib_3clm_mus_any); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1056
 *         return csndlib.mus_sound_framples(obj)
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_length             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_mus_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":1055
 *     if isinstance(obj, str):
 *         return csndlib.mus_sound_framples(obj)
 *     elif isinstance(obj, mus_any):             # <<<<<<<<<<<<<<
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 */
  }

  /* "pysndlib/clm.pyx":1057
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_length
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         if isinstance(obj[0], list):
 *             return len(obj[0])
 */
  __pyx_t_1 = PyList_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1058
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):             # <<<<<<<<<<<<<<
 *             return len(obj[0])
 *         else:
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyList_Check(__pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1059
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):
 *             return len(obj[0])             # <<<<<<<<<<<<<<
 *         else:
 *             return len(obj)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1058
 *         return obj.mus_length
 *     elif isinstance(obj, list):
 *         if isinstance(obj[0], list):             # <<<<<<<<<<<<<<
 *             return len(obj[0])
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":1061
 *             return len(obj[0])
 *         else:
 *             return len(obj)             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 */
    /*else*/ {
      __pyx_t_5 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1061, __pyx_L1_error)
      __pyx_r = __pyx_t_5;
      goto __pyx_L0;
    }

    /* "pysndlib/clm.pyx":1057
 *     elif isinstance(obj, mus_any):
 *         return obj.mus_length
 *     elif isinstance(obj, list):             # <<<<<<<<<<<<<<
 *         if isinstance(obj[0], list):
 *             return len(obj[0])
 */
  }

  /* "pysndlib/clm.pyx":1062
 *         else:
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_5numpy_ndarray); 
  if (likely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":1063
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1064
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]             # <<<<<<<<<<<<<<
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[1]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_obj};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1063
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):
 *         if obj.ndim == 1:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 */
    }

    /* "pysndlib/clm.pyx":1065
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[1]
 *         else:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_7, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(__pyx_t_1)) {

      /* "pysndlib/clm.pyx":1066
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:
 *             return np.shape(obj)[1]             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1066, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":1065
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 *         elif obj.ndim == 2:             # <<<<<<<<<<<<<<
 *             return np.shape(obj)[1]
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":1068
 *             return np.shape(obj)[1]
 *         else:
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')             # <<<<<<<<<<<<<<
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful framples. ')
 */
    /*else*/ {
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_5 += 40;
      __Pyx_GIVEREF(__pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_ndarray_must_have_1_or_2_dimensi);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__13);
      __pyx_t_5 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__13);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__13);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1068, __pyx_L1_error)
    }

    /* "pysndlib/clm.pyx":1062
 *         else:
 *             return len(obj)
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         if obj.ndim == 1:
 *             return np.shape(obj)[0]
 */
  }

  /* "pysndlib/clm.pyx":1070
 *             raise RuntimeError(f'ndarray must have 1 or 2 dimensions not {obj.ndim}. ')
 *     else:
 *         raise RuntimeError(f'object {obj} has no meaningful framples. ')             # <<<<<<<<<<<<<<
 * 
 * # --------------- clm random ---------------- #
 */
  /*else*/ {
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_object_2);
    __pyx_t_5 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_object_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_object_2);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_obj, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_no_meaningful_framples);
    __pyx_t_5 += 29;
    __Pyx_GIVEREF(__pyx_kp_u_has_no_meaningful_framples);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_has_no_meaningful_framples);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1070, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":1051
 * # --------------- framples ---------------- #
 * 
 * cpdef cython.long get_framples(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.get_framples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_33get_framples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_32get_framples, "Returns length in frames of a sound file, list, ndarray, or generator");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_33get_framples = {"get_framples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_33get_framples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_32get_framples};
static PyObject *__pyx_pw_8pysndlib_3clm_33get_framples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_framples (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_framples") < 0)) __PYX_ERR(0, 1051, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_framples", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1051, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.get_framples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_32get_framples(__pyx_self, __pyx_v_obj);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_32get_framples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_framples", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_framples(__pyx_v_obj, 0); if (unlikely(__pyx_t_1 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.get_framples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1074
 * # --------------- clm random ---------------- #
 * 
 * cpdef cython.double random(cython.double x=1.0):             # <<<<<<<<<<<<<<
 *     """Returns random number +- x"""
 *     return cclm.mus_random(x)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_35random(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_random(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_random *__pyx_optional_args) {
  double __pyx_v_x = ((double)1.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_x = __pyx_optional_args->x;
    }
  }

  /* "pysndlib/clm.pyx":1076
 * cpdef cython.double random(cython.double x=1.0):
 *     """Returns random number +- x"""
 *     return cclm.mus_random(x)             # <<<<<<<<<<<<<<
 * # --------------- just some extra utils ---------------- #
 * 
 */
  __pyx_r = mus_random(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1074
 * # --------------- clm random ---------------- #
 * 
 * cpdef cython.double random(cython.double x=1.0):             # <<<<<<<<<<<<<<
 *     """Returns random number +- x"""
 *     return cclm.mus_random(x)
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_35random(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_34random, "Returns random number +- x");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_35random = {"random", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_35random, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_34random};
static PyObject *__pyx_pw_8pysndlib_3clm_35random(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("random (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "random") < 0)) __PYX_ERR(0, 1074, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L3_error)
    } else {
      __pyx_v_x = ((double)1.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("random", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1074, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_34random(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_34random(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_random __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.x = __pyx_v_x;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_random(0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1079
 * # --------------- just some extra utils ---------------- #
 * 
 * def validate_envelope(e):             # <<<<<<<<<<<<<<
 *     # is env even number length
 *     if len(e) < 2:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_37validate_envelope(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_37validate_envelope = {"validate_envelope", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_37validate_envelope, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_37validate_envelope(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_e = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("validate_envelope (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_e,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_e)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "validate_envelope") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_e = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("validate_envelope", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1079, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.validate_envelope", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_36validate_envelope(__pyx_self, __pyx_v_e);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_8pysndlib_3clm_17validate_envelope_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pysndlib/clm.pyx":1088
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("x values of envelope must be increasing")
 * 
 */

static PyObject *__pyx_pf_8pysndlib_3clm_17validate_envelope_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct__genexpr(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1088, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8pysndlib_3clm_17validate_envelope_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_validate_envelope_locals_genexpr, __pyx_n_s_pysndlib_clm); if (unlikely(!gen)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.validate_envelope.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_8pysndlib_3clm_17validate_envelope_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1088, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1088, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1088, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1088, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1088, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_j);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_cur_scope->__pyx_v_j, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = (!__pyx_t_9);
    if (__pyx_t_10) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1079
 * # --------------- just some extra utils ---------------- #
 * 
 * def validate_envelope(e):             # <<<<<<<<<<<<<<
 *     # is env even number length
 *     if len(e) < 2:
 */

static PyObject *__pyx_pf_8pysndlib_3clm_36validate_envelope(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_e) {
  PyObject *__pyx_7genexpr__pyx_v_i = NULL;
  PyObject *__pyx_gb_8pysndlib_3clm_17validate_envelope_2generator1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("validate_envelope", 1);

  /* "pysndlib/clm.pyx":1081
 * def validate_envelope(e):
 *     # is env even number length
 *     if len(e) < 2:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1081, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 < 2);
  if (unlikely(__pyx_t_2)) {

    /* "pysndlib/clm.pyx":1082
 *     # is env even number length
 *     if len(e) < 2:
 *         raise RuntimeError("a valid envelope needs at least 2 elements")             # <<<<<<<<<<<<<<
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1082, __pyx_L1_error)

    /* "pysndlib/clm.pyx":1081
 * def validate_envelope(e):
 *     # is env even number length
 *     if len(e) < 2:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:
 */
  }

  /* "pysndlib/clm.pyx":1083
 *     if len(e) < 2:
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1083, __pyx_L1_error)
  __pyx_t_2 = (__Pyx_mod_Py_ssize_t(__pyx_t_1, 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pysndlib/clm.pyx":1084
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")             # <<<<<<<<<<<<<<
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1084, __pyx_L1_error)

    /* "pysndlib/clm.pyx":1083
 *     if len(e) < 2:
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):
 */
  }

  /* "pysndlib/clm.pyx":1085
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):             # <<<<<<<<<<<<<<
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 */
  __pyx_t_2 = PyList_Check(__pyx_v_e); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":1086
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):             # <<<<<<<<<<<<<<
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_e)) || PyTuple_CheckExact(__pyx_v_e)) {
        __pyx_t_4 = __pyx_v_e; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_1 = 0;
        __pyx_t_5 = NULL;
      } else {
        __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L9_error)
      }
      for (;;) {
        if (likely(!__pyx_t_5)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1086, __pyx_L9_error)
              #endif
              if (__pyx_t_1 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 1086, __pyx_L9_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1086, __pyx_L9_error)
              #endif
              if (__pyx_t_1 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 1086, __pyx_L9_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_5(__pyx_t_4);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1086, __pyx_L9_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_i, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_Or(((PyObject *)(&PyInt_Type)), ((PyObject *)(&PyFloat_Type))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L9_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_6);
        __pyx_t_2 = __Pyx_TypeCheck(__pyx_7genexpr__pyx_v_i, __pyx_t_6); 
        __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1086, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "pysndlib/clm.pyx":1087
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")             # <<<<<<<<<<<<<<
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 *         raise RuntimeError("x values of envelope must be increasing")
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1087, __pyx_L1_error)

      /* "pysndlib/clm.pyx":1086
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):             # <<<<<<<<<<<<<<
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 */
    }

    /* "pysndlib/clm.pyx":1085
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 *     if isinstance(e, list):             # <<<<<<<<<<<<<<
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 */
  }

  /* "pysndlib/clm.pyx":1088
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("x values of envelope must be increasing")
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_e, __pyx_slice__21); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_e, __pyx_slice__25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __pyx_pf_8pysndlib_3clm_17validate_envelope_genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (!__pyx_t_2);
  if (unlikely(__pyx_t_7)) {

    /* "pysndlib/clm.pyx":1089
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 *         raise RuntimeError("x values of envelope must be increasing")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1089, __pyx_L1_error)

    /* "pysndlib/clm.pyx":1088
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("x values of envelope must be increasing")
 * 
 */
  }

  /* "pysndlib/clm.pyx":1079
 * # --------------- just some extra utils ---------------- #
 * 
 * def validate_envelope(e):             # <<<<<<<<<<<<<<
 *     # is env even number length
 *     if len(e) < 2:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.validate_envelope", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i);
  __Pyx_XDECREF(__pyx_gb_8pysndlib_3clm_17validate_envelope_2generator1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1092
 * 
 * 
 * cpdef bint is_zero(cython.double x):             # <<<<<<<<<<<<<<
 *     return x == 0
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_39is_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_zero(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":1093
 * 
 * cpdef bint is_zero(cython.double x):
 *     return x == 0             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_number(n):
 */
  __pyx_r = (__pyx_v_x == 0.0);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1092
 * 
 * 
 * cpdef bint is_zero(cython.double x):             # <<<<<<<<<<<<<<
 *     return x == 0
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_39is_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_39is_zero = {"is_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_39is_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_39is_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_zero") < 0)) __PYX_ERR(0, 1092, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1092, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_38is_zero(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_38is_zero(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_zero(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1095
 *     return x == 0
 * 
 * cpdef bint is_number(n):             # <<<<<<<<<<<<<<
 *     return type(n) == int or type(n) == float
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_41is_number(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_number(PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_number", 1);

  /* "pysndlib/clm.pyx":1096
 * 
 * cpdef bint is_number(n):
 *     return type(n) == int or type(n) == float             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_odd(n):
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_n)), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_n)), ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1095
 *     return x == 0
 * 
 * cpdef bint is_number(n):             # <<<<<<<<<<<<<<
 *     return type(n) == int or type(n) == float
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_41is_number(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_41is_number = {"is_number", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_41is_number, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_41is_number(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_number (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_number") < 0)) __PYX_ERR(0, 1095, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_number", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1095, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_40is_number(__pyx_self, __pyx_v_n);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_40is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_number", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_number(__pyx_v_n, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1098
 *     return type(n) == int or type(n) == float
 * 
 * cpdef bint is_odd(n):             # <<<<<<<<<<<<<<
 *     return n % 2 == 0
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_43is_odd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_odd(PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_odd", 1);

  /* "pysndlib/clm.pyx":1099
 * 
 * cpdef bint is_odd(n):
 *     return n % 2 == 0             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_even(n):
 */
  __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1098
 *     return type(n) == int or type(n) == float
 * 
 * cpdef bint is_odd(n):             # <<<<<<<<<<<<<<
 *     return n % 2 == 0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_43is_odd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_43is_odd = {"is_odd", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_43is_odd, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_43is_odd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_odd (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_odd") < 0)) __PYX_ERR(0, 1098, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_odd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1098, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_42is_odd(__pyx_self, __pyx_v_n);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_42is_odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_odd", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_odd(__pyx_v_n, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1101
 *     return n % 2 == 0
 * 
 * cpdef bint is_even(n):             # <<<<<<<<<<<<<<
 *     return n % 2 != 0
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_45is_even(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_even(PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_even", 1);

  /* "pysndlib/clm.pyx":1102
 * 
 * cpdef bint is_even(n):
 *     return n % 2 != 0             # <<<<<<<<<<<<<<
 * 
 * # # --------------- clm utility functions ---------------- #
 */
  __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_n, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1101
 *     return n % 2 == 0
 * 
 * cpdef bint is_even(n):             # <<<<<<<<<<<<<<
 *     return n % 2 != 0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_45is_even(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_45is_even = {"is_even", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_45is_even, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_45is_even(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_even (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_even") < 0)) __PYX_ERR(0, 1101, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_even", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1101, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_44is_even(__pyx_self, __pyx_v_n);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_44is_even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_even", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_even(__pyx_v_n, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1106
 * # # --------------- clm utility functions ---------------- #
 * #
 * cpdef cython.double radians2hz(cython.double radians ):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians per sample to frequency:  `hz = rads * srate / (2 * pi)`.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_47radians2hz(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_radians2hz(double __pyx_v_radians, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1114
 *     :rtype: float
 *     """
 *     return cclm.mus_radians_to_hz(radians)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double hz2radians(cython.double hz):
 */
  __pyx_r = mus_radians_to_hz(__pyx_v_radians);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1106
 * # # --------------- clm utility functions ---------------- #
 * #
 * cpdef cython.double radians2hz(cython.double radians ):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians per sample to frequency:  `hz = rads * srate / (2 * pi)`.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_47radians2hz(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_46radians2hz, "\n    convert radians per sample to frequency:  `hz = rads * srate / (2 * pi)`.\n    \n    :param radians: frequency \\in radians\n    :return: frequency \\in hertz\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_47radians2hz = {"radians2hz", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_47radians2hz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_46radians2hz};
static PyObject *__pyx_pw_8pysndlib_3clm_47radians2hz(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_radians;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("radians2hz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_radians,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radians)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "radians2hz") < 0)) __PYX_ERR(0, 1106, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_radians = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_radians == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("radians2hz", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1106, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.radians2hz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_46radians2hz(__pyx_self, __pyx_v_radians);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_46radians2hz(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_radians) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("radians2hz", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_radians2hz(__pyx_v_radians, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.radians2hz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1116
 *     return cclm.mus_radians_to_hz(radians)
 * 
 * cpdef cython.double hz2radians(cython.double hz):             # <<<<<<<<<<<<<<
 *     """
 *     convert frequency in hz to radians per sample:  `hz * 2 * pi / srate`.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_49hz2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_hz2radians(double __pyx_v_hz, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1124
 *     :rtype: float
 *     """
 *     return cclm.mus_hz_to_radians(hz)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double degrees2radians(cython.double degrees):
 */
  __pyx_r = mus_hz_to_radians(__pyx_v_hz);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1116
 *     return cclm.mus_radians_to_hz(radians)
 * 
 * cpdef cython.double hz2radians(cython.double hz):             # <<<<<<<<<<<<<<
 *     """
 *     convert frequency in hz to radians per sample:  `hz * 2 * pi / srate`.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_49hz2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_48hz2radians, "\n    convert frequency in hz to radians per sample:  `hz * 2 * pi / srate`.\n    \n    :param hz: frequency \\in hertz\n    :return: frequency \\in radians\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_49hz2radians = {"hz2radians", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_49hz2radians, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_48hz2radians};
static PyObject *__pyx_pw_8pysndlib_3clm_49hz2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_hz;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hz2radians (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hz,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hz)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "hz2radians") < 0)) __PYX_ERR(0, 1116, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_hz = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_hz == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hz2radians", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1116, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.hz2radians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_48hz2radians(__pyx_self, __pyx_v_hz);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_48hz2radians(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_hz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hz2radians", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_hz2radians(__pyx_v_hz, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.hz2radians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1126
 *     return cclm.mus_hz_to_radians(hz)
 * 
 * cpdef cython.double degrees2radians(cython.double degrees):             # <<<<<<<<<<<<<<
 *     """
 *     convert degrees to radians:  `degrees * 2 * pi / 360`.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_51degrees2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_degrees2radians(double __pyx_v_degrees, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1135
 * 
 *     """
 *     return cclm.mus_degrees_to_radians(degrees)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double radians2degrees(cython.double radians):
 */
  __pyx_r = mus_degrees_to_radians(__pyx_v_degrees);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1126
 *     return cclm.mus_hz_to_radians(hz)
 * 
 * cpdef cython.double degrees2radians(cython.double degrees):             # <<<<<<<<<<<<<<
 *     """
 *     convert degrees to radians:  `degrees * 2 * pi / 360`.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_51degrees2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_50degrees2radians, "\n    convert degrees to radians:  `degrees * 2 * pi / 360`.\n    \n    :param degrees: angle in degrees\n    :return: angle in radians\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_51degrees2radians = {"degrees2radians", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_51degrees2radians, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_50degrees2radians};
static PyObject *__pyx_pw_8pysndlib_3clm_51degrees2radians(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_degrees;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("degrees2radians (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_degrees,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_degrees)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "degrees2radians") < 0)) __PYX_ERR(0, 1126, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_degrees = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_degrees == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("degrees2radians", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1126, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.degrees2radians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_50degrees2radians(__pyx_self, __pyx_v_degrees);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_50degrees2radians(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_degrees) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("degrees2radians", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_degrees2radians(__pyx_v_degrees, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.degrees2radians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1137
 *     return cclm.mus_degrees_to_radians(degrees)
 * 
 * cpdef cython.double radians2degrees(cython.double radians):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians to degrees: `rads * 360 / (2 * pi)`.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_53radians2degrees(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_radians2degrees(double __pyx_v_radians, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1147
 *     """
 * 
 *     return cclm.mus_radians_to_degrees(radians)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double db2linear(cython.double x):
 */
  __pyx_r = mus_radians_to_degrees(__pyx_v_radians);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1137
 *     return cclm.mus_degrees_to_radians(degrees)
 * 
 * cpdef cython.double radians2degrees(cython.double radians):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians to degrees: `rads * 360 / (2 * pi)`.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_53radians2degrees(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_52radians2degrees, "\n    convert radians to degrees: `rads * 360 / (2 * pi)`.\n    \n    :param radians: angle in radians\n    :return: degree\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_53radians2degrees = {"radians2degrees", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_53radians2degrees, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_52radians2degrees};
static PyObject *__pyx_pw_8pysndlib_3clm_53radians2degrees(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_radians;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("radians2degrees (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_radians,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radians)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "radians2degrees") < 0)) __PYX_ERR(0, 1137, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_radians = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_radians == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("radians2degrees", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1137, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.radians2degrees", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_52radians2degrees(__pyx_self, __pyx_v_radians);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_52radians2degrees(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_radians) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("radians2degrees", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_radians2degrees(__pyx_v_radians, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.radians2degrees", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1149
 *     return cclm.mus_radians_to_degrees(radians)
 * 
 * cpdef cython.double db2linear(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert decibel value db to linear value: `pow(10, db / 20)`.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_55db2linear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_db2linear(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1159
 *     """
 * 
 *     return cclm.mus_db_to_linear(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double linear2db(cython.double x):
 */
  __pyx_r = mus_db_to_linear(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1149
 *     return cclm.mus_radians_to_degrees(radians)
 * 
 * cpdef cython.double db2linear(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert decibel value db to linear value: `pow(10, db / 20)`.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_55db2linear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_54db2linear, "\n    convert decibel value db to linear value: `pow(10, db / 20)`.\n\n    :param x: decibel\n    :return: linear amplitude\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_55db2linear = {"db2linear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_55db2linear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_54db2linear};
static PyObject *__pyx_pw_8pysndlib_3clm_55db2linear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("db2linear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "db2linear") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("db2linear", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.db2linear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_54db2linear(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_54db2linear(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("db2linear", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_db2linear(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.db2linear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1161
 *     return cclm.mus_db_to_linear(x)
 * 
 * cpdef cython.double linear2db(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert linear value to decibels 20 * log10(lin).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_57linear2db(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_linear2db(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1171
 *     """
 * 
 *     return cclm.mus_linear_to_db(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double odd_multiple(cython.double x, cython.double y):
 */
  __pyx_r = mus_linear_to_db(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1161
 *     return cclm.mus_db_to_linear(x)
 * 
 * cpdef cython.double linear2db(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert linear value to decibels 20 * log10(lin).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_57linear2db(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_56linear2db, "\n    convert linear value to decibels 20 * log10(lin).\n\n    :param x: linear amplitude\n    :return: decibel\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_57linear2db = {"linear2db", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_57linear2db, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_56linear2db};
static PyObject *__pyx_pw_8pysndlib_3clm_57linear2db(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("linear2db (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "linear2db") < 0)) __PYX_ERR(0, 1161, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("linear2db", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1161, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.linear2db", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_56linear2db(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_56linear2db(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("linear2db", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_linear2db(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.linear2db", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1173
 *     return cclm.mus_linear_to_db(x)
 * 
 * cpdef cython.double odd_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest odd integer to x.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_59odd_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_odd_multiple(double __pyx_v_x, double __pyx_v_y, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1184
 *     """
 * 
 *     return cclm.mus_odd_multiple(x,y)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double even_multiple(cython.double x, cython.double y):
 */
  __pyx_r = mus_odd_multiple(__pyx_v_x, __pyx_v_y);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1173
 *     return cclm.mus_linear_to_db(x)
 * 
 * cpdef cython.double odd_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest odd integer to x.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_59odd_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_58odd_multiple, "\n    return y times the nearest odd integer to x.\n    \n    :param x:\n    :param y:\n    :return: nearest odd integer as a float\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_59odd_multiple = {"odd_multiple", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_59odd_multiple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_58odd_multiple};
static PyObject *__pyx_pw_8pysndlib_3clm_59odd_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  double __pyx_v_y;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("odd_multiple (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("odd_multiple", 1, 2, 2, 1); __PYX_ERR(0, 1173, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "odd_multiple") < 0)) __PYX_ERR(0, 1173, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("odd_multiple", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1173, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.odd_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_58odd_multiple(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_58odd_multiple(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("odd_multiple", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_odd_multiple(__pyx_v_x, __pyx_v_y, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.odd_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1186
 *     return cclm.mus_odd_multiple(x,y)
 * 
 * cpdef cython.double even_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest even integer to x.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_61even_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_even_multiple(double __pyx_v_x, double __pyx_v_y, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1196
 *     """
 * 
 *     return cclm.mus_even_multiple(x,y)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double odd_weight(cython.double x):
 */
  __pyx_r = mus_even_multiple(__pyx_v_x, __pyx_v_y);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1186
 *     return cclm.mus_odd_multiple(x,y)
 * 
 * cpdef cython.double even_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest even integer to x.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_61even_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_60even_multiple, "\n    return y times the nearest even integer to x.\n    \n    :param x:\n    :param y:\n    :return: nearest even integer as a float\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_61even_multiple = {"even_multiple", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_61even_multiple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_60even_multiple};
static PyObject *__pyx_pw_8pysndlib_3clm_61even_multiple(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  double __pyx_v_y;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("even_multiple (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("even_multiple", 1, 2, 2, 1); __PYX_ERR(0, 1186, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "even_multiple") < 0)) __PYX_ERR(0, 1186, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("even_multiple", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1186, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.even_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_60even_multiple(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_60even_multiple(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("even_multiple", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_even_multiple(__pyx_v_x, __pyx_v_y, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.even_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1198
 *     return cclm.mus_even_multiple(x,y)
 * 
 * cpdef cython.double odd_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is even) and 1.0 (x is odd).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_63odd_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_odd_weight(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1208
 *     """
 * 
 *     return cclm.mus_odd_weight(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double even_weight(cython.double x):
 */
  __pyx_r = mus_odd_weight(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1198
 *     return cclm.mus_even_multiple(x,y)
 * 
 * cpdef cython.double odd_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is even) and 1.0 (x is odd).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_63odd_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_62odd_weight, "\n    return a number between 0.0 (x is even) and 1.0 (x is odd).\n    \n    :param x:\n    :return weight:\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_63odd_weight = {"odd_weight", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_63odd_weight, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_62odd_weight};
static PyObject *__pyx_pw_8pysndlib_3clm_63odd_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("odd_weight (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "odd_weight") < 0)) __PYX_ERR(0, 1198, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("odd_weight", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1198, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.odd_weight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_62odd_weight(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_62odd_weight(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("odd_weight", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_odd_weight(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.odd_weight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1210
 *     return cclm.mus_odd_weight(x)
 * 
 * cpdef cython.double even_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is odd) and 1.0 (x is even).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_65even_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_even_weight(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1219
 *     """
 * 
 *     return cclm.mus_even_weight(x)             # <<<<<<<<<<<<<<
 * 
 * # cpdef cython.double get_srate():
 */
  __pyx_r = mus_even_weight(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1210
 *     return cclm.mus_odd_weight(x)
 * 
 * cpdef cython.double even_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is odd) and 1.0 (x is even).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_65even_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_64even_weight, "\n    return a number between 0.0 (x is odd) and 1.0 (x is even).\n    \n    :param x:\n    :return weight:\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_65even_weight = {"even_weight", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_65even_weight, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_64even_weight};
static PyObject *__pyx_pw_8pysndlib_3clm_65even_weight(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("even_weight (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "even_weight") < 0)) __PYX_ERR(0, 1210, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("even_weight", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1210, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.even_weight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_64even_weight(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_64even_weight(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("even_weight", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_even_weight(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.even_weight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1231
 * #     return cclm.mus_srate()
 * 
 * cpdef cython.double set_srate(cython.double r):             # <<<<<<<<<<<<<<
 *     """
 *     set current sample rate.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_67set_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_set_srate(double __pyx_v_r, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1235
 *     set current sample rate.
 *     """
 *     return cclm.mus_set_srate(r)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.long seconds2samples(cython.double secs):
 */
  __pyx_r = mus_set_srate(__pyx_v_r);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1231
 * #     return cclm.mus_srate()
 * 
 * cpdef cython.double set_srate(cython.double r):             # <<<<<<<<<<<<<<
 *     """
 *     set current sample rate.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_67set_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_66set_srate, "\n    set current sample rate.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_67set_srate = {"set_srate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_67set_srate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_66set_srate};
static PyObject *__pyx_pw_8pysndlib_3clm_67set_srate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_r;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_srate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_srate") < 0)) __PYX_ERR(0, 1231, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_srate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1231, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.set_srate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_66set_srate(__pyx_self, __pyx_v_r);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_66set_srate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_srate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_set_srate(__pyx_v_r, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.set_srate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1237
 *     return cclm.mus_set_srate(r)
 * 
 * cpdef cython.long seconds2samples(cython.double secs):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert seconds to samples.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_69seconds2samples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static long __pyx_f_8pysndlib_3clm_seconds2samples(double __pyx_v_secs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  long __pyx_r;

  /* "pysndlib/clm.pyx":1245
 *     :rtype: int
 *     """
 *     return cclm.mus_seconds_to_samples(secs)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double samples2seconds(cython.long samples):
 */
  __pyx_r = mus_seconds_to_samples(__pyx_v_secs);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1237
 *     return cclm.mus_set_srate(r)
 * 
 * cpdef cython.long seconds2samples(cython.double secs):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert seconds to samples.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_69seconds2samples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_68seconds2samples, "\n    use mus_srate to convert seconds to samples.\n    \n    :param secs: time in seconds\n    :return: time in samples\n    :rtype: int\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_69seconds2samples = {"seconds2samples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_69seconds2samples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_68seconds2samples};
static PyObject *__pyx_pw_8pysndlib_3clm_69seconds2samples(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_secs;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("seconds2samples (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_secs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_secs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "seconds2samples") < 0)) __PYX_ERR(0, 1237, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_secs = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_secs == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("seconds2samples", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1237, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.seconds2samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_68seconds2samples(__pyx_self, __pyx_v_secs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_68seconds2samples(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_secs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("seconds2samples", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_seconds2samples(__pyx_v_secs, 0); if (unlikely(__pyx_t_1 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.seconds2samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1247
 *     return cclm.mus_seconds_to_samples(secs)
 * 
 * cpdef cython.double samples2seconds(cython.long samples):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert samples to seconds.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_71samples2seconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_samples2seconds(long __pyx_v_samples, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1256
 * 
 *     """
 *     return cclm.mus_samples_to_seconds(samples)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2):
 */
  __pyx_r = mus_samples_to_seconds(__pyx_v_samples);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1247
 *     return cclm.mus_seconds_to_samples(secs)
 * 
 * cpdef cython.double samples2seconds(cython.long samples):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert samples to seconds.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_71samples2seconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_70samples2seconds, "\n    use mus_srate to convert samples to seconds.\n    \n    :param samples: number of samples\n    :return: time in seconds\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_71samples2seconds = {"samples2seconds", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_71samples2seconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_70samples2seconds};
static PyObject *__pyx_pw_8pysndlib_3clm_71samples2seconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_samples;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("samples2seconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_samples_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_samples_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "samples2seconds") < 0)) __PYX_ERR(0, 1247, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_samples = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_samples == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("samples2seconds", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1247, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.samples2seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_70samples2seconds(__pyx_self, __pyx_v_samples);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_70samples2seconds(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_samples) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("samples2seconds", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_samples2seconds(__pyx_v_samples, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.samples2seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1258
 *     return cclm.mus_samples_to_seconds(samples)
 * 
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2):             # <<<<<<<<<<<<<<
 *     """
 *     return s1 * s2 (sample by sample multiply).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_73ring_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_ring_modulate(double __pyx_v_s1, double __pyx_v_s2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1269
 *     """
 * 
 *     return cclm.mus_ring_modulate(s1, s2)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3):
 */
  __pyx_r = mus_ring_modulate(__pyx_v_s1, __pyx_v_s2);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1258
 *     return cclm.mus_samples_to_seconds(samples)
 * 
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2):             # <<<<<<<<<<<<<<
 *     """
 *     return s1 * s2 (sample by sample multiply).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_73ring_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_72ring_modulate, "\n    return s1 * s2 (sample by sample multiply).\n    \n    :param s1: input 1\n    :param s2: input 2\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_73ring_modulate = {"ring_modulate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_73ring_modulate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_72ring_modulate};
static PyObject *__pyx_pw_8pysndlib_3clm_73ring_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_s1;
  double __pyx_v_s2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ring_modulate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s1,&__pyx_n_s_s2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("ring_modulate", 1, 2, 2, 1); __PYX_ERR(0, 1258, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ring_modulate") < 0)) __PYX_ERR(0, 1258, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_s1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_s1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
    __pyx_v_s2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_s2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ring_modulate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1258, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ring_modulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_72ring_modulate(__pyx_self, __pyx_v_s1, __pyx_v_s2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_72ring_modulate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_s1, double __pyx_v_s2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ring_modulate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ring_modulate(__pyx_v_s1, __pyx_v_s2, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.ring_modulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1271
 *     return cclm.mus_ring_modulate(s1, s2)
 * 
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3):             # <<<<<<<<<<<<<<
 *     """
 *     carrier in1 in2): in1 * (carrier + in2).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_75amplitude_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_amplitude_modulate(double __pyx_v_s1, double __pyx_v_s2, double __pyx_v_s3, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1282
 * 
 *     """
 *     return cclm.mus_amplitude_modulate(s1, s2, s3)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index= 1.0 ):
 */
  __pyx_r = mus_amplitude_modulate(__pyx_v_s1, __pyx_v_s2, __pyx_v_s3);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1271
 *     return cclm.mus_ring_modulate(s1, s2)
 * 
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3):             # <<<<<<<<<<<<<<
 *     """
 *     carrier in1 in2): in1 * (carrier + in2).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_75amplitude_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_74amplitude_modulate, "\n    carrier in1 in2): in1 * (carrier + in2).\n        \n    :param s1: input 1\n    :param s2: input 2\n    :param s3: input 3\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_75amplitude_modulate = {"amplitude_modulate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_75amplitude_modulate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_74amplitude_modulate};
static PyObject *__pyx_pw_8pysndlib_3clm_75amplitude_modulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_s1;
  double __pyx_v_s2;
  double __pyx_v_s3;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("amplitude_modulate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s1,&__pyx_n_s_s2,&__pyx_n_s_s3,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("amplitude_modulate", 1, 3, 3, 1); __PYX_ERR(0, 1271, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s3)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("amplitude_modulate", 1, 3, 3, 2); __PYX_ERR(0, 1271, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "amplitude_modulate") < 0)) __PYX_ERR(0, 1271, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_s1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_s1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
    __pyx_v_s2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_s2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
    __pyx_v_s3 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_s3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("amplitude_modulate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1271, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.amplitude_modulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_74amplitude_modulate(__pyx_self, __pyx_v_s1, __pyx_v_s2, __pyx_v_s3);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_74amplitude_modulate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_s1, double __pyx_v_s2, double __pyx_v_s3) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("amplitude_modulate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_amplitude_modulate(__pyx_v_s1, __pyx_v_s2, __pyx_v_s3, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.amplitude_modulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1284
 *     return cclm.mus_amplitude_modulate(s1, s2, s3)
 * 
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index= 1.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     returns insig (index 1.0)): sin(sig * pi / 2 + fm_index * sin(sig * 2 * pi))
 */

static PyObject *__pyx_pw_8pysndlib_3clm_77contrast_enhancement(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_contrast_enhancement(double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement *__pyx_optional_args) {
  double __pyx_v_fm_index = ((double)1.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm_index = __pyx_optional_args->fm_index;
    }
  }

  /* "pysndlib/clm.pyx":1295
 * 
 *     """
 *     return cclm.mus_contrast_enhancement(insig, fm_index)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_contrast_enhancement(__pyx_v_insig, __pyx_v_fm_index);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1284
 *     return cclm.mus_amplitude_modulate(s1, s2, s3)
 * 
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index= 1.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     returns insig (index 1.0)): sin(sig * pi / 2 + fm_index * sin(sig * 2 * pi))
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_77contrast_enhancement(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_76contrast_enhancement, "\n    returns insig (index 1.0)): sin(sig * pi / 2 + fm_index * sin(sig * 2 * pi))\n    contrast_enhancement passes its input to sin as a kind of phase modulation.\n    \n    :param insig: input\n    :param fm_index: \n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_77contrast_enhancement = {"contrast_enhancement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_77contrast_enhancement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_76contrast_enhancement};
static PyObject *__pyx_pw_8pysndlib_3clm_77contrast_enhancement(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_insig;
  double __pyx_v_fm_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("contrast_enhancement (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_insig,&__pyx_n_s_fm_index,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm_index);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "contrast_enhancement") < 0)) __PYX_ERR(0, 1284, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_fm_index = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm_index == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
    } else {
      __pyx_v_fm_index = ((double)1.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("contrast_enhancement", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1284, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.contrast_enhancement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_76contrast_enhancement(__pyx_self, __pyx_v_insig, __pyx_v_fm_index);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_76contrast_enhancement(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_insig, double __pyx_v_fm_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("contrast_enhancement", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm_index = __pyx_v_fm_index;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_contrast_enhancement(__pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.contrast_enhancement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1298
 * 
 * 
 * cpdef cython.double dot_product(np.ndarray data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     returns v1 v2 (size)): sum of v1[i] * v2[i] (also named scalar product).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_79dot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_dot_product(PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_data1_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_data2_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot_product", 1);

  /* "pysndlib/clm.pyx":1308
 * 
 *     """
 *     check_ndim(data1)             # <<<<<<<<<<<<<<
 *     check_ndim(data2)
 *     compare_shapes(data1, data2)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data1), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1309
 *     """
 *     check_ndim(data1)
 *     check_ndim(data2)             # <<<<<<<<<<<<<<
 *     compare_shapes(data1, data2)
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data2), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1310
 *     check_ndim(data1)
 *     check_ndim(data2)
 *     compare_shapes(data1, data2)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] data1_view = data1
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_data1), ((PyObject *)__pyx_v_data2), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1312
 *     compare_shapes(data1, data2)
 * 
 *     cdef double [:] data1_view = data1             # <<<<<<<<<<<<<<
 *     cdef double [:] data2_view = data2
 *     return cclm.mus_dot_product(&data1_view[0], &data2_view[0], len(data1))
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __pyx_v_data1_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1313
 * 
 *     cdef double [:] data1_view = data1
 *     cdef double [:] data2_view = data2             # <<<<<<<<<<<<<<
 *     return cclm.mus_dot_product(&data1_view[0], &data2_view[0], len(data1))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __pyx_v_data2_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1314
 *     cdef double [:] data1_view = data1
 *     cdef double [:] data2_view = data2
 *     return cclm.mus_dot_product(&data1_view[0], &data2_view[0], len(data1))             # <<<<<<<<<<<<<<
 * 
 * # changed 11-26-23 to not modify inplace
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_data1_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_data1_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1314, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_5 < 0) {
    __pyx_t_5 += __pyx_v_data2_view.shape[0];
    if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_5 >= __pyx_v_data2_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1314, __pyx_L1_error)
  }
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_data1)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_r = mus_dot_product((&(*((double *) ( /* dim=0 */ (__pyx_v_data1_view.data + __pyx_t_3 * __pyx_v_data1_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_data2_view.data + __pyx_t_5 * __pyx_v_data2_view.strides[0]) )))), __pyx_t_6);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1298
 * 
 * 
 * cpdef cython.double dot_product(np.ndarray data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     returns v1 v2 (size)): sum of v1[i] * v2[i] (also named scalar product).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_AddTraceback("pysndlib.clm.dot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data1_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data2_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_79dot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_78dot_product, "\n    returns v1 v2 (size)): sum of v1[i] * v2[i] (also named scalar product).\n    \n    :param data1: input 1\n    :param data2: input 2\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_79dot_product = {"dot_product", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_79dot_product, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_78dot_product};
static PyObject *__pyx_pw_8pysndlib_3clm_79dot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data1 = 0;
  PyArrayObject *__pyx_v_data2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot_product (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data1,&__pyx_n_s_data2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("dot_product", 1, 2, 2, 1); __PYX_ERR(0, 1298, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dot_product") < 0)) __PYX_ERR(0, 1298, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_data1 = ((PyArrayObject *)values[0]);
    __pyx_v_data2 = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dot_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.dot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data1), __pyx_ptype_5numpy_ndarray, 1, "data1", 0))) __PYX_ERR(0, 1298, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data2), __pyx_ptype_5numpy_ndarray, 1, "data2", 0))) __PYX_ERR(0, 1298, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_78dot_product(__pyx_self, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_78dot_product(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot_product", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_dot_product(__pyx_v_data1, __pyx_v_data2, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.dot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1317
 * 
 * # changed 11-26-23 to not modify inplace
 * cpdef cython.double polynomial(np.ndarray coeffs, cython.double x ):             # <<<<<<<<<<<<<<
 *     """
 *     evaluate a polynomial at x.  coeffs are in order of degree, so coeff[0] is the constant term.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_81polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_polynomial(PyArrayObject *__pyx_v_coeffs, double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_coeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polynomial", 1);

  /* "pysndlib/clm.pyx":1327
 * 
 *     """
 *     check_ndim(coeffs)             # <<<<<<<<<<<<<<
 *     cdef double [:] coeffs_view = coeffs
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_coeffs), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1328
 *     """
 *     check_ndim(coeffs)
 *     cdef double [:] coeffs_view = coeffs             # <<<<<<<<<<<<<<
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_coeffs), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __pyx_v_coeffs_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1329
 *     check_ndim(coeffs)
 *     cdef double [:] coeffs_view = coeffs
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x):
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_coeffs_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_coeffs_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1329, __pyx_L1_error)
  }
  __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_coeffs)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1329, __pyx_L1_error)
  __pyx_r = mus_polynomial((&(*((double *) ( /* dim=0 */ (__pyx_v_coeffs_view.data + __pyx_t_3 * __pyx_v_coeffs_view.strides[0]) )))), __pyx_v_x, __pyx_t_5);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1317
 * 
 * # changed 11-26-23 to not modify inplace
 * cpdef cython.double polynomial(np.ndarray coeffs, cython.double x ):             # <<<<<<<<<<<<<<
 *     """
 *     evaluate a polynomial at x.  coeffs are in order of degree, so coeff[0] is the constant term.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_AddTraceback("pysndlib.clm.polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_coeffs_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_81polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_80polynomial, "\n    evaluate a polynomial at x.  coeffs are in order of degree, so coeff[0] is the constant term.\n    \n    :param coeffs: coefficients where coeffs[0] is the constant term, and so on.\n    :param x: input\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_81polynomial = {"polynomial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_81polynomial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_80polynomial};
static PyObject *__pyx_pw_8pysndlib_3clm_81polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_coeffs = 0;
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polynomial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coeffs,&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_coeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("polynomial", 1, 2, 2, 1); __PYX_ERR(0, 1317, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polynomial") < 0)) __PYX_ERR(0, 1317, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_coeffs = ((PyArrayObject *)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polynomial", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1317, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coeffs), __pyx_ptype_5numpy_ndarray, 1, "coeffs", 0))) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_80polynomial(__pyx_self, __pyx_v_coeffs, __pyx_v_x);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_80polynomial(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_coeffs, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polynomial", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polynomial(__pyx_v_coeffs, __pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1331
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 * 
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x):             # <<<<<<<<<<<<<<
 *     """
 *     taking into account wrap-around (size is size of data), with linear interpolation if phase is not an integer.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_83array_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_array_interp(PyArrayObject *__pyx_v_fn, double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_fn_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_interp", 1);

  /* "pysndlib/clm.pyx":1341
 * 
 *     """
 *     check_ndim(fn)             # <<<<<<<<<<<<<<
 *     cdef double [:] fn_view = fn
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_fn), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1342
 *     """
 *     check_ndim(fn)
 *     cdef double [:] fn_view = fn             # <<<<<<<<<<<<<<
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_fn), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __pyx_v_fn_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1343
 *     check_ndim(fn)
 *     cdef double [:] fn_view = fn
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bessi0(cython.double x):
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_fn_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_fn_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1343, __pyx_L1_error)
  }
  __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_fn)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1343, __pyx_L1_error)
  __pyx_r = mus_array_interp((&(*((double *) ( /* dim=0 */ (__pyx_v_fn_view.data + __pyx_t_3 * __pyx_v_fn_view.strides[0]) )))), __pyx_v_x, __pyx_t_5);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1331
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 * 
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x):             # <<<<<<<<<<<<<<
 *     """
 *     taking into account wrap-around (size is size of data), with linear interpolation if phase is not an integer.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_AddTraceback("pysndlib.clm.array_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_fn_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_83array_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_82array_interp, "\n    taking into account wrap-around (size is size of data), with linear interpolation if phase is not an integer.\n    \n    :param fn: input array\n    :param x: interp point\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_83array_interp = {"array_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_83array_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_82array_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_83array_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_fn = 0;
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fn)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("array_interp", 1, 2, 2, 1); __PYX_ERR(0, 1331, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "array_interp") < 0)) __PYX_ERR(0, 1331, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fn = ((PyArrayObject *)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_interp", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1331, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fn), __pyx_ptype_5numpy_ndarray, 1, "fn", 0))) __PYX_ERR(0, 1331, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_82array_interp(__pyx_self, __pyx_v_fn, __pyx_v_x);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_82array_interp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_fn, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_array_interp(__pyx_v_fn, __pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.array_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1345
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 * 
 * cpdef cython.double bessi0(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     bessel function of zeroth order
 */

static PyObject *__pyx_pw_8pysndlib_3clm_85bessi0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bessi0(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":1349
 *     bessel function of zeroth order
 *     """
 *     return cclm.mus_bessi0(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =0.):
 */
  __pyx_r = mus_bessi0(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1345
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 * 
 * cpdef cython.double bessi0(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     bessel function of zeroth order
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_85bessi0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_84bessi0, "\n    bessel function of zeroth order\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_85bessi0 = {"bessi0", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_85bessi0, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_84bessi0};
static PyObject *__pyx_pw_8pysndlib_3clm_85bessi0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bessi0 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bessi0") < 0)) __PYX_ERR(0, 1345, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bessi0", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1345, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bessi0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_84bessi0(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_84bessi0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bessi0", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bessi0(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bessi0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1351
 *     return cclm.mus_bessi0(x)
 * 
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =0.):             # <<<<<<<<<<<<<<
 *     """
 *     interpolate in data ('table' is a ndarray) using interpolation 'type', such as Interp.linear.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_87mus_interpolate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_mus_interpolate(enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type, double __pyx_v_x, PyArrayObject *__pyx_v_table, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate *__pyx_optional_args) {
  double __pyx_v_y1 = ((double)0.);
  __Pyx_memviewslice __pyx_v_table_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_interpolate", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_y1 = __pyx_optional_args->y1;
    }
  }

  /* "pysndlib/clm.pyx":1362
 * 
 *     """
 *     check_ndim(table)             # <<<<<<<<<<<<<<
 *     cdef double [:] table_view = table
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_table), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1363
 *     """
 *     check_ndim(table)
 *     cdef double [:] table_view = table             # <<<<<<<<<<<<<<
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_table), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __pyx_v_table_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1364
 *     check_ndim(table)
 *     cdef double [:] table_view = table
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=0.0 , cython.double alpha=0.0):
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_table_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_table_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1364, __pyx_L1_error)
  }
  __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_table)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1364, __pyx_L1_error)
  __pyx_r = mus_interpolate(((mus_interp_t)__pyx_v_interp_type), __pyx_v_x, (&(*((double *) ( /* dim=0 */ (__pyx_v_table_view.data + __pyx_t_3 * __pyx_v_table_view.strides[0]) )))), __pyx_t_5, __pyx_v_y1);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1351
 *     return cclm.mus_bessi0(x)
 * 
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =0.):             # <<<<<<<<<<<<<<
 *     """
 *     interpolate in data ('table' is a ndarray) using interpolation 'type', such as Interp.linear.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_interpolate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_table_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_87mus_interpolate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_86mus_interpolate, "\n    interpolate in data ('table' is a ndarray) using interpolation 'type', such as Interp.linear.\n    \n    :param interp_type: type of interpolation\n    :param x: interpolation value\n    :param table: table to interpolate in\n    :return: result\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_87mus_interpolate = {"mus_interpolate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_87mus_interpolate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_86mus_interpolate};
static PyObject *__pyx_pw_8pysndlib_3clm_87mus_interpolate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  double __pyx_v_x;
  PyArrayObject *__pyx_v_table = 0;
  double __pyx_v_y1;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_interpolate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interp_type,&__pyx_n_s_x,&__pyx_n_s_table,&__pyx_n_s_y1,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_interpolate", 0, 3, 4, 1); __PYX_ERR(0, 1351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_interpolate", 0, 3, 4, 2); __PYX_ERR(0, 1351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y1);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_interpolate") < 0)) __PYX_ERR(0, 1351, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
    __pyx_v_table = ((PyArrayObject *)values[2]);
    if (values[3]) {
      __pyx_v_y1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_y1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error)
    } else {
      __pyx_v_y1 = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_interpolate", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1351, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_interpolate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table), __pyx_ptype_5numpy_ndarray, 1, "table", 0))) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_86mus_interpolate(__pyx_self, __pyx_v_interp_type, __pyx_v_x, __pyx_v_table, __pyx_v_y1);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_86mus_interpolate(CYTHON_UNUSED PyObject *__pyx_self, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type, double __pyx_v_x, PyArrayObject *__pyx_v_table, double __pyx_v_y1) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_interpolate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.y1 = __pyx_v_y1;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_mus_interpolate(__pyx_v_interp_type, __pyx_v_x, __pyx_v_table, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_interpolate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1366
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 * 
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=0.0 , cython.double alpha=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     fft data window (a ndarray). type is one of the sndlib fft window identifiers such as
 */

static PyObject *__pyx_pw_8pysndlib_3clm_89make_fft_window(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_make_fft_window(enum __pyx_t_8pysndlib_3clm_Window __pyx_v_window_type, int __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_fft_window *__pyx_optional_args) {
  double __pyx_v_beta = ((double)0.0);
  double __pyx_v_alpha = ((double)0.0);
  PyObject *__pyx_v_win = NULL;
  __Pyx_memviewslice __pyx_v_win_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fft_window", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_beta = __pyx_optional_args->beta;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_alpha = __pyx_optional_args->alpha;
      }
    }
  }

  /* "pysndlib/clm.pyx":1379
 * 
 *     """
 *     win = np.zeros(size, dtype=np.double)             # <<<<<<<<<<<<<<
 *     check_ndim(win)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_win = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1380
 *     """
 *     win = np.zeros(size, dtype=np.double)
 *     check_ndim(win)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] win_view = win
 */
  __pyx_t_5 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_win, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1382
 *     check_ndim(win)
 * 
 *     cdef double [:] win_view = win             # <<<<<<<<<<<<<<
 *     cclm.mus_make_fft_window_with_window(<cclm.mus_fft_window_t>window_type, size, beta, alpha, &win_view[0])
 *     return win
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_win, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __pyx_v_win_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1383
 * 
 *     cdef double [:] win_view = win
 *     cclm.mus_make_fft_window_with_window(<cclm.mus_fft_window_t>window_type, size, beta, alpha, &win_view[0])             # <<<<<<<<<<<<<<
 *     return win
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_win_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_win_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1383, __pyx_L1_error)
  }
  (void)(mus_make_fft_window_with_window(((mus_fft_window_t)__pyx_v_window_type), __pyx_v_size, __pyx_v_beta, __pyx_v_alpha, (&(*((double *) ( /* dim=0 */ (__pyx_v_win_view.data + __pyx_t_7 * __pyx_v_win_view.strides[0]) ))))));

  /* "pysndlib/clm.pyx":1384
 *     cdef double [:] win_view = win
 *     cclm.mus_make_fft_window_with_window(<cclm.mus_fft_window_t>window_type, size, beta, alpha, &win_view[0])
 *     return win             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_fft(np.ndarray rdat, np.ndarray  idat, cython.int fft_size , cython.int sign):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_win) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_win, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_win);
  __pyx_r = ((PyArrayObject *)__pyx_v_win);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1366
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 * 
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=0.0 , cython.double alpha=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     fft data window (a ndarray). type is one of the sndlib fft window identifiers such as
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_fft_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_win);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_win_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_89make_fft_window(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_88make_fft_window, "\n    fft data window (a ndarray). type is one of the sndlib fft window identifiers such as\n    window.kaiser, beta is the window family parameter, if any.\n    \n    :param window_type: type of window\n    :param size: window size\n    :param beta: beta parameter if needed\n    :param alpha: alpha parameter if needed\n    :return: window\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_89make_fft_window = {"make_fft_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_89make_fft_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_88make_fft_window};
static PyObject *__pyx_pw_8pysndlib_3clm_89make_fft_window(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  enum __pyx_t_8pysndlib_3clm_Window __pyx_v_window_type;
  int __pyx_v_size;
  double __pyx_v_beta;
  double __pyx_v_alpha;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fft_window (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window_type,&__pyx_n_s_size,&__pyx_n_s_beta,&__pyx_n_s_alpha,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_fft_window", 0, 2, 4, 1); __PYX_ERR(0, 1366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_beta);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alpha);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_fft_window") < 0)) __PYX_ERR(0, 1366, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_window_type = ((enum __pyx_t_8pysndlib_3clm_Window)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Window(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
    __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_beta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_beta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
    } else {
      __pyx_v_beta = ((double)0.0);
    }
    if (values[3]) {
      __pyx_v_alpha = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L3_error)
    } else {
      __pyx_v_alpha = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_fft_window", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1366, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_fft_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_88make_fft_window(__pyx_self, __pyx_v_window_type, __pyx_v_size, __pyx_v_beta, __pyx_v_alpha);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_88make_fft_window(CYTHON_UNUSED PyObject *__pyx_self, enum __pyx_t_8pysndlib_3clm_Window __pyx_v_window_type, int __pyx_v_size, double __pyx_v_beta, double __pyx_v_alpha) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_fft_window __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fft_window", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.beta = __pyx_v_beta;
  __pyx_t_2.alpha = __pyx_v_alpha;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_fft_window(__pyx_v_window_type, __pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_fft_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1386
 *     return win
 * 
 * cpdef np.ndarray mus_fft(np.ndarray rdat, np.ndarray  idat, cython.int fft_size , cython.int sign):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_91mus_fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_fft(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_fft", 1);

  /* "pysndlib/clm.pyx":1399
 * 
 *     """
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1400
 *     """
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1401
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1403
 *     compare_shapes(rdat, idat)
 * 
 *     cdef double [:] rdat_view = rdat             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rdat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1404
 * 
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat             # <<<<<<<<<<<<<<
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 *     return rdat
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_idat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1405
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)             # <<<<<<<<<<<<<<
 *     return rdat
 * 
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_rdat_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1405, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_5 < 0) {
    __pyx_t_5 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_5 >= __pyx_v_idat_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1405, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_void_to_None(mus_fft((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_3 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_5 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_fft_size, __pyx_v_sign)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1406
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 *     return rdat             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rdat);
  __pyx_r = __pyx_v_rdat;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1386
 *     return win
 * 
 * cpdef np.ndarray mus_fft(np.ndarray rdat, np.ndarray  idat, cython.int fft_size , cython.int sign):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_91mus_fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_90mus_fft, "\n    in-place operation. return the fft of rl and im which contain the real and imaginary parts of the data; len should be a\n    power of 2, dir = 1 for fft, -1 for inverse-fft.\n    \n    :param rdat: real data\n    :param imaginary: imaginary data\n    :param fft_size: must be power of two\n    :param sign: 1 for fft, -1 for inverse-fft\n    :return: result written into rdat\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_91mus_fft = {"mus_fft", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_91mus_fft, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_90mus_fft};
static PyObject *__pyx_pw_8pysndlib_3clm_91mus_fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  int __pyx_v_fft_size;
  int __pyx_v_sign;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_fft (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,&__pyx_n_s_fft_size,&__pyx_n_s_sign,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_fft", 1, 4, 4, 1); __PYX_ERR(0, 1386, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_fft", 1, 4, 4, 2); __PYX_ERR(0, 1386, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sign)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_fft", 1, 4, 4, 3); __PYX_ERR(0, 1386, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_fft") < 0)) __PYX_ERR(0, 1386, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
    __pyx_v_fft_size = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_fft_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
    __pyx_v_sign = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sign == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_fft", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1386, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_90mus_fft(__pyx_self, __pyx_v_rdat, __pyx_v_idat, __pyx_v_fft_size, __pyx_v_sign);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_90mus_fft(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_fft", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_fft(__pyx_v_rdat, __pyx_v_idat, __pyx_v_fft_size, __pyx_v_sign, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1409
 * 
 * 
 * cpdef np.ndarray fft(np.ndarray rdat, np.ndarray idat,  cython.int fft_size, cython.int sign ):             # <<<<<<<<<<<<<<
 *     """
 *     return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_93fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_fft(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_rdat_cpy = NULL;
  PyObject *__pyx_v_idat_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fft", 1);

  /* "pysndlib/clm.pyx":1422
 * 
 *     """
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1423
 *     """
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1424
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     rdat_cpy = np.copy(rdat)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1426
 *     compare_shapes(rdat, idat)
 * 
 *     rdat_cpy = np.copy(rdat)             # <<<<<<<<<<<<<<
 *     idat_cpy = np.copy(idat)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_rdat)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_rdat_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1427
 * 
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_idat)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_idat_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1429
 *     idat_cpy = np.copy(idat)
 * 
 *     cdef double [:] rdat_view = rdat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rdat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1430
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy             # <<<<<<<<<<<<<<
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 *     return rdat_cpy, idat_cpy
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_idat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1431
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)             # <<<<<<<<<<<<<<
 *     return rdat_cpy, idat_cpy
 * 
 */
  __pyx_t_6 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_rdat_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1431, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_idat_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1431, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_void_to_None(mus_fft((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_6 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_7 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_fft_size, __pyx_v_sign)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1432
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_fft(&rdat_view[0], &idat_view[0], fft_size, sign)
 *     return rdat_cpy, idat_cpy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_rdat_cpy);
  __Pyx_GIVEREF(__pyx_v_rdat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_rdat_cpy)) __PYX_ERR(0, 1432, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_idat_cpy);
  __Pyx_GIVEREF(__pyx_v_idat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_idat_cpy)) __PYX_ERR(0, 1432, __pyx_L1_error);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray)))) __PYX_ERR(0, 1432, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1409
 * 
 * 
 * cpdef np.ndarray fft(np.ndarray rdat, np.ndarray idat,  cython.int fft_size, cython.int sign ):             # <<<<<<<<<<<<<<
 *     """
 *     return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_AddTraceback("pysndlib.clm.fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rdat_cpy);
  __Pyx_XDECREF(__pyx_v_idat_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_93fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_92fft, "\n    return the fft of rl and im which contain the real and imaginary parts of the data; len should be a\n    power of 2, dir = 1 for fft, -1 for inverse-fft.\n    \n    :param rdat: real data\n    :param imaginary: imaginary data\n    :param fft_size: must be power of two\n    :param sign: 1 for fft, -1 for inverse-fft\n    :return: tuple of copy of rdat and idat\n    :rtype: tuple\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_93fft = {"fft", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_93fft, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_92fft};
static PyObject *__pyx_pw_8pysndlib_3clm_93fft(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  int __pyx_v_fft_size;
  int __pyx_v_sign;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fft (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,&__pyx_n_s_fft_size,&__pyx_n_s_sign,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("fft", 1, 4, 4, 1); __PYX_ERR(0, 1409, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("fft", 1, 4, 4, 2); __PYX_ERR(0, 1409, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sign)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("fft", 1, 4, 4, 3); __PYX_ERR(0, 1409, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fft") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
    __pyx_v_fft_size = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_fft_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
    __pyx_v_sign = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sign == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fft", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1409, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1409, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1409, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_92fft(__pyx_self, __pyx_v_rdat, __pyx_v_idat, __pyx_v_fft_size, __pyx_v_sign);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_92fft(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, int __pyx_v_fft_size, int __pyx_v_sign) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fft", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_fft(__pyx_v_rdat, __pyx_v_idat, __pyx_v_fft_size, __pyx_v_sign, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.fft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1436
 * 
 * 
 * cpdef np.ndarray mus_rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in s rl and im from rectangular form (fft output) to polar form (a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_95mus_rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_rectangular2polar(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_rectangular2polar", 1);

  /* "pysndlib/clm.pyx":1447
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(rdat)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1447, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1449
 *     size = len(rdat)
 * 
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1450
 * 
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1451
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1453
 *     compare_shapes(rdat, idat)
 * 
 *     cdef double [:] rdat_view = rdat             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rdat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1454
 * 
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat             # <<<<<<<<<<<<<<
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 *     return rdat
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_idat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1454, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1455
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1455, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1455, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_void_to_None(mus_rectangular_to_polar((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_4 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_6 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1456
 *     cdef double [:] idat_view = idat
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 *     return rdat             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple rectangular2polar(np.ndarray  rdat, np.ndarray  idat):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rdat);
  __pyx_r = __pyx_v_rdat;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1436
 * 
 * 
 * cpdef np.ndarray mus_rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in s rl and im from rectangular form (fft output) to polar form (a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_95mus_rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_94mus_rectangular2polar, "\n    in-place operation. convert real/imaginary data in s rl and im from rectangular form (fft output) to polar form (a\n    spectrum).\n    \n    :param rdat: real data\n    :param imaginary:  imaginary data\n    :return: magnitude written into rdat, idat contains phases\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_95mus_rectangular2polar = {"mus_rectangular2polar", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_95mus_rectangular2polar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_94mus_rectangular2polar};
static PyObject *__pyx_pw_8pysndlib_3clm_95mus_rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_rectangular2polar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_rectangular2polar", 1, 2, 2, 1); __PYX_ERR(0, 1436, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_rectangular2polar") < 0)) __PYX_ERR(0, 1436, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_rectangular2polar", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1436, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1436, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1436, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_94mus_rectangular2polar(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_94mus_rectangular2polar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_rectangular2polar", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_rectangular2polar(__pyx_v_rdat, __pyx_v_idat, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1458
 *     return rdat
 * 
 * cpdef tuple rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rdat and idat from rectangular form (fft output) to polar form (a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_97rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rectangular2polar(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_rdat_cpy = NULL;
  PyObject *__pyx_v_idat_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rectangular2polar", 1);

  /* "pysndlib/clm.pyx":1469
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(rdat)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1469, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1471
 *     size = len(rdat)
 * 
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1472
 * 
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1473
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     rdat_cpy = np.copy(rdat)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1475
 *     compare_shapes(rdat, idat)
 * 
 *     rdat_cpy = np.copy(rdat)             # <<<<<<<<<<<<<<
 *     idat_cpy = np.copy(idat)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_rdat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_rdat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1476
 * 
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_idat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_idat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1478
 *     idat_cpy = np.copy(idat)
 * 
 *     cdef double [:] rdat_view = rdat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rdat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1478, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1479
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy             # <<<<<<<<<<<<<<
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 *     return rdat_cpy, idat_cpy
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_idat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1480
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat_cpy, idat_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1480, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1480, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_void_to_None(mus_rectangular_to_polar((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_7 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_8 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1481
 *     cdef double [:] idat_view = idat_cpy
 *     res = cclm.mus_rectangular_to_polar(&rdat_view[0], &idat_view[0], size)
 *     return rdat_cpy, idat_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_rdat_cpy);
  __Pyx_GIVEREF(__pyx_v_rdat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rdat_cpy)) __PYX_ERR(0, 1481, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_idat_cpy);
  __Pyx_GIVEREF(__pyx_v_idat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_idat_cpy)) __PYX_ERR(0, 1481, __pyx_L1_error);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1458
 *     return rdat
 * 
 * cpdef tuple rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rdat and idat from rectangular form (fft output) to polar form (a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rdat_cpy);
  __Pyx_XDECREF(__pyx_v_idat_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_97rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_96rectangular2polar, "\n    convert real/imaginary data in rdat and idat from rectangular form (fft output) to polar form (a\n    spectrum).\n    \n    :param rdat: real data\n    :param imaginary:  imaginary data\n    :return::return: tuple of magnitude and phases\n    :rtype: tuple\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_97rectangular2polar = {"rectangular2polar", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_97rectangular2polar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_96rectangular2polar};
static PyObject *__pyx_pw_8pysndlib_3clm_97rectangular2polar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rectangular2polar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1458, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1458, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("rectangular2polar", 1, 2, 2, 1); __PYX_ERR(0, 1458, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rectangular2polar") < 0)) __PYX_ERR(0, 1458, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rectangular2polar", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1458, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1458, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1458, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_96rectangular2polar(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_96rectangular2polar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rectangular2polar", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rectangular2polar(__pyx_v_rdat, __pyx_v_idat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rectangular2polar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1483
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */

static PyObject *__pyx_pw_8pysndlib_3clm_99mus_rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_rectangular2magnitudes(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_rectangular2magnitudes", 1);

  /* "pysndlib/clm.pyx":1494
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 *     cdef double [:] rdat_view = rdat
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1494, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1495
 *     """
 *     size = len(rdat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1496
 *     size = len(rdat)
 *     compare_shapes(rdat, idat)
 *     cdef double [:] rdat_view = rdat             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rdat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1497
 *     compare_shapes(rdat, idat)
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_idat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1500
 * 
 * 
 *     cclm.mus_rectangular_to_magnitudes(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1500, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1500, __pyx_L1_error)
  }
  mus_rectangular_to_magnitudes((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_4 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_6 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size);

  /* "pysndlib/clm.pyx":1501
 * 
 *     cclm.mus_rectangular_to_magnitudes(&rdat_view[0], &idat_view[0], size)
 *     return rdat             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rdat);
  __pyx_r = __pyx_v_rdat;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1483
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_99mus_rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_98mus_rectangular2magnitudes, "\n    in-place operation. convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but\n    ignore the phases.\n    \n    :param rdat: real data\n    :param imaginary:  imaginary data\n    :return: magnitude written into rdat\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_99mus_rectangular2magnitudes = {"mus_rectangular2magnitudes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_99mus_rectangular2magnitudes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_98mus_rectangular2magnitudes};
static PyObject *__pyx_pw_8pysndlib_3clm_99mus_rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_rectangular2magnitudes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_rectangular2magnitudes", 1, 2, 2, 1); __PYX_ERR(0, 1483, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_rectangular2magnitudes") < 0)) __PYX_ERR(0, 1483, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_rectangular2magnitudes", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1483, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1483, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1483, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_98mus_rectangular2magnitudes(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_98mus_rectangular2magnitudes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_rectangular2magnitudes", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_rectangular2magnitudes(__pyx_v_rdat, __pyx_v_idat, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1503
 *     return rdat
 * 
 * cpdef tuple rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */

static PyObject *__pyx_pw_8pysndlib_3clm_101rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rectangular2magnitudes(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_rdat_cpy = NULL;
  PyObject *__pyx_v_idat_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rectangular2magnitudes", 1);

  /* "pysndlib/clm.pyx":1514
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1514, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1515
 *     """
 *     size = len(rdat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1516
 *     size = len(rdat)
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)             # <<<<<<<<<<<<<<
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_rdat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_rdat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1517
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_idat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_idat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1519
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 * 
 *     cdef double [:] rdat_view = rdat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat_cpy
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rdat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1520
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_idat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1523
 * 
 * 
 *     cclm.mus_rectangular_to_magnitudes(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat_cpy, idat_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1523, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1523, __pyx_L1_error)
  }
  mus_rectangular_to_magnitudes((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_7 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_8 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size);

  /* "pysndlib/clm.pyx":1524
 * 
 *     cclm.mus_rectangular_to_magnitudes(&rdat_view[0], &idat_view[0], size)
 *     return rdat_cpy, idat_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_polar2rectangular( np.ndarray rdat,  np.ndarray idat):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_rdat_cpy);
  __Pyx_GIVEREF(__pyx_v_rdat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rdat_cpy)) __PYX_ERR(0, 1524, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_idat_cpy);
  __Pyx_GIVEREF(__pyx_v_idat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_idat_cpy)) __PYX_ERR(0, 1524, __pyx_L1_error);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1503
 *     return rdat
 * 
 * cpdef tuple rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rdat_cpy);
  __Pyx_XDECREF(__pyx_v_idat_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_101rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_100rectangular2magnitudes, "\n    convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but\n    ignore the phases.\n    \n    :param rdat: real data\n    :param imaginary:  imaginary data\n    :return: magnitude\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_101rectangular2magnitudes = {"rectangular2magnitudes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_101rectangular2magnitudes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_100rectangular2magnitudes};
static PyObject *__pyx_pw_8pysndlib_3clm_101rectangular2magnitudes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rectangular2magnitudes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("rectangular2magnitudes", 1, 2, 2, 1); __PYX_ERR(0, 1503, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rectangular2magnitudes") < 0)) __PYX_ERR(0, 1503, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rectangular2magnitudes", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1503, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_100rectangular2magnitudes(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_100rectangular2magnitudes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rectangular2magnitudes", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rectangular2magnitudes(__pyx_v_rdat, __pyx_v_idat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rectangular2magnitudes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1526
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_polar2rectangular( np.ndarray rdat,  np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_103mus_polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_polar2rectangular(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_polar2rectangular", 1);

  /* "pysndlib/clm.pyx":1536
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1536, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1537
 *     """
 *     size = len(rdat)
 *     cdef double [:] rdat_view = rdat             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rdat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1538
 *     size = len(rdat)
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_idat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_2;
  __pyx_t_2.memview = NULL;
  __pyx_t_2.data = NULL;

  /* "pysndlib/clm.pyx":1539
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)
 */
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":1541
 *     compare_shapes(rdat, idat)
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1541, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1541, __pyx_L1_error)
  }
  mus_polar_to_rectangular((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_4 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_6 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size);

  /* "pysndlib/clm.pyx":1542
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)
 *     return rdat             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rdat);
  __pyx_r = __pyx_v_rdat;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1526
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_polar2rectangular( np.ndarray rdat,  np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.mus_polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_103mus_polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_102mus_polar2rectangular, "\n    in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).\n    \n    :param rdat: magnitude data\n    :param imaginary: phases data\n    :return: real data written into rdat, idat contains imaginary\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_103mus_polar2rectangular = {"mus_polar2rectangular", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_103mus_polar2rectangular, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_102mus_polar2rectangular};
static PyObject *__pyx_pw_8pysndlib_3clm_103mus_polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_polar2rectangular (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_polar2rectangular", 1, 2, 2, 1); __PYX_ERR(0, 1526, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_polar2rectangular") < 0)) __PYX_ERR(0, 1526, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_polar2rectangular", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1526, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1526, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1526, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_102mus_polar2rectangular(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_102mus_polar2rectangular(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_polar2rectangular", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_polar2rectangular(__pyx_v_rdat, __pyx_v_idat, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1545
 * 
 * 
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_105polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_polar2rectangular(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_rdat_cpy = NULL;
  PyObject *__pyx_v_idat_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polar2rectangular", 1);

  /* "pysndlib/clm.pyx":1555
 * 
 *     """
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1555, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1556
 *     """
 *     size = len(rdat)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1559
 * 
 * 
 *     rdat_cpy = np.copy(rdat)             # <<<<<<<<<<<<<<
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 *     cdef double [:] rdat_view = rdat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_rdat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_rdat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1560
 * 
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed             # <<<<<<<<<<<<<<
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_idat)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_idat_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1561
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 *     cdef double [:] rdat_view = rdat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat_cpy
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rdat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1561, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1562
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_idat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1564
 *     cdef double [:] idat_view = idat_cpy
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)             # <<<<<<<<<<<<<<
 *     return rdat_cpy, idat_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_rdat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1564, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_idat_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1564, __pyx_L1_error)
  }
  mus_polar_to_rectangular((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_7 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_8 * __pyx_v_idat_view.strides[0]) )))), __pyx_v_size);

  /* "pysndlib/clm.pyx":1565
 * 
 *     cclm.mus_polar_to_rectangular(&rdat_view[0], &idat_view[0], size)
 *     return rdat_cpy, idat_cpy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_rdat_cpy);
  __Pyx_GIVEREF(__pyx_v_rdat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rdat_cpy)) __PYX_ERR(0, 1565, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_idat_cpy);
  __Pyx_GIVEREF(__pyx_v_idat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_idat_cpy)) __PYX_ERR(0, 1565, __pyx_L1_error);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1545
 * 
 * 
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rdat_cpy);
  __Pyx_XDECREF(__pyx_v_idat_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_105polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_104polar2rectangular, "\n    in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).\n    \n    :param rdat: magnitude data\n    :param imaginary: phases data\n    :return: real and imaginary\n    :rtype: tuple\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_105polar2rectangular = {"polar2rectangular", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_105polar2rectangular, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_104polar2rectangular};
static PyObject *__pyx_pw_8pysndlib_3clm_105polar2rectangular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polar2rectangular (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("polar2rectangular", 1, 2, 2, 1); __PYX_ERR(0, 1545, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polar2rectangular") < 0)) __PYX_ERR(0, 1545, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polar2rectangular", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1545, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_104polar2rectangular(__pyx_self, __pyx_v_rdat, __pyx_v_idat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_104polar2rectangular(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polar2rectangular", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polar2rectangular(__pyx_v_rdat, __pyx_v_idat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.polar2rectangular", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1568
 * 
 * 
 * cpdef np.ndarray mus_spectrum(np.ndarray  rdat, np.ndarray   idat, np.ndarray  window, Spectrum norm_type= Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */

static PyObject *__pyx_pw_8pysndlib_3clm_107mus_spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_spectrum(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum *__pyx_optional_args) {
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type = __pyx_k__27;
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_window_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_spectrum", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_norm_type = __pyx_optional_args->norm_type;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_window);

  /* "pysndlib/clm.pyx":1585
 * 
 *     """
 *     if isinstance(window, list):             # <<<<<<<<<<<<<<
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 */
  __pyx_t_1 = PyList_Check(((PyObject *)__pyx_v_window)); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1586
 *     """
 *     if isinstance(window, list):
 *         window = np.array(window, dtype=np.double)             # <<<<<<<<<<<<<<
 *     size = len(rdat)
 *     check_ndim(rdat)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF((PyObject *)__pyx_v_window);
    __Pyx_GIVEREF((PyObject *)__pyx_v_window);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_window))) __PYX_ERR(0, 1586, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_window, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":1585
 * 
 *     """
 *     if isinstance(window, list):             # <<<<<<<<<<<<<<
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 */
  }

  /* "pysndlib/clm.pyx":1587
 *     if isinstance(window, list):
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(rdat)
 *     check_ndim(idat)
 */
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1587, __pyx_L1_error)
  __pyx_v_size = __pyx_t_7;

  /* "pysndlib/clm.pyx":1588
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     check_ndim(window)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1589
 *     size = len(rdat)
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     check_ndim(window)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1590
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     check_ndim(window)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 * 
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_window), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1591
 *     check_ndim(idat)
 *     check_ndim(window)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1593
 *     compare_shapes(rdat, idat)
 * 
 *     cdef double [:] rdat_view = rdat             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat
 *     cdef double [:] window_view = window
 */
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rdat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "pysndlib/clm.pyx":1594
 * 
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat             # <<<<<<<<<<<<<<
 *     cdef double [:] window_view = window
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_idat), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "pysndlib/clm.pyx":1595
 *     cdef double [:] rdat_view = rdat
 *     cdef double [:] idat_view = idat
 *     cdef double [:] window_view = window             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_window), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __pyx_v_window_view = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "pysndlib/clm.pyx":1598
 * 
 * 
 *     cclm.mus_spectrum(&rdat_view[0], &idat_view[0], &window_view[0], size, <cclm.mus_spectrum_t>norm_type)             # <<<<<<<<<<<<<<
 *     return rdat
 * 
 */
  __pyx_t_9 = 0;
  __pyx_t_10 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_v_rdat_view.shape[0])) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    __PYX_ERR(0, 1598, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_t_10 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_idat_view.shape[0])) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    __PYX_ERR(0, 1598, __pyx_L1_error)
  }
  __pyx_t_12 = 0;
  __pyx_t_10 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_window_view.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_window_view.shape[0])) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    __PYX_ERR(0, 1598, __pyx_L1_error)
  }
  (void)(mus_spectrum((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_9 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_11 * __pyx_v_idat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_window_view.data + __pyx_t_12 * __pyx_v_window_view.strides[0]) )))), __pyx_v_size, ((mus_spectrum_t)__pyx_v_norm_type)));

  /* "pysndlib/clm.pyx":1599
 * 
 *     cclm.mus_spectrum(&rdat_view[0], &idat_view[0], &window_view[0], size, <cclm.mus_spectrum_t>norm_type)
 *     return rdat             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rdat);
  __pyx_r = __pyx_v_rdat;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1568
 * 
 * 
 * cpdef np.ndarray mus_spectrum(np.ndarray  rdat, np.ndarray   idat, np.ndarray  window, Spectrum norm_type= Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_window_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_window);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_107mus_spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_106mus_spectrum, "\n    in-place operation. real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the\n    fft data window (a ndarray as returned by make_fft_window  and type determines how the spectral data is\n    scaled:\n    spectrum.in_db= data in db,\n    spectrum.normalized (default) = linear and normalized\n    spectrum.raw = linear and un-normalized.\n    \n    :param rdat: real data\n    :param imaginary: imaginary data\n    :param window: fft window\n    :param norm_type: normalization type\n    :return: spectrum\n    :rtype: np.ndarray\n              \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_107mus_spectrum = {"mus_spectrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_107mus_spectrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_106mus_spectrum};
static PyObject *__pyx_pw_8pysndlib_3clm_107mus_spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  PyArrayObject *__pyx_v_window = 0;
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_spectrum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,&__pyx_n_s_window,&__pyx_n_s_norm_type,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_spectrum", 0, 3, 4, 1); __PYX_ERR(0, 1568, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_spectrum", 0, 3, 4, 2); __PYX_ERR(0, 1568, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_norm_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_spectrum") < 0)) __PYX_ERR(0, 1568, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
    __pyx_v_window = ((PyArrayObject *)values[2]);
    if (values[3]) {
      __pyx_v_norm_type = ((enum __pyx_t_8pysndlib_3clm_Spectrum)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Spectrum(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error)
    } else {
      __pyx_v_norm_type = __pyx_k__27;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_spectrum", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1568, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1568, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1568, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_5numpy_ndarray, 1, "window", 0))) __PYX_ERR(0, 1568, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_106mus_spectrum(__pyx_self, __pyx_v_rdat, __pyx_v_idat, __pyx_v_window, __pyx_v_norm_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_106mus_spectrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_spectrum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.norm_type = __pyx_v_norm_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_spectrum(__pyx_v_rdat, __pyx_v_idat, __pyx_v_window, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1602
 * 
 * 
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray  idat,np.ndarray window, Spectrum norm_type=Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */

static PyObject *__pyx_pw_8pysndlib_3clm_109spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_spectrum(PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_spectrum *__pyx_optional_args) {
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type = __pyx_k__28;
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_rdat_cpy = NULL;
  PyObject *__pyx_v_idat_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rdat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_idat_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_window_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("spectrum", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_norm_type = __pyx_optional_args->norm_type;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_window);

  /* "pysndlib/clm.pyx":1619
 * 
 *     """
 *     if isinstance(window, list):             # <<<<<<<<<<<<<<
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 */
  __pyx_t_1 = PyList_Check(((PyObject *)__pyx_v_window)); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1620
 *     """
 *     if isinstance(window, list):
 *         window = np.array(window, dtype=np.double)             # <<<<<<<<<<<<<<
 *     size = len(rdat)
 *     check_ndim(rdat)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF((PyObject *)__pyx_v_window);
    __Pyx_GIVEREF((PyObject *)__pyx_v_window);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_window))) __PYX_ERR(0, 1620, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_window, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":1619
 * 
 *     """
 *     if isinstance(window, list):             # <<<<<<<<<<<<<<
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 */
  }

  /* "pysndlib/clm.pyx":1621
 *     if isinstance(window, list):
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(rdat)
 *     check_ndim(idat)
 */
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_rdat)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1621, __pyx_L1_error)
  __pyx_v_size = __pyx_t_7;

  /* "pysndlib/clm.pyx":1622
 *         window = np.array(window, dtype=np.double)
 *     size = len(rdat)
 *     check_ndim(rdat)             # <<<<<<<<<<<<<<
 *     check_ndim(idat)
 *     check_ndim(window)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rdat), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1623
 *     size = len(rdat)
 *     check_ndim(rdat)
 *     check_ndim(idat)             # <<<<<<<<<<<<<<
 *     check_ndim(window)
 *     compare_shapes(rdat, idat)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_idat), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1624
 *     check_ndim(rdat)
 *     check_ndim(idat)
 *     check_ndim(window)             # <<<<<<<<<<<<<<
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_window), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1625
 *     check_ndim(idat)
 *     check_ndim(window)
 *     compare_shapes(rdat, idat)             # <<<<<<<<<<<<<<
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_rdat), ((PyObject *)__pyx_v_idat), 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1626
 *     check_ndim(window)
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)             # <<<<<<<<<<<<<<
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_rdat)};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_rdat_cpy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1627
 *     compare_shapes(rdat, idat)
 *     rdat_cpy = np.copy(rdat)
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_idat)};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_idat_cpy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1629
 *     idat_cpy = np.copy(idat) #probably don't need to do this because idat should not be changed
 * 
 *     cdef double [:] rdat_view = rdat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] idat_view = idat_cpy
 *     cdef double [:] window_view = window
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rdat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __pyx_v_rdat_view = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "pysndlib/clm.pyx":1630
 * 
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] window_view = window
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_idat_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1630, __pyx_L1_error)
  __pyx_v_idat_view = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "pysndlib/clm.pyx":1631
 *     cdef double [:] rdat_view = rdat_cpy
 *     cdef double [:] idat_view = idat_cpy
 *     cdef double [:] window_view = window             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_spectrum(&rdat_view[0], &idat_view[0], &window_view[0], size, <cclm.mus_spectrum_t>norm_type)
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_window), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __pyx_v_window_view = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "pysndlib/clm.pyx":1633
 *     cdef double [:] window_view = window
 * 
 *     cclm.mus_spectrum(&rdat_view[0], &idat_view[0], &window_view[0], size, <cclm.mus_spectrum_t>norm_type)             # <<<<<<<<<<<<<<
 *     return rdat_cpy, idat_cpy
 * 
 */
  __pyx_t_10 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_rdat_view.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_rdat_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1633, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_idat_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_idat_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1633, __pyx_L1_error)
  }
  __pyx_t_12 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_window_view.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_window_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1633, __pyx_L1_error)
  }
  (void)(mus_spectrum((&(*((double *) ( /* dim=0 */ (__pyx_v_rdat_view.data + __pyx_t_10 * __pyx_v_rdat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_idat_view.data + __pyx_t_11 * __pyx_v_idat_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_window_view.data + __pyx_t_12 * __pyx_v_window_view.strides[0]) )))), __pyx_v_size, ((mus_spectrum_t)__pyx_v_norm_type)));

  /* "pysndlib/clm.pyx":1634
 * 
 *     cclm.mus_spectrum(&rdat_view[0], &idat_view[0], &window_view[0], size, <cclm.mus_spectrum_t>norm_type)
 *     return rdat_cpy, idat_cpy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_rdat_cpy);
  __Pyx_GIVEREF(__pyx_v_rdat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_rdat_cpy)) __PYX_ERR(0, 1634, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_idat_cpy);
  __Pyx_GIVEREF(__pyx_v_idat_cpy);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_idat_cpy)) __PYX_ERR(0, 1634, __pyx_L1_error);
  __pyx_r = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1602
 * 
 * 
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray  idat,np.ndarray window, Spectrum norm_type=Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1);
  __Pyx_AddTraceback("pysndlib.clm.spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rdat_cpy);
  __Pyx_XDECREF(__pyx_v_idat_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rdat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_idat_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_window_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_window);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_109spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_108spectrum, "\n    real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the\n    fft data window (a ndarray as returned by make_fft_window  and type determines how the spectral data is\n    scaled:\n    spectrum.in_db= data in db,\n    spectrum.normalized (default) = linear and normalized\n    spectrum.raw = linear and un-normalized.\n    \n    :param rdat: real data\n    :param imaginary: imaginary data\n    :param window: fft window\n    :param norm_type: normalization type\n    :return: spectrum\n    :rtype: np.ndarray\n              \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_109spectrum = {"spectrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_109spectrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_108spectrum};
static PyObject *__pyx_pw_8pysndlib_3clm_109spectrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rdat = 0;
  PyArrayObject *__pyx_v_idat = 0;
  PyArrayObject *__pyx_v_window = 0;
  enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("spectrum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rdat,&__pyx_n_s_idat,&__pyx_n_s_window,&__pyx_n_s_norm_type,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rdat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("spectrum", 0, 3, 4, 1); __PYX_ERR(0, 1602, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("spectrum", 0, 3, 4, 2); __PYX_ERR(0, 1602, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_norm_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "spectrum") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_rdat = ((PyArrayObject *)values[0]);
    __pyx_v_idat = ((PyArrayObject *)values[1]);
    __pyx_v_window = ((PyArrayObject *)values[2]);
    if (values[3]) {
      __pyx_v_norm_type = ((enum __pyx_t_8pysndlib_3clm_Spectrum)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Spectrum(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
    } else {
      __pyx_v_norm_type = __pyx_k__28;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("spectrum", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1602, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rdat), __pyx_ptype_5numpy_ndarray, 1, "rdat", 0))) __PYX_ERR(0, 1602, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idat), __pyx_ptype_5numpy_ndarray, 1, "idat", 0))) __PYX_ERR(0, 1602, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_5numpy_ndarray, 1, "window", 0))) __PYX_ERR(0, 1602, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_108spectrum(__pyx_self, __pyx_v_rdat, __pyx_v_idat, __pyx_v_window, __pyx_v_norm_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_108spectrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rdat, PyArrayObject *__pyx_v_idat, PyArrayObject *__pyx_v_window, enum __pyx_t_8pysndlib_3clm_Spectrum __pyx_v_norm_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_spectrum __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("spectrum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.norm_type = __pyx_v_norm_type;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_spectrum(__pyx_v_rdat, __pyx_v_idat, __pyx_v_window, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1637
 * 
 * 
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_111mus_convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_convolution(PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_convolution *__pyx_optional_args) {
  PyObject *__pyx_v_fft_size = ((PyObject *)__pyx_int_512);
  __Pyx_memviewslice __pyx_v_rl1_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_rl2_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  mus_long_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_convolution", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fft_size = __pyx_optional_args->fft_size;
    }
  }

  /* "pysndlib/clm.pyx":1649
 *     """
 *     # size = len(rl1)
 *     cdef double [:] rl1_view = rl1             # <<<<<<<<<<<<<<
 *     cdef double [:] rl2_view = rl2
 *     check_ndim(rl1)
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rl1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __pyx_v_rl1_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":1650
 *     # size = len(rl1)
 *     cdef double [:] rl1_view = rl1
 *     cdef double [:] rl2_view = rl2             # <<<<<<<<<<<<<<
 *     check_ndim(rl1)
 *     check_ndim(rl2)
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rl2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __pyx_v_rl2_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":1651
 *     cdef double [:] rl1_view = rl1
 *     cdef double [:] rl2_view = rl2
 *     check_ndim(rl1)             # <<<<<<<<<<<<<<
 *     check_ndim(rl2)
 *    # compare_shapes(rl1, rl2)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rl1), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1652
 *     cdef double [:] rl2_view = rl2
 *     check_ndim(rl1)
 *     check_ndim(rl2)             # <<<<<<<<<<<<<<
 *    # compare_shapes(rl1, rl2)
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rl2), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1655
 *    # compare_shapes(rl1, rl2)
 * 
 *     cclm.mus_convolution(&rl1_view[0], &rl2_view[0], fft_size)             # <<<<<<<<<<<<<<
 *     return rl1
 * 
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_v_rl1_view.shape[0];
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_v_rl1_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1655, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_5 < 0) {
    __pyx_t_5 += __pyx_v_rl2_view.shape[0];
    if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_5 >= __pyx_v_rl2_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1655, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_fft_size); if (unlikely((__pyx_t_6 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L1_error)
  (void)(mus_convolution((&(*((double *) ( /* dim=0 */ (__pyx_v_rl1_view.data + __pyx_t_3 * __pyx_v_rl1_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_rl2_view.data + __pyx_t_5 * __pyx_v_rl2_view.strides[0]) )))), __pyx_t_6));

  /* "pysndlib/clm.pyx":1656
 * 
 *     cclm.mus_convolution(&rl1_view[0], &rl2_view[0], fft_size)
 *     return rl1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_rl1);
  __pyx_r = __pyx_v_rl1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1637
 * 
 * 
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.mus_convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rl1_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rl2_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_111mus_convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_110mus_convolution, "\n    in-place operation. convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.\n\n    :param rl1: input data 1\n    :param rl2: input  data 2\n    :param fft_size: fft size\n    :return: convolved output. also written into rl1\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_111mus_convolution = {"mus_convolution", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_111mus_convolution, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_110mus_convolution};
static PyObject *__pyx_pw_8pysndlib_3clm_111mus_convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rl1 = 0;
  PyArrayObject *__pyx_v_rl2 = 0;
  PyObject *__pyx_v_fft_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_convolution (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rl1,&__pyx_n_s_rl2,&__pyx_n_s_fft_size,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_512));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rl1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rl2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_convolution", 0, 2, 3, 1); __PYX_ERR(0, 1637, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_convolution") < 0)) __PYX_ERR(0, 1637, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_rl1 = ((PyArrayObject *)values[0]);
    __pyx_v_rl2 = ((PyArrayObject *)values[1]);
    __pyx_v_fft_size = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_convolution", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1637, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rl1), __pyx_ptype_5numpy_ndarray, 1, "rl1", 0))) __PYX_ERR(0, 1637, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rl2), __pyx_ptype_5numpy_ndarray, 1, "rl2", 0))) __PYX_ERR(0, 1637, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_110mus_convolution(__pyx_self, __pyx_v_rl1, __pyx_v_rl2, __pyx_v_fft_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_110mus_convolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, PyObject *__pyx_v_fft_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_mus_convolution __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_convolution", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fft_size = __pyx_v_fft_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_convolution(__pyx_v_rl1, __pyx_v_rl2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1660
 * 
 * 
 * cpdef np.ndarray convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_113convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_convolution(PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolution *__pyx_optional_args) {
  PyObject *__pyx_v_fft_size = ((PyObject *)__pyx_int_512);
  PyObject *__pyx_v_rl1_cpy = NULL;
  PyObject *__pyx_v_rl2_cpy = NULL;
  __Pyx_memviewslice __pyx_v_rl1_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_rl2_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  mus_long_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convolution", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fft_size = __pyx_optional_args->fft_size;
    }
  }

  /* "pysndlib/clm.pyx":1672
 *     """
 *     # size = len(rl1)
 *     check_ndim(rl1)             # <<<<<<<<<<<<<<
 *     check_ndim(rl2)
 *    # compare_shapes(rl1, rl2)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rl1), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1673
 *     # size = len(rl1)
 *     check_ndim(rl1)
 *     check_ndim(rl2)             # <<<<<<<<<<<<<<
 *    # compare_shapes(rl1, rl2)
 *     rl1_cpy = np.copy(rl1)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_rl2), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1675
 *     check_ndim(rl2)
 *    # compare_shapes(rl1, rl2)
 *     rl1_cpy = np.copy(rl1)             # <<<<<<<<<<<<<<
 *     rl2_cpy = np.copy(rl2) #probably do
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_rl1)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_rl1_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1676
 *    # compare_shapes(rl1, rl2)
 *     rl1_cpy = np.copy(rl1)
 *     rl2_cpy = np.copy(rl2) #probably do             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_rl2)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_rl2_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1679
 * 
 * 
 *     cdef double [:] rl1_view = rl1_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] rl2_view = rl2_cpy
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rl1_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __pyx_v_rl1_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1680
 * 
 *     cdef double [:] rl1_view = rl1_cpy
 *     cdef double [:] rl2_view = rl2_cpy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_rl2_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __pyx_v_rl2_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1683
 * 
 * 
 *     cclm.mus_convolution(&rl1_view[0], &rl2_view[0], fft_size)             # <<<<<<<<<<<<<<
 *     return rl1_cpy
 * 
 */
  __pyx_t_6 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_rl1_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_rl1_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1683, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_rl2_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_rl2_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1683, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_fft_size); if (unlikely((__pyx_t_8 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1683, __pyx_L1_error)
  (void)(mus_convolution((&(*((double *) ( /* dim=0 */ (__pyx_v_rl1_view.data + __pyx_t_6 * __pyx_v_rl1_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_rl2_view.data + __pyx_t_7 * __pyx_v_rl2_view.strides[0]) )))), __pyx_t_8));

  /* "pysndlib/clm.pyx":1684
 * 
 *     cclm.mus_convolution(&rl1_view[0], &rl2_view[0], fft_size)
 *     return rl1_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_rl1_cpy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_rl1_cpy, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_rl1_cpy);
  __pyx_r = ((PyArrayObject *)__pyx_v_rl1_cpy);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1660
 * 
 * 
 * cpdef np.ndarray convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_AddTraceback("pysndlib.clm.convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rl1_cpy);
  __Pyx_XDECREF(__pyx_v_rl2_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rl1_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_rl2_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_113convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_112convolution, "\n    convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.\n\n    :param rl1: input data 1\n    :param rl2: input  data 2\n    :param fft_size: fft size\n    :return: convolved output.\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_113convolution = {"convolution", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_113convolution, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_112convolution};
static PyObject *__pyx_pw_8pysndlib_3clm_113convolution(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_rl1 = 0;
  PyArrayObject *__pyx_v_rl2 = 0;
  PyObject *__pyx_v_fft_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convolution (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rl1,&__pyx_n_s_rl2,&__pyx_n_s_fft_size,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_512));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rl1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rl2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("convolution", 0, 2, 3, 1); __PYX_ERR(0, 1660, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convolution") < 0)) __PYX_ERR(0, 1660, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_rl1 = ((PyArrayObject *)values[0]);
    __pyx_v_rl2 = ((PyArrayObject *)values[1]);
    __pyx_v_fft_size = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convolution", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1660, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rl1), __pyx_ptype_5numpy_ndarray, 1, "rl1", 0))) __PYX_ERR(0, 1660, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rl2), __pyx_ptype_5numpy_ndarray, 1, "rl2", 0))) __PYX_ERR(0, 1660, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_112convolution(__pyx_self, __pyx_v_rl1, __pyx_v_rl2, __pyx_v_fft_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_112convolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rl1, PyArrayObject *__pyx_v_rl2, PyObject *__pyx_v_fft_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_convolution __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convolution", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fft_size = __pyx_v_fft_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_convolution(__pyx_v_rl1, __pyx_v_rl2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.convolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1686
 *     return rl1_cpy
 * 
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     in place autocorrelation of data (a ndarray).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_115mus_autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_autocorrelate(PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_data_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_autocorrelate", 1);

  /* "pysndlib/clm.pyx":1695
 * 
 *     """
 *     size = len(data)             # <<<<<<<<<<<<<<
 *     check_ndim(data)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1695, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1696
 *     """
 *     size = len(data)
 *     check_ndim(data)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] data_view = data
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1698
 *     check_ndim(data)
 * 
 *     cdef double [:] data_view = data             # <<<<<<<<<<<<<<
 *     cclm.mus_autocorrelate(&data_view[0], size)
 *     return data
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __pyx_v_data_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1699
 * 
 *     cdef double [:] data_view = data
 *     cclm.mus_autocorrelate(&data_view[0], size)             # <<<<<<<<<<<<<<
 *     return data
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_data_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_data_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1699, __pyx_L1_error)
  }
  (void)(mus_autocorrelate((&(*((double *) ( /* dim=0 */ (__pyx_v_data_view.data + __pyx_t_4 * __pyx_v_data_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1700
 *     cdef double [:] data_view = data
 *     cclm.mus_autocorrelate(&data_view[0], size)
 *     return data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1686
 *     return rl1_cpy
 * 
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     in place autocorrelation of data (a ndarray).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_115mus_autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_114mus_autocorrelate, "\n    in place autocorrelation of data (a ndarray).\n\n    :param data: data\n    :return: autocorrelation result\n    :rtype: np.ndarray\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_115mus_autocorrelate = {"mus_autocorrelate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_115mus_autocorrelate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_114mus_autocorrelate};
static PyObject *__pyx_pw_8pysndlib_3clm_115mus_autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_autocorrelate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1686, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_autocorrelate") < 0)) __PYX_ERR(0, 1686, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_data = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_autocorrelate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1686, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 1686, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_114mus_autocorrelate(__pyx_self, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_114mus_autocorrelate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_autocorrelate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_autocorrelate(__pyx_v_data, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1703
 * 
 * 
 * cpdef np.ndarray autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     autocorrelation of data (a ndarray).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_117autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_autocorrelate(PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_data_cpy = NULL;
  __Pyx_memviewslice __pyx_v_data_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("autocorrelate", 1);

  /* "pysndlib/clm.pyx":1712
 * 
 *     """
 *     size = len(data)             # <<<<<<<<<<<<<<
 *     check_ndim(data)
 *     data_cpy = np.copy(data) #probably do
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1712, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1713
 *     """
 *     size = len(data)
 *     check_ndim(data)             # <<<<<<<<<<<<<<
 *     data_cpy = np.copy(data) #probably do
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1714
 *     size = len(data)
 *     check_ndim(data)
 *     data_cpy = np.copy(data) #probably do             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] data_view = data_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_data)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_data_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1716
 *     data_cpy = np.copy(data) #probably do
 * 
 *     cdef double [:] data_view = data_cpy             # <<<<<<<<<<<<<<
 *     cclm.mus_autocorrelate(&data_view[0], size)
 *     return data_cpy
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_data_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __pyx_v_data_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1717
 * 
 *     cdef double [:] data_view = data_cpy
 *     cclm.mus_autocorrelate(&data_view[0], size)             # <<<<<<<<<<<<<<
 *     return data_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_data_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_data_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1717, __pyx_L1_error)
  }
  (void)(mus_autocorrelate((&(*((double *) ( /* dim=0 */ (__pyx_v_data_view.data + __pyx_t_7 * __pyx_v_data_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1718
 *     cdef double [:] data_view = data_cpy
 *     cclm.mus_autocorrelate(&data_view[0], size)
 *     return data_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_correlate( np.ndarray  data1,  np.ndarray  data2):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_data_cpy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data_cpy, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_data_cpy);
  __pyx_r = ((PyArrayObject *)__pyx_v_data_cpy);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1703
 * 
 * 
 * cpdef np.ndarray autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     autocorrelation of data (a ndarray).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_117autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_116autocorrelate, "\n    autocorrelation of data (a ndarray).\n\n    :param data: data\n    :return: autocorrelation result\n    :rtype: np.ndarray\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_117autocorrelate = {"autocorrelate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_117autocorrelate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_116autocorrelate};
static PyObject *__pyx_pw_8pysndlib_3clm_117autocorrelate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("autocorrelate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1703, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "autocorrelate") < 0)) __PYX_ERR(0, 1703, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_data = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("autocorrelate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1703, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_116autocorrelate(__pyx_self, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_116autocorrelate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("autocorrelate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_autocorrelate(__pyx_v_data, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.autocorrelate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1720
 *     return data_cpy
 * 
 * cpdef np.ndarray mus_correlate( np.ndarray  data1,  np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     in place cross-correlation of data1 and data2 (both ndarrays).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_119mus_correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_correlate(PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_data1_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_data2_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_correlate", 1);

  /* "pysndlib/clm.pyx":1732
 *     """
 * 
 *     size = len(data1)             # <<<<<<<<<<<<<<
 *     check_ndim(data1)
 *     check_ndim(data2)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data1)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1732, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1733
 * 
 *     size = len(data1)
 *     check_ndim(data1)             # <<<<<<<<<<<<<<
 *     check_ndim(data2)
 *     compare_shapes(data1, data2)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data1), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1734
 *     size = len(data1)
 *     check_ndim(data1)
 *     check_ndim(data2)             # <<<<<<<<<<<<<<
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data2), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1735
 *     check_ndim(data1)
 *     check_ndim(data2)
 *     compare_shapes(data1, data2)             # <<<<<<<<<<<<<<
 *     cdef double [:] data1_view = data1
 *     cdef double [:] data2_view = data2
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_data1), ((PyObject *)__pyx_v_data2), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1736
 *     check_ndim(data2)
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1             # <<<<<<<<<<<<<<
 *     cdef double [:] data2_view = data2
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1736, __pyx_L1_error)
  __pyx_v_data1_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1737
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1
 *     cdef double [:] data2_view = data2             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __pyx_v_data2_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1739
 *     cdef double [:] data2_view = data2
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)             # <<<<<<<<<<<<<<
 *     return data1
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_data1_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_data1_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1739, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_6 < 0) {
    __pyx_t_6 += __pyx_v_data2_view.shape[0];
    if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_6 >= __pyx_v_data2_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1739, __pyx_L1_error)
  }
  (void)(mus_correlate((&(*((double *) ( /* dim=0 */ (__pyx_v_data1_view.data + __pyx_t_4 * __pyx_v_data1_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_data2_view.data + __pyx_t_6 * __pyx_v_data2_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1740
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)
 *     return data1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_data1);
  __pyx_r = __pyx_v_data1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1720
 *     return data_cpy
 * 
 * cpdef np.ndarray mus_correlate( np.ndarray  data1,  np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     in place cross-correlation of data1 and data2 (both ndarrays).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data1_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data2_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_119mus_correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_118mus_correlate, "\n    in place cross-correlation of data1 and data2 (both ndarrays).\n    \n    :param data1: data 1\n    :param data2: data 2\n    :return: correlation result written into data1\n    :rtype: np.ndarray\n    \n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_119mus_correlate = {"mus_correlate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_119mus_correlate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_118mus_correlate};
static PyObject *__pyx_pw_8pysndlib_3clm_119mus_correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data1 = 0;
  PyArrayObject *__pyx_v_data2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_correlate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data1,&__pyx_n_s_data2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mus_correlate", 1, 2, 2, 1); __PYX_ERR(0, 1720, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_correlate") < 0)) __PYX_ERR(0, 1720, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_data1 = ((PyArrayObject *)values[0]);
    __pyx_v_data2 = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_correlate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1720, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data1), __pyx_ptype_5numpy_ndarray, 1, "data1", 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data2), __pyx_ptype_5numpy_ndarray, 1, "data2", 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_118mus_correlate(__pyx_self, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_118mus_correlate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_correlate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_correlate(__pyx_v_data1, __pyx_v_data2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1743
 * 
 * 
 * cpdef np.ndarray correlate(np.ndarray  data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     cross-correlation of data1 and data2 (both ndarrays).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_121correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_correlate(PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_data1_cpy = NULL;
  PyObject *__pyx_v_data2_cpy = NULL;
  __Pyx_memviewslice __pyx_v_data1_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_data2_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("correlate", 1);

  /* "pysndlib/clm.pyx":1755
 *     """
 * 
 *     size = len(data1)             # <<<<<<<<<<<<<<
 *     check_ndim(data1)
 *     check_ndim(data2)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data1)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1755, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1756
 * 
 *     size = len(data1)
 *     check_ndim(data1)             # <<<<<<<<<<<<<<
 *     check_ndim(data2)
 *     data1_cpy = np.copy(data1)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data1), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1757
 *     size = len(data1)
 *     check_ndim(data1)
 *     check_ndim(data2)             # <<<<<<<<<<<<<<
 *     data1_cpy = np.copy(data1)
 *     data2_cpy = np.copy(data2)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data2), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1758
 *     check_ndim(data1)
 *     check_ndim(data2)
 *     data1_cpy = np.copy(data1)             # <<<<<<<<<<<<<<
 *     data2_cpy = np.copy(data2)
 *     compare_shapes(data1, data2)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_data1)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_data1_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1759
 *     check_ndim(data2)
 *     data1_cpy = np.copy(data1)
 *     data2_cpy = np.copy(data2)             # <<<<<<<<<<<<<<
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_data2)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_data2_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1760
 *     data1_cpy = np.copy(data1)
 *     data2_cpy = np.copy(data2)
 *     compare_shapes(data1, data2)             # <<<<<<<<<<<<<<
 *     cdef double [:] data1_view = data1_cpy
 *     cdef double [:] data2_view = data2_cpy
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_compare_shapes(((PyObject *)__pyx_v_data1), ((PyObject *)__pyx_v_data2), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1761
 *     data2_cpy = np.copy(data2)
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] data2_view = data2_cpy
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_data1_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __pyx_v_data1_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1762
 *     compare_shapes(data1, data2)
 *     cdef double [:] data1_view = data1_cpy
 *     cdef double [:] data2_view = data2_cpy             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_data2_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __pyx_v_data2_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1764
 *     cdef double [:] data2_view = data2_cpy
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)             # <<<<<<<<<<<<<<
 *     return data1_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_data1_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_data1_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1764, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_data2_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_data2_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1764, __pyx_L1_error)
  }
  (void)(mus_correlate((&(*((double *) ( /* dim=0 */ (__pyx_v_data1_view.data + __pyx_t_7 * __pyx_v_data1_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_data2_view.data + __pyx_t_8 * __pyx_v_data2_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1765
 * 
 *     cclm.mus_correlate(&data1_view[0], &data2_view[0], size)
 *     return data1_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray mus_cepstrum( np.ndarray  data):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_data1_cpy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data1_cpy, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_data1_cpy);
  __pyx_r = ((PyArrayObject *)__pyx_v_data1_cpy);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1743
 * 
 * 
 * cpdef np.ndarray correlate(np.ndarray  data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     cross-correlation of data1 and data2 (both ndarrays).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data1_cpy);
  __Pyx_XDECREF(__pyx_v_data2_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data1_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data2_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_121correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_120correlate, "\n    cross-correlation of data1 and data2 (both ndarrays).\n    \n    :param data1: data 1\n    :param data2: data 2\n    :return: correlation result\n    :rtype: np.ndarray\n    \n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_121correlate = {"correlate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_121correlate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_120correlate};
static PyObject *__pyx_pw_8pysndlib_3clm_121correlate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data1 = 0;
  PyArrayObject *__pyx_v_data2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("correlate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data1,&__pyx_n_s_data2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("correlate", 1, 2, 2, 1); __PYX_ERR(0, 1743, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "correlate") < 0)) __PYX_ERR(0, 1743, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_data1 = ((PyArrayObject *)values[0]);
    __pyx_v_data2 = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("correlate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1743, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data1), __pyx_ptype_5numpy_ndarray, 1, "data1", 0))) __PYX_ERR(0, 1743, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data2), __pyx_ptype_5numpy_ndarray, 1, "data2", 0))) __PYX_ERR(0, 1743, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_120correlate(__pyx_self, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_120correlate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data1, PyArrayObject *__pyx_v_data2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("correlate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_correlate(__pyx_v_data1, __pyx_v_data2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.correlate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1767
 *     return data1_cpy
 * 
 * cpdef np.ndarray mus_cepstrum( np.ndarray  data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */

static PyObject *__pyx_pw_8pysndlib_3clm_123mus_cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_mus_cepstrum(PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  __Pyx_memviewslice __pyx_v_data_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_cepstrum", 1);

  /* "pysndlib/clm.pyx":1775
 *     :rtype: np.ndarray
 *     """
 *     size = len(data)             # <<<<<<<<<<<<<<
 *     check_ndim(data)
 *     cdef double [:] data_view = data
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1775, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1776
 *     """
 *     size = len(data)
 *     check_ndim(data)             # <<<<<<<<<<<<<<
 *     cdef double [:] data_view = data
 *     cclm.mus_cepstrum(&data_view[0], size)
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1777
 *     size = len(data)
 *     check_ndim(data)
 *     cdef double [:] data_view = data             # <<<<<<<<<<<<<<
 *     cclm.mus_cepstrum(&data_view[0], size)
 *     return data
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_data), PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __pyx_v_data_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":1778
 *     check_ndim(data)
 *     cdef double [:] data_view = data
 *     cclm.mus_cepstrum(&data_view[0], size)             # <<<<<<<<<<<<<<
 *     return data
 * 
 */
  __pyx_t_4 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_4 < 0) {
    __pyx_t_4 += __pyx_v_data_view.shape[0];
    if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_4 >= __pyx_v_data_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1778, __pyx_L1_error)
  }
  (void)(mus_cepstrum((&(*((double *) ( /* dim=0 */ (__pyx_v_data_view.data + __pyx_t_4 * __pyx_v_data_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1779
 *     cdef double [:] data_view = data
 *     cclm.mus_cepstrum(&data_view[0], size)
 *     return data             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray cepstrum(np.ndarray data):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1767
 *     return data1_cpy
 * 
 * cpdef np.ndarray mus_cepstrum( np.ndarray  data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_AddTraceback("pysndlib.clm.mus_cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_123mus_cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_122mus_cepstrum, "\n    return cepstrum of signal\n    \n    :param data: samples to analyze\n    :return: cepstrum. also written into data\n    :rtype: np.ndarray\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_123mus_cepstrum = {"mus_cepstrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_123mus_cepstrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_122mus_cepstrum};
static PyObject *__pyx_pw_8pysndlib_3clm_123mus_cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mus_cepstrum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1767, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mus_cepstrum") < 0)) __PYX_ERR(0, 1767, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_data = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mus_cepstrum", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1767, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.mus_cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 1767, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_122mus_cepstrum(__pyx_self, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_122mus_cepstrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mus_cepstrum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_mus_cepstrum(__pyx_v_data, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.mus_cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1781
 *     return data
 * 
 * cpdef np.ndarray cepstrum(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */

static PyObject *__pyx_pw_8pysndlib_3clm_125cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_cepstrum(PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_size;
  PyObject *__pyx_v_data_cpy = NULL;
  __Pyx_memviewslice __pyx_v_data_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cepstrum", 1);

  /* "pysndlib/clm.pyx":1789
 *     :rtype: np.ndarray
 *     """
 *     size = len(data)             # <<<<<<<<<<<<<<
 *     check_ndim(data)
 *     data_cpy = np.copy(data)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1789, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "pysndlib/clm.pyx":1790
 *     """
 *     size = len(data)
 *     check_ndim(data)             # <<<<<<<<<<<<<<
 *     data_cpy = np.copy(data)
 *     cdef double [:] data_view = data_cpy
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_data), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1791
 *     size = len(data)
 *     check_ndim(data)
 *     data_cpy = np.copy(data)             # <<<<<<<<<<<<<<
 *     cdef double [:] data_view = data_cpy
 *     cclm.mus_cepstrum(&data_view[0], size)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_data)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_data_cpy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":1792
 *     check_ndim(data)
 *     data_cpy = np.copy(data)
 *     cdef double [:] data_view = data_cpy             # <<<<<<<<<<<<<<
 *     cclm.mus_cepstrum(&data_view[0], size)
 *     return data_cpy
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_data_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __pyx_v_data_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":1793
 *     data_cpy = np.copy(data)
 *     cdef double [:] data_view = data_cpy
 *     cclm.mus_cepstrum(&data_view[0], size)             # <<<<<<<<<<<<<<
 *     return data_cpy
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_data_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_data_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 1793, __pyx_L1_error)
  }
  (void)(mus_cepstrum((&(*((double *) ( /* dim=0 */ (__pyx_v_data_view.data + __pyx_t_7 * __pyx_v_data_view.strides[0]) )))), __pyx_v_size));

  /* "pysndlib/clm.pyx":1794
 *     cdef double [:] data_view = data_cpy
 *     cclm.mus_cepstrum(&data_view[0], size)
 *     return data_cpy             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray partials2wave(partials,  np.ndarray wave=None, table_size=None, bint norm=True ):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_data_cpy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data_cpy, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_data_cpy);
  __pyx_r = ((PyArrayObject *)__pyx_v_data_cpy);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1781
 *     return data
 * 
 * cpdef np.ndarray cepstrum(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data_view, 1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_125cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_124cepstrum, "\n    return cepstrum of signal\n    \n    :param data: samples to analyze\n    :return: cepstrum.\n    :rtype: np.ndarray\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_125cepstrum = {"cepstrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_125cepstrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_124cepstrum};
static PyObject *__pyx_pw_8pysndlib_3clm_125cepstrum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyArrayObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cepstrum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cepstrum") < 0)) __PYX_ERR(0, 1781, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_data = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cepstrum", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1781, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 1781, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_124cepstrum(__pyx_self, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_124cepstrum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cepstrum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_cepstrum(__pyx_v_data, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.cepstrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1796
 *     return data_cpy
 * 
 * cpdef np.ndarray partials2wave(partials,  np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list or np.ndarray of partials (harmonic number and associated amplitude) and produce a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_127partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_partials2wave(PyObject *__pyx_v_partials, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2wave *__pyx_optional_args) {
  PyArrayObject *__pyx_v_wave = ((PyArrayObject *)Py_None);
  PyObject *__pyx_v_table_size = ((PyObject *)Py_None);
  int __pyx_v_norm = ((int)1);
  __Pyx_memviewslice __pyx_v_wave_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_partials_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  mus_long_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partials2wave", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_wave = __pyx_optional_args->wave;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_table_size = __pyx_optional_args->table_size;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_norm = __pyx_optional_args->norm;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_partials);
  __Pyx_INCREF((PyObject *)__pyx_v_wave);
  __Pyx_INCREF(__pyx_v_table_size);

  /* "pysndlib/clm.pyx":1810
 *     """
 * 
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_partials); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1811
 * 
 *     if isinstance(partials, list):
 *         partials = np.array(partials, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(wave, list):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_partials);
    __Pyx_GIVEREF(__pyx_v_partials);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_partials)) __PYX_ERR(0, 1811, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_partials, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":1810
 *     """
 * 
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":1813
 *         partials = np.array(partials, dtype=np.double)
 * 
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave, dtype=np.double)
 * 
 */
  __pyx_t_1 = PyList_Check(((PyObject *)__pyx_v_wave)); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1814
 * 
 *     if isinstance(wave, list):
 *         wave = np.array(wave, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     if not wave:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF((PyObject *)__pyx_v_wave);
    __Pyx_GIVEREF((PyObject *)__pyx_v_wave);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_wave))) __PYX_ERR(0, 1814, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_wave, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":1813
 *         partials = np.array(partials, dtype=np.double)
 * 
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":1816
 *         wave = np.array(wave, dtype=np.double)
 * 
 *     if not wave:             # <<<<<<<<<<<<<<
 *         if table_size is not None:
 *             wave = np.zeros(table_size)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_wave)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1816, __pyx_L1_error)
  __pyx_t_7 = (!__pyx_t_1);
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":1817
 * 
 *     if not wave:
 *         if table_size is not None:             # <<<<<<<<<<<<<<
 *             wave = np.zeros(table_size)
 *         else:
 */
    __pyx_t_7 = (__pyx_v_table_size != Py_None);
    if (__pyx_t_7) {

      /* "pysndlib/clm.pyx":1818
 *     if not wave:
 *         if table_size is not None:
 *             wave = np.zeros(table_size)             # <<<<<<<<<<<<<<
 *         else:
 *             table_size = default.table_size
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_size};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_wave, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pysndlib/clm.pyx":1817
 * 
 *     if not wave:
 *         if table_size is not None:             # <<<<<<<<<<<<<<
 *             wave = np.zeros(table_size)
 *         else:
 */
      goto __pyx_L6;
    }

    /* "pysndlib/clm.pyx":1820
 *             wave = np.zeros(table_size)
 *         else:
 *             table_size = default.table_size             # <<<<<<<<<<<<<<
 *             wave = np.zeros(default.table_size)
 *     else:
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_default); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_table_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_table_size, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pysndlib/clm.pyx":1821
 *         else:
 *             table_size = default.table_size
 *             wave = np.zeros(default.table_size)             # <<<<<<<<<<<<<<
 *     else:
 *         table_size = len(wave)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_default); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_table_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1821, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_wave, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;
    }
    __pyx_L6:;

    /* "pysndlib/clm.pyx":1816
 *         wave = np.array(wave, dtype=np.double)
 * 
 *     if not wave:             # <<<<<<<<<<<<<<
 *         if table_size is not None:
 *             wave = np.zeros(table_size)
 */
    goto __pyx_L5;
  }

  /* "pysndlib/clm.pyx":1823
 *             wave = np.zeros(default.table_size)
 *     else:
 *         table_size = len(wave)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(partials)
 */
  /*else*/ {
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_wave)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1823, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_table_size, __pyx_t_6);
    __pyx_t_6 = 0;
  }
  __pyx_L5:;

  /* "pysndlib/clm.pyx":1825
 *         table_size = len(wave)
 * 
 *     check_ndim(partials)             # <<<<<<<<<<<<<<
 *     check_ndim(wave)
 * 
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1826
 * 
 *     check_ndim(partials)
 *     check_ndim(wave)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] wave_view = wave
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_wave), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1828
 *     check_ndim(wave)
 * 
 *     cdef double [:] wave_view = wave             # <<<<<<<<<<<<<<
 *     cdef double [:] partials_view = partials
 * 
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_wave), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __pyx_v_wave_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":1829
 * 
 *     cdef double [:] wave_view = wave
 *     cdef double [:] partials_view = partials             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 2, &wave_view[0], table_size, norm)
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_partials, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __pyx_v_partials_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":1831
 *     cdef double [:] partials_view = partials
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 2, &wave_view[0], table_size, norm)             # <<<<<<<<<<<<<<
 *     return wave
 * 
 */
  __pyx_t_11 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_partials_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_partials_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1831, __pyx_L1_error)
  }
  __pyx_t_9 = PyObject_Length(__pyx_v_partials); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1831, __pyx_L1_error)
  __pyx_t_12 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_wave_view.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_wave_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1831, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_v_table_size); if (unlikely((__pyx_t_13 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L1_error)
  (void)(mus_partials_to_wave((&(*((double *) ( /* dim=0 */ (__pyx_v_partials_view.data + __pyx_t_11 * __pyx_v_partials_view.strides[0]) )))), __Pyx_div_Py_ssize_t(__pyx_t_9, 2), (&(*((double *) ( /* dim=0 */ (__pyx_v_wave_view.data + __pyx_t_12 * __pyx_v_wave_view.strides[0]) )))), __pyx_t_13, __pyx_v_norm));

  /* "pysndlib/clm.pyx":1832
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 2, &wave_view[0], table_size, norm)
 *     return wave             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=None, table_size=None, bint norm=True ):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_wave);
  __pyx_r = __pyx_v_wave;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1796
 *     return data_cpy
 * 
 * cpdef np.ndarray partials2wave(partials,  np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list or np.ndarray of partials (harmonic number and associated amplitude) and produce a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
  __Pyx_AddTraceback("pysndlib.clm.partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_wave_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_partials_view, 1);
  __Pyx_XDECREF(__pyx_v_partials);
  __Pyx_XDECREF((PyObject *)__pyx_v_wave);
  __Pyx_XDECREF(__pyx_v_table_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_127partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_126partials2wave, "\n    take a list or np.ndarray of partials (harmonic number and associated amplitude) and produce a\n    waveform for use in table_lookup.\n    \n    :param partials: list or np.ndarray of partials (harm and amp)\n    :param wave: array to write wave into. if not provided, one will be allocated\n    :param table_size: size of table\n    :param norm: whether to normalize partials\n    :return: array provided in wave or new array.\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_127partials2wave = {"partials2wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_127partials2wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_126partials2wave};
static PyObject *__pyx_pw_8pysndlib_3clm_127partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_partials = 0;
  PyArrayObject *__pyx_v_wave = 0;
  PyObject *__pyx_v_table_size = 0;
  int __pyx_v_norm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("partials2wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_partials,&__pyx_n_s_wave,&__pyx_n_s_table_size,&__pyx_n_s_norm,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyArrayObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_wave);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_norm);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "partials2wave") < 0)) __PYX_ERR(0, 1796, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_partials = values[0];
    __pyx_v_wave = ((PyArrayObject *)values[1]);
    __pyx_v_table_size = values[2];
    if (values[3]) {
      __pyx_v_norm = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_norm == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error)
    } else {
      __pyx_v_norm = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("partials2wave", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1796, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wave), __pyx_ptype_5numpy_ndarray, 1, "wave", 0))) __PYX_ERR(0, 1796, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_126partials2wave(__pyx_self, __pyx_v_partials, __pyx_v_wave, __pyx_v_table_size, __pyx_v_norm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_126partials2wave(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, PyArrayObject *__pyx_v_wave, PyObject *__pyx_v_table_size, int __pyx_v_norm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_partials2wave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partials2wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.wave = __pyx_v_wave;
  __pyx_t_2.table_size = __pyx_v_table_size;
  __pyx_t_2.norm = __pyx_v_norm;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_partials2wave(__pyx_v_partials, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1834
 *     return wave
 * 
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list of partials (harmonic number, amplitude, initial phase) and produce a waveform for use
 */

static PyObject *__pyx_pw_8pysndlib_3clm_129phase_partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_partials2wave(PyObject *__pyx_v_partials, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave *__pyx_optional_args) {
  PyArrayObject *__pyx_v_wave = ((PyArrayObject *)Py_None);
  PyObject *__pyx_v_table_size = ((PyObject *)Py_None);
  int __pyx_v_norm = ((int)1);
  __Pyx_memviewslice __pyx_v_wave_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_partials_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  mus_long_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_partials2wave", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_wave = __pyx_optional_args->wave;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_table_size = __pyx_optional_args->table_size;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_norm = __pyx_optional_args->norm;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_partials);
  __Pyx_INCREF((PyObject *)__pyx_v_wave);
  __Pyx_INCREF(__pyx_v_table_size);

  /* "pysndlib/clm.pyx":1848
 *     """
 * 
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_partials); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1849
 * 
 *     if isinstance(partials, list):
 *         partials = np.array(partials, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     if wave is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_partials);
    __Pyx_GIVEREF(__pyx_v_partials);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_partials)) __PYX_ERR(0, 1849, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_partials, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":1848
 *     """
 * 
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":1851
 *         partials = np.array(partials, dtype=np.double)
 * 
 *     if wave is None:             # <<<<<<<<<<<<<<
 *         if table_size:
 *             wave = np.zeros(table_size)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_wave) == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1852
 * 
 *     if wave is None:
 *         if table_size:             # <<<<<<<<<<<<<<
 *             wave = np.zeros(table_size)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_table_size); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1852, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":1853
 *     if wave is None:
 *         if table_size:
 *             wave = np.zeros(table_size)             # <<<<<<<<<<<<<<
 *         else:
 *             wave = np.zeros(default.table_size)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_table_size};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1853, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1853, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_wave, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "pysndlib/clm.pyx":1852
 * 
 *     if wave is None:
 *         if table_size:             # <<<<<<<<<<<<<<
 *             wave = np.zeros(table_size)
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pysndlib/clm.pyx":1855
 *             wave = np.zeros(table_size)
 *         else:
 *             wave = np.zeros(default.table_size)             # <<<<<<<<<<<<<<
 *     else:
 *         table_size = len(wave)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_table_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_wave, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;
    }
    __pyx_L5:;

    /* "pysndlib/clm.pyx":1851
 *         partials = np.array(partials, dtype=np.double)
 * 
 *     if wave is None:             # <<<<<<<<<<<<<<
 *         if table_size:
 *             wave = np.zeros(table_size)
 */
    goto __pyx_L4;
  }

  /* "pysndlib/clm.pyx":1857
 *             wave = np.zeros(default.table_size)
 *     else:
 *         table_size = len(wave)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(wave)
 */
  /*else*/ {
    __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_wave)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1857, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_table_size, __pyx_t_6);
    __pyx_t_6 = 0;
  }
  __pyx_L4:;

  /* "pysndlib/clm.pyx":1859
 *         table_size = len(wave)
 * 
 *     check_ndim(wave)             # <<<<<<<<<<<<<<
 *     check_ndim(partials)
 * 
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(((PyObject *)__pyx_v_wave), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1860
 * 
 *     check_ndim(wave)
 *     check_ndim(partials)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] wave_view = wave
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1862
 *     check_ndim(partials)
 * 
 *     cdef double [:] wave_view = wave             # <<<<<<<<<<<<<<
 *     cdef double [:] partials_view = partials
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_wave), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __pyx_v_wave_view = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "pysndlib/clm.pyx":1863
 * 
 *     cdef double [:] wave_view = wave
 *     cdef double [:] partials_view = partials             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 3, &wave_view[0], table_size, norm)
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_partials, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __pyx_v_partials_view = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "pysndlib/clm.pyx":1865
 *     cdef double [:] partials_view = partials
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 3, &wave_view[0], table_size, norm)             # <<<<<<<<<<<<<<
 *     return wave
 * 
 */
  __pyx_t_10 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_partials_view.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_partials_view.shape[0])) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    __PYX_ERR(0, 1865, __pyx_L1_error)
  }
  __pyx_t_8 = PyObject_Length(__pyx_v_partials); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1865, __pyx_L1_error)
  __pyx_t_11 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_wave_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_wave_view.shape[0])) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    __PYX_ERR(0, 1865, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_table_size); if (unlikely((__pyx_t_12 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L1_error)
  (void)(mus_partials_to_wave((&(*((double *) ( /* dim=0 */ (__pyx_v_partials_view.data + __pyx_t_10 * __pyx_v_partials_view.strides[0]) )))), __Pyx_div_Py_ssize_t(__pyx_t_8, 3), (&(*((double *) ( /* dim=0 */ (__pyx_v_wave_view.data + __pyx_t_11 * __pyx_v_wave_view.strides[0]) )))), __pyx_t_12, __pyx_v_norm));

  /* "pysndlib/clm.pyx":1866
 * 
 *     cclm.mus_partials_to_wave(&partials_view[0], len(partials) // 3, &wave_view[0], table_size, norm)
 *     return wave             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=Polynomial.FIRST_KIND):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_wave);
  __pyx_r = __pyx_v_wave;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1834
 *     return wave
 * 
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list of partials (harmonic number, amplitude, initial phase) and produce a waveform for use
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1);
  __Pyx_AddTraceback("pysndlib.clm.phase_partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_wave_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_partials_view, 1);
  __Pyx_XDECREF(__pyx_v_partials);
  __Pyx_XDECREF((PyObject *)__pyx_v_wave);
  __Pyx_XDECREF(__pyx_v_table_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_129phase_partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_128phase_partials2wave, "\n    take a list of partials (harmonic number, amplitude, initial phase) and produce a waveform for use\n    in table_lookup.\n    \n    :param partials: list or np.ndarray of partials (harm, amp, phase)\n    :param wave: array to write wave into. if not provided, one will be allocated\n    :param table_size: size of table\n    :param norm: whether to normalize partials\n    :return: array provided in wave or new array.\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_129phase_partials2wave = {"phase_partials2wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_129phase_partials2wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_128phase_partials2wave};
static PyObject *__pyx_pw_8pysndlib_3clm_129phase_partials2wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_partials = 0;
  PyArrayObject *__pyx_v_wave = 0;
  PyObject *__pyx_v_table_size = 0;
  int __pyx_v_norm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_partials2wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_partials,&__pyx_n_s_wave,&__pyx_n_s_table_size,&__pyx_n_s_norm,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyArrayObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_wave);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_norm);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_partials2wave") < 0)) __PYX_ERR(0, 1834, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_partials = values[0];
    __pyx_v_wave = ((PyArrayObject *)values[1]);
    __pyx_v_table_size = values[2];
    if (values[3]) {
      __pyx_v_norm = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_norm == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L3_error)
    } else {
      __pyx_v_norm = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_partials2wave", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1834, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wave), __pyx_ptype_5numpy_ndarray, 1, "wave", 0))) __PYX_ERR(0, 1834, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_128phase_partials2wave(__pyx_self, __pyx_v_partials, __pyx_v_wave, __pyx_v_table_size, __pyx_v_norm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_128phase_partials2wave(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, PyArrayObject *__pyx_v_wave, PyObject *__pyx_v_table_size, int __pyx_v_norm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_partials2wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.wave = __pyx_v_wave;
  __pyx_t_2.table_size = __pyx_v_table_size;
  __pyx_t_2.norm = __pyx_v_norm;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_partials2wave(__pyx_v_partials, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_partials2wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1868
 *     return wave
 * 
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 *     """
 *     returns a chebyshev polynomial suitable for use with the polynomial generator to create (via
 */

static PyObject *__pyx_pw_8pysndlib_3clm_131partials2polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_partials2polynomial(PyObject *__pyx_v_partials, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial *__pyx_optional_args) {
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind = __pyx_k__29;
  PyArrayObject *__pyx_v_p = NULL;
  __Pyx_memviewslice __pyx_v_p_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partials2polynomial", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_kind = __pyx_optional_args->kind;
    }
  }
  __Pyx_INCREF(__pyx_v_partials);

  /* "pysndlib/clm.pyx":1879
 * 
 *     """
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_partials); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":1880
 *     """
 *     if isinstance(partials, list):
 *         partials = np.array(partials, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(partials)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_partials);
    __Pyx_GIVEREF(__pyx_v_partials);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_partials)) __PYX_ERR(0, 1880, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_partials, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":1879
 * 
 *     """
 *     if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *         partials = np.array(partials, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":1882
 *         partials = np.array(partials, dtype=np.double)
 * 
 *     check_ndim(partials)             # <<<<<<<<<<<<<<
 * 
 *     p = to_partials(partials)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1884
 *     check_ndim(partials)
 * 
 *     p = to_partials(partials)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] p_view = p
 */
  __pyx_t_6 = ((PyObject *)__pyx_f_8pysndlib_3clm_to_partials(__pyx_v_partials, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_p = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":1886
 *     p = to_partials(partials)
 * 
 *     cdef double [:] p_view = p             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_partials_to_polynomial(len(p), &p_view[0], <cclm.mus_polynomial_t>kind)
 */
  __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_p), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __pyx_v_p_view = __pyx_t_7;
  __pyx_t_7.memview = NULL;
  __pyx_t_7.data = NULL;

  /* "pysndlib/clm.pyx":1888
 *     cdef double [:] p_view = p
 * 
 *     cclm.mus_partials_to_polynomial(len(p), &p_view[0], <cclm.mus_polynomial_t>kind)             # <<<<<<<<<<<<<<
 *     return p
 * 
 */
  __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_p)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1888, __pyx_L1_error)
  __pyx_t_9 = 0;
  __pyx_t_10 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_v_p_view.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_v_p_view.shape[0])) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    __PYX_ERR(0, 1888, __pyx_L1_error)
  }
  (void)(mus_partials_to_polynomial(__pyx_t_8, (&(*((double *) ( /* dim=0 */ (__pyx_v_p_view.data + __pyx_t_9 * __pyx_v_p_view.strides[0]) )))), ((mus_polynomial_t)__pyx_v_kind)));

  /* "pysndlib/clm.pyx":1889
 * 
 *     cclm.mus_partials_to_polynomial(len(p), &p_view[0], <cclm.mus_polynomial_t>kind)
 *     return p             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_p);
  __pyx_r = __pyx_v_p;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1868
 *     return wave
 * 
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 *     """
 *     returns a chebyshev polynomial suitable for use with the polynomial generator to create (via
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
  __Pyx_AddTraceback("pysndlib.clm.partials2polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_p);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_p_view, 1);
  __Pyx_XDECREF(__pyx_v_partials);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_131partials2polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_130partials2polynomial, "\n    returns a chebyshev polynomial suitable for use with the polynomial generator to create (via\n    waveshaping) the harmonic spectrum described by the partials argument.\n    \n    :param partials: list or np.ndarray of partials (harm and amp)\n    :param kind: Polynomial.EITHER_KIND, Polynomial.FIRST_KIND, Polynomial.SECOND_KIND, Polynomial.BOTH_KINDS\n    :return: chebyshev polynomial\n    :rtype: np.ndarray\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_131partials2polynomial = {"partials2polynomial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_131partials2polynomial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_130partials2polynomial};
static PyObject *__pyx_pw_8pysndlib_3clm_131partials2polynomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_partials = 0;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("partials2polynomial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_partials,&__pyx_n_s_kind,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1868, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kind);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1868, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "partials2polynomial") < 0)) __PYX_ERR(0, 1868, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_partials = values[0];
    if (values[1]) {
      __pyx_v_kind = ((enum __pyx_t_8pysndlib_3clm_Polynomial)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1868, __pyx_L3_error)
    } else {
      __pyx_v_kind = __pyx_k__29;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("partials2polynomial", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1868, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.partials2polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_130partials2polynomial(__pyx_self, __pyx_v_partials, __pyx_v_kind);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_130partials2polynomial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partials2polynomial", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.kind = __pyx_v_kind;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_partials2polynomial(__pyx_v_partials, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.partials2polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1892
 * 
 * 
 * cpdef np.ndarray normalize_partials(partials):             # <<<<<<<<<<<<<<
 *     """
 *     scales the partial amplitudes in the list/array or list 'partials' by the inverse of their sum (so
 */

static PyObject *__pyx_pw_8pysndlib_3clm_133normalize_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_normalize_partials(PyObject *__pyx_v_partials, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_partials_arr = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_v_normalized = NULL;
  PyObject *__pyx_v_result = NULL;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize_partials", 1);

  /* "pysndlib/clm.pyx":1905
 *     # also c function is meant for in place operation
 *     #allocate new array.
 *     partials_arr = np.array(partials, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(partials_arr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_partials);
  __Pyx_GIVEREF(__pyx_v_partials);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_partials)) __PYX_ERR(0, 1905, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_partials_arr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1907
 *     partials_arr = np.array(partials, dtype=np.double)
 * 
 *     check_ndim(partials_arr)             # <<<<<<<<<<<<<<
 * 
 *     p = partials_arr[::2]
 */
  __pyx_t_5 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_partials_arr, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1909
 *     check_ndim(partials_arr)
 * 
 *     p = partials_arr[::2]             # <<<<<<<<<<<<<<
 * 
 *     v = partials_arr[1::2]
 */
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_partials_arr, __pyx_slice__21); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_p = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1911
 *     p = partials_arr[::2]
 * 
 *     v = partials_arr[1::2]             # <<<<<<<<<<<<<<
 * 
 *     v_normalized = v / v.sum()
 */
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_partials_arr, __pyx_slice__30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_v = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":1913
 *     v = partials_arr[1::2]
 * 
 *     v_normalized = v / v.sum()             # <<<<<<<<<<<<<<
 *     result = np.empty((p.size + v.size), dtype=np.double)
 *     result[0::2] = p
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_v, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v_normalized = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":1914
 * 
 *     v_normalized = v / v.sum()
 *     result = np.empty((p.size + v.size), dtype=np.double)             # <<<<<<<<<<<<<<
 *     result[0::2] = p
 *     result[1::2] = v_normalized
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":1915
 *     v_normalized = v / v.sum()
 *     result = np.empty((p.size + v.size), dtype=np.double)
 *     result[0::2] = p             # <<<<<<<<<<<<<<
 *     result[1::2] = v_normalized
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_result, __pyx_slice__31, __pyx_v_p) < 0))) __PYX_ERR(0, 1915, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1916
 *     result = np.empty((p.size + v.size), dtype=np.double)
 *     result[0::2] = p
 *     result[1::2] = v_normalized             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_result, __pyx_slice__30, __pyx_v_v_normalized) < 0))) __PYX_ERR(0, 1916, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1919
 * 
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double chebyshev_tu_sum( cython.double x, tcoeffs, ucoeffs):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyArrayObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1892
 * 
 * 
 * cpdef np.ndarray normalize_partials(partials):             # <<<<<<<<<<<<<<
 *     """
 *     scales the partial amplitudes in the list/array or list 'partials' by the inverse of their sum (so
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.normalize_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_partials_arr);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_v_normalized);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_133normalize_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_132normalize_partials, "\n    scales the partial amplitudes in the list/array or list 'partials' by the inverse of their sum (so\n    that they add to 1.0). creates new array\n\n    :param partials: list or np.ndarray of partials (harm and amp)\n    :return: normalized partials\n    :rtype: np.ndarray      \n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_133normalize_partials = {"normalize_partials", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_133normalize_partials, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_132normalize_partials};
static PyObject *__pyx_pw_8pysndlib_3clm_133normalize_partials(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_partials = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize_partials (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_partials,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "normalize_partials") < 0)) __PYX_ERR(0, 1892, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_partials = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalize_partials", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1892, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.normalize_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_132normalize_partials(__pyx_self, __pyx_v_partials);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_132normalize_partials(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_partials) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize_partials", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_normalize_partials(__pyx_v_partials, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.normalize_partials", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1921
 *     return result
 * 
 * cpdef cython.double chebyshev_tu_sum( cython.double x, tcoeffs, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn and un, with phase x
 */

static PyObject *__pyx_pw_8pysndlib_3clm_135chebyshev_tu_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_tu_sum(double __pyx_v_x, PyObject *__pyx_v_tcoeffs, PyObject *__pyx_v_ucoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_tcoeffs_cpy = NULL;
  PyObject *__pyx_v_ucoeffs_cpy = NULL;
  __Pyx_memviewslice __pyx_v_tcoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_ucoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_tu_sum", 1);

  /* "pysndlib/clm.pyx":1931
 * 
 *     """
 *     tcoeffs_cpy = np.array(tcoeffs)             # <<<<<<<<<<<<<<
 *     ucoeffs_cpy = np.array(ucoeffs)
 *     check_ndim(tcoeffs_cpy)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tcoeffs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_tcoeffs_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1932
 *     """
 *     tcoeffs_cpy = np.array(tcoeffs)
 *     ucoeffs_cpy = np.array(ucoeffs)             # <<<<<<<<<<<<<<
 *     check_ndim(tcoeffs_cpy)
 *     check_ndim(ucoeffs_cpy)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ucoeffs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_ucoeffs_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1933
 *     tcoeffs_cpy = np.array(tcoeffs)
 *     ucoeffs_cpy = np.array(ucoeffs)
 *     check_ndim(tcoeffs_cpy)             # <<<<<<<<<<<<<<
 *     check_ndim(ucoeffs_cpy)
 *     compare_shapes(tcoeffs_cpy, ucoeffs_cpy)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_tcoeffs_cpy, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1934
 *     ucoeffs_cpy = np.array(ucoeffs)
 *     check_ndim(tcoeffs_cpy)
 *     check_ndim(ucoeffs_cpy)             # <<<<<<<<<<<<<<
 *     compare_shapes(tcoeffs_cpy, ucoeffs_cpy)
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_ucoeffs_cpy, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1935
 *     check_ndim(tcoeffs_cpy)
 *     check_ndim(ucoeffs_cpy)
 *     compare_shapes(tcoeffs_cpy, ucoeffs_cpy)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_compare_shapes(__pyx_v_tcoeffs_cpy, __pyx_v_ucoeffs_cpy, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1938
 * 
 * 
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy
 *     return cclm.mus_chebyshev_tu_sum(x, len(tcoeffs_cpy), &tcoeffs_view[0], &ucoeffs_view[0])
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_tcoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __pyx_v_tcoeffs_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1939
 * 
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy             # <<<<<<<<<<<<<<
 *     return cclm.mus_chebyshev_tu_sum(x, len(tcoeffs_cpy), &tcoeffs_view[0], &ucoeffs_view[0])
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_ucoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __pyx_v_ucoeffs_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1940
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy
 *     return cclm.mus_chebyshev_tu_sum(x, len(tcoeffs_cpy), &tcoeffs_view[0], &ucoeffs_view[0])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_tcoeffs_cpy); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1940, __pyx_L1_error)
  __pyx_t_7 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_tcoeffs_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_tcoeffs_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1940, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_ucoeffs_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_ucoeffs_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1940, __pyx_L1_error)
  }
  __pyx_r = mus_chebyshev_tu_sum(__pyx_v_x, __pyx_t_6, (&(*((double *) ( /* dim=0 */ (__pyx_v_tcoeffs_view.data + __pyx_t_7 * __pyx_v_tcoeffs_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_ucoeffs_view.data + __pyx_t_8 * __pyx_v_ucoeffs_view.strides[0]) )))));
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1921
 *     return result
 * 
 * cpdef cython.double chebyshev_tu_sum( cython.double x, tcoeffs, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn and un, with phase x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_tu_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tcoeffs_cpy);
  __Pyx_XDECREF(__pyx_v_ucoeffs_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_tcoeffs_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ucoeffs_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_135chebyshev_tu_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_134chebyshev_tu_sum, "\n    returns the sum of the weighted chebyshev polynomials tn and un, with phase x\n    \n    :param x: input\n    :param tcoeffs: tn\n    :param ucoeffs: un\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_135chebyshev_tu_sum = {"chebyshev_tu_sum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_135chebyshev_tu_sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_134chebyshev_tu_sum};
static PyObject *__pyx_pw_8pysndlib_3clm_135chebyshev_tu_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  PyObject *__pyx_v_tcoeffs = 0;
  PyObject *__pyx_v_ucoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chebyshev_tu_sum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_tcoeffs,&__pyx_n_s_ucoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tcoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("chebyshev_tu_sum", 1, 3, 3, 1); __PYX_ERR(0, 1921, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ucoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("chebyshev_tu_sum", 1, 3, 3, 2); __PYX_ERR(0, 1921, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "chebyshev_tu_sum") < 0)) __PYX_ERR(0, 1921, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L3_error)
    __pyx_v_tcoeffs = values[1];
    __pyx_v_ucoeffs = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chebyshev_tu_sum", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1921, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_tu_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_134chebyshev_tu_sum(__pyx_self, __pyx_v_x, __pyx_v_tcoeffs, __pyx_v_ucoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_134chebyshev_tu_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_tcoeffs, PyObject *__pyx_v_ucoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_tu_sum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_chebyshev_tu_sum(__pyx_v_x, __pyx_v_tcoeffs, __pyx_v_ucoeffs, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_tu_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1943
 * 
 * 
 * cpdef cython.double chebyshev_t_sum(cython.double x, tcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn
 */

static PyObject *__pyx_pw_8pysndlib_3clm_137chebyshev_t_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_t_sum(double __pyx_v_x, PyObject *__pyx_v_tcoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_tcoeffs_cpy = NULL;
  __Pyx_memviewslice __pyx_v_tcoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_t_sum", 1);

  /* "pysndlib/clm.pyx":1952
 * 
 *     """
 *     tcoeffs_cpy = np.array(tcoeffs)             # <<<<<<<<<<<<<<
 *     check_ndim(tcoeffs_cpy)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tcoeffs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_tcoeffs_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1953
 *     """
 *     tcoeffs_cpy = np.array(tcoeffs)
 *     check_ndim(tcoeffs_cpy)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_tcoeffs_cpy, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1955
 *     check_ndim(tcoeffs_cpy)
 * 
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy             # <<<<<<<<<<<<<<
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_tcoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __pyx_v_tcoeffs_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1956
 * 
 *     cdef double [:] tcoeffs_view = tcoeffs_cpy
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double chebyshev_u_sum(cython.double x, ucoeffs):
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_tcoeffs_cpy); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1956, __pyx_L1_error)
  __pyx_t_7 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_tcoeffs_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_tcoeffs_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1956, __pyx_L1_error)
  }
  __pyx_r = mus_chebyshev_t_sum(__pyx_v_x, __pyx_t_6, (&(*((double *) ( /* dim=0 */ (__pyx_v_tcoeffs_view.data + __pyx_t_7 * __pyx_v_tcoeffs_view.strides[0]) )))));
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1943
 * 
 * 
 * cpdef cython.double chebyshev_t_sum(cython.double x, tcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_t_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tcoeffs_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_tcoeffs_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_137chebyshev_t_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_136chebyshev_t_sum, "\n    returns the sum of the weighted chebyshev polynomials tn\n    \n    :param x: nput\n    :param tcoeffs: tn\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_137chebyshev_t_sum = {"chebyshev_t_sum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_137chebyshev_t_sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_136chebyshev_t_sum};
static PyObject *__pyx_pw_8pysndlib_3clm_137chebyshev_t_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  PyObject *__pyx_v_tcoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chebyshev_t_sum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_tcoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tcoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("chebyshev_t_sum", 1, 2, 2, 1); __PYX_ERR(0, 1943, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "chebyshev_t_sum") < 0)) __PYX_ERR(0, 1943, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L3_error)
    __pyx_v_tcoeffs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chebyshev_t_sum", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1943, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_t_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_136chebyshev_t_sum(__pyx_self, __pyx_v_x, __pyx_v_tcoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_136chebyshev_t_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_tcoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_t_sum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_chebyshev_t_sum(__pyx_v_x, __pyx_v_tcoeffs, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_t_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1958
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])
 * 
 * cpdef cython.double chebyshev_u_sum(cython.double x, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials un
 */

static PyObject *__pyx_pw_8pysndlib_3clm_139chebyshev_u_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_chebyshev_u_sum(double __pyx_v_x, PyObject *__pyx_v_ucoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_ucoeffs_cpy = NULL;
  __Pyx_memviewslice __pyx_v_ucoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_u_sum", 1);

  /* "pysndlib/clm.pyx":1967
 * 
 *     """
 *     ucoeffs_cpy = np.array(ucoeffs)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(ucoeffs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_ucoeffs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_ucoeffs_cpy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1969
 *     ucoeffs_cpy = np.array(ucoeffs)
 * 
 *     check_ndim(ucoeffs)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_ucoeffs, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":1971
 *     check_ndim(ucoeffs)
 * 
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy             # <<<<<<<<<<<<<<
 *     return cclm.mus_chebyshev_u_sum(x,len(ucoeffs_cpy), &ucoeffs_view[0])
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_ucoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __pyx_v_ucoeffs_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":1972
 * 
 *     cdef double [:] ucoeffs_view = ucoeffs_cpy
 *     return cclm.mus_chebyshev_u_sum(x,len(ucoeffs_cpy), &ucoeffs_view[0])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_ucoeffs_cpy); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1972, __pyx_L1_error)
  __pyx_t_7 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_ucoeffs_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_ucoeffs_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 1972, __pyx_L1_error)
  }
  __pyx_r = mus_chebyshev_u_sum(__pyx_v_x, __pyx_t_6, (&(*((double *) ( /* dim=0 */ (__pyx_v_ucoeffs_view.data + __pyx_t_7 * __pyx_v_ucoeffs_view.strides[0]) )))));
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1958
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])
 * 
 * cpdef cython.double chebyshev_u_sum(cython.double x, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials un
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_u_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ucoeffs_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ucoeffs_view, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_139chebyshev_u_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_138chebyshev_u_sum, "\n    returns the sum of the weighted chebyshev polynomials un\n    \n    :param x: input\n    :param ucoeffs: un\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_139chebyshev_u_sum = {"chebyshev_u_sum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_139chebyshev_u_sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_138chebyshev_u_sum};
static PyObject *__pyx_pw_8pysndlib_3clm_139chebyshev_u_sum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  PyObject *__pyx_v_ucoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chebyshev_u_sum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_ucoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ucoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("chebyshev_u_sum", 1, 2, 2, 1); __PYX_ERR(0, 1958, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "chebyshev_u_sum") < 0)) __PYX_ERR(0, 1958, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error)
    __pyx_v_ucoeffs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chebyshev_u_sum", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1958, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_u_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_138chebyshev_u_sum(__pyx_self, __pyx_v_x, __pyx_v_ucoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_138chebyshev_u_sum(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, PyObject *__pyx_v_ucoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chebyshev_u_sum", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_chebyshev_u_sum(__pyx_v_x, __pyx_v_ucoeffs, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.chebyshev_u_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1978
 * 
 * # ---------------- oscil ---------------- #
 * cpdef mus_any make_oscil(cython.double frequency=0.,cython.double  initial_phase = 0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil (sinewave) generator
 */

static PyObject *__pyx_pw_8pysndlib_3clm_141make_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_oscil(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_oscil *__pyx_optional_args) {
  double __pyx_v_frequency = ((double)0.);
  double __pyx_v_initial_phase = ((double)0.0);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_oscil", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frequency = __pyx_optional_args->frequency;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_phase = __pyx_optional_args->initial_phase;
      }
    }
  }

  /* "pysndlib/clm.pyx":1986
 *     :return: oscil gen
 *     """
 *     check_range('frequency', frequency, 0., get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1986, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":1989
 * 
 * 
 *     return mus_any.from_ptr(cclm.mus_make_oscil(frequency, initial_phase))             # <<<<<<<<<<<<<<
 * 
 * ## Changing to avoid None overhead. Think it slows thing s down even if mus_oscil_unmodulated can be used.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_oscil(__pyx_v_frequency, __pyx_v_initial_phase), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1978
 * 
 * # ---------------- oscil ---------------- #
 * cpdef mus_any make_oscil(cython.double frequency=0.,cython.double  initial_phase = 0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil (sinewave) generator
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_141make_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_140make_oscil, "\n    return a new oscil (sinewave) generator\n    \n    :param frequency: frequency in hz\n    :param initial_phase: initial phase in radians\n    :return: oscil gen\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_141make_oscil = {"make_oscil", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_141make_oscil, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_140make_oscil};
static PyObject *__pyx_pw_8pysndlib_3clm_141make_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_initial_phase;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_oscil (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_initial_phase,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_phase);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1978, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_oscil") < 0)) __PYX_ERR(0, 1978, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1978, __pyx_L3_error)
    } else {
      __pyx_v_frequency = ((double)0.);
    }
    if (values[1]) {
      __pyx_v_initial_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_initial_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1978, __pyx_L3_error)
    } else {
      __pyx_v_initial_phase = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_oscil", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1978, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_140make_oscil(__pyx_self, __pyx_v_frequency, __pyx_v_initial_phase);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_140make_oscil(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_oscil __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_oscil", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.frequency = __pyx_v_frequency;
  __pyx_t_2.initial_phase = __pyx_v_initial_phase;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_oscil(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":1992
 * 
 * ## Changing to avoid None overhead. Think it slows thing s down even if mus_oscil_unmodulated can be used.
 * cpdef cython.double oscil(mus_any gen, cython.double fm=0.0, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen: val = sin(phase + pm); phase += (freq + fm)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_143oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_oscil *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_v_pm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_pm = __pyx_optional_args->pm;
      }
    }
  }

  /* "pysndlib/clm.pyx":2002
 * 
 *     """
 *     return cclm.mus_oscil(gen._ptr, fm, pm)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double oscil_unmodulated(mus_any gen):
 */
  __pyx_r = mus_oscil(__pyx_v_gen->_ptr, __pyx_v_fm, __pyx_v_pm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":1992
 * 
 * ## Changing to avoid None overhead. Think it slows thing s down even if mus_oscil_unmodulated can be used.
 * cpdef cython.double oscil(mus_any gen, cython.double fm=0.0, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen: val = sin(phase + pm); phase += (freq + fm)
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_143oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_142oscil, "\n    return next sample from oscil gen: val = sin(phase + pm); phase += (freq + fm)\n    \n    :param gen: oscil gen\n    :param fm: fm input\n    :param pm: pm input\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_143oscil = {"oscil", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_143oscil, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_142oscil};
static PyObject *__pyx_pw_8pysndlib_3clm_143oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  double __pyx_v_pm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("oscil (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,&__pyx_n_s_pm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "oscil") < 0)) __PYX_ERR(0, 1992, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_pm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L3_error)
    } else {
      __pyx_v_pm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("oscil", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1992, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 1992, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_142oscil(__pyx_self, __pyx_v_gen, __pyx_v_fm, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_142oscil(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm, double __pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_oscil __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("oscil", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_oscil(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2004
 *     return cclm.mus_oscil(gen._ptr, fm, pm)
 * 
 * cpdef cython.double oscil_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen. no modulation
 */

static PyObject *__pyx_pw_8pysndlib_3clm_145oscil_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2012
 * 
 *     """
 *     return cclm.mus_oscil_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_oscil(mus_any gen):
 */
  __pyx_r = mus_oscil_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2004
 *     return cclm.mus_oscil(gen._ptr, fm, pm)
 * 
 * cpdef cython.double oscil_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen. no modulation
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_145oscil_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_144oscil_unmodulated, "\n    return next sample from oscil gen. no modulation\n    \n    :param gen: oscil gen\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_145oscil_unmodulated = {"oscil_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_145oscil_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_144oscil_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_145oscil_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("oscil_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2004, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "oscil_unmodulated") < 0)) __PYX_ERR(0, 2004, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("oscil_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2004, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.oscil_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2004, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_144oscil_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_144oscil_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("oscil_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_oscil_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2004, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.oscil_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2014
 *     return cclm.mus_oscil_unmodulated(gen._ptr)
 * 
 * cpdef bint is_oscil(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil
 */

static PyObject *__pyx_pw_8pysndlib_3clm_147is_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_oscil(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2022
 * 
 *     """
 *     return cclm.mus_is_oscil(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- oscil-bank ---------------- #
 */
  __pyx_r = mus_is_oscil(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2014
 *     return cclm.mus_oscil_unmodulated(gen._ptr)
 * 
 * cpdef bint is_oscil(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_147is_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_146is_oscil, "\n    returns True if gen is an oscil\n    \n    :param gen: oscil gen\n    :rtype: bool\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_147is_oscil = {"is_oscil", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_147is_oscil, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_146is_oscil};
static PyObject *__pyx_pw_8pysndlib_3clm_147is_oscil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_oscil (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2014, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_oscil") < 0)) __PYX_ERR(0, 2014, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_oscil", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2014, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2014, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_146is_oscil(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_146is_oscil(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_oscil", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_oscil(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2014, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_oscil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2026
 * # ---------------- oscil-bank ---------------- #
 * 
 * cpdef mus_any make_oscil_bank(freqs, phases, amps=None, bint stable=False):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil_bank generator. (freqs in radians)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_149make_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_oscil_bank(PyObject *__pyx_v_freqs, PyObject *__pyx_v_phases, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_oscil_bank *__pyx_optional_args) {
  PyObject *__pyx_v_amps = ((PyObject *)Py_None);
  int __pyx_v_stable = ((int)0);
  __Pyx_memviewslice __pyx_v_freqs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_phases_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_amps_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_oscil_bank", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amps = __pyx_optional_args->amps;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_stable = __pyx_optional_args->stable;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_freqs);
  __Pyx_INCREF(__pyx_v_phases);
  __Pyx_INCREF(__pyx_v_amps);

  /* "pysndlib/clm.pyx":2037
 * 
 *     """
 *     cdef cclm.mus_float_t [:] freqs_view = None             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t [:] phases_view = None
 *     cdef cclm.mus_float_t [:] amps_view = None
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __pyx_v_freqs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":2038
 *     """
 *     cdef cclm.mus_float_t [:] freqs_view = None
 *     cdef cclm.mus_float_t [:] phases_view = None             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t [:] amps_view = None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __pyx_v_phases_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":2039
 *     cdef cclm.mus_float_t [:] freqs_view = None
 *     cdef cclm.mus_float_t [:] phases_view = None
 *     cdef cclm.mus_float_t [:] amps_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(freqs, list):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __pyx_v_amps_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":2041
 *     cdef cclm.mus_float_t [:] amps_view = None
 * 
 *     if isinstance(freqs, list):             # <<<<<<<<<<<<<<
 *         freqs = np.array(freqs, dtype=np.double)
 *     if isinstance(phases, list):
 */
  __pyx_t_2 = PyList_Check(__pyx_v_freqs); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":2042
 * 
 *     if isinstance(freqs, list):
 *         freqs = np.array(freqs, dtype=np.double)             # <<<<<<<<<<<<<<
 *     if isinstance(phases, list):
 *         phases = np.array(phases, dtype=np.double)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_freqs);
    __Pyx_GIVEREF(__pyx_v_freqs);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_freqs)) __PYX_ERR(0, 2042, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_freqs, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pysndlib/clm.pyx":2041
 *     cdef cclm.mus_float_t [:] amps_view = None
 * 
 *     if isinstance(freqs, list):             # <<<<<<<<<<<<<<
 *         freqs = np.array(freqs, dtype=np.double)
 *     if isinstance(phases, list):
 */
  }

  /* "pysndlib/clm.pyx":2043
 *     if isinstance(freqs, list):
 *         freqs = np.array(freqs, dtype=np.double)
 *     if isinstance(phases, list):             # <<<<<<<<<<<<<<
 *         phases = np.array(phases, dtype=np.double)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_phases); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":2044
 *         freqs = np.array(freqs, dtype=np.double)
 *     if isinstance(phases, list):
 *         phases = np.array(phases, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(freqs)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_phases);
    __Pyx_GIVEREF(__pyx_v_phases);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_phases)) __PYX_ERR(0, 2044, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_phases, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":2043
 *     if isinstance(freqs, list):
 *         freqs = np.array(freqs, dtype=np.double)
 *     if isinstance(phases, list):             # <<<<<<<<<<<<<<
 *         phases = np.array(phases, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2046
 *         phases = np.array(phases, dtype=np.double)
 * 
 *     check_ndim(freqs)             # <<<<<<<<<<<<<<
 *     check_ndim(phases)
 *     compare_shapes(freqs, phases)
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_freqs, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2047
 * 
 *     check_ndim(freqs)
 *     check_ndim(phases)             # <<<<<<<<<<<<<<
 *     compare_shapes(freqs, phases)
 * 
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_phases, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2048
 *     check_ndim(freqs)
 *     check_ndim(phases)
 *     compare_shapes(freqs, phases)             # <<<<<<<<<<<<<<
 * 
 *     freqs_view = freqs
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_compare_shapes(__pyx_v_freqs, __pyx_v_phases, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2050
 *     compare_shapes(freqs, phases)
 * 
 *     freqs_view = freqs             # <<<<<<<<<<<<<<
 *     phases_view = phases
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(__pyx_v_freqs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2050, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_freqs_view, 1);
  __pyx_v_freqs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":2051
 * 
 *     freqs_view = freqs
 *     phases_view = phases             # <<<<<<<<<<<<<<
 * 
 *     if amps is not None:
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(__pyx_v_phases, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_phases_view, 1);
  __pyx_v_phases_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":2053
 *     phases_view = phases
 * 
 *     if amps is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(amps, list):
 *             amps = np.array(amps, dtype=np.double)
 */
  __pyx_t_2 = (__pyx_v_amps != Py_None);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":2054
 * 
 *     if amps is not None:
 *         if isinstance(amps, list):             # <<<<<<<<<<<<<<
 *             amps = np.array(amps, dtype=np.double)
 *         check_ndim(amps)
 */
    __pyx_t_2 = PyList_Check(__pyx_v_amps); 
    if (__pyx_t_2) {

      /* "pysndlib/clm.pyx":2055
 *     if amps is not None:
 *         if isinstance(amps, list):
 *             amps = np.array(amps, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(amps)
 *         amps_view = amps
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_amps);
      __Pyx_GIVEREF(__pyx_v_amps);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_amps)) __PYX_ERR(0, 2055, __pyx_L1_error);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_amps, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pysndlib/clm.pyx":2054
 * 
 *     if amps is not None:
 *         if isinstance(amps, list):             # <<<<<<<<<<<<<<
 *             amps = np.array(amps, dtype=np.double)
 *         check_ndim(amps)
 */
    }

    /* "pysndlib/clm.pyx":2056
 *         if isinstance(amps, list):
 *             amps = np.array(amps, dtype=np.double)
 *         check_ndim(amps)             # <<<<<<<<<<<<<<
 *         amps_view = amps
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], &amps_view[0], stable))
 */
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_amps, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":2057
 *             amps = np.array(amps, dtype=np.double)
 *         check_ndim(amps)
 *         amps_view = amps             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], &amps_view[0], stable))
 *     else:
 */
    __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(__pyx_v_amps, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 2057, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_amps_view, 1);
    __pyx_v_amps_view = __pyx_t_1;
    __pyx_t_1.memview = NULL;
    __pyx_t_1.data = NULL;

    /* "pysndlib/clm.pyx":2058
 *         check_ndim(amps)
 *         amps_view = amps
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], &amps_view[0], stable))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], NULL, stable))
 */
    __pyx_t_8 = PyObject_Length(__pyx_v_freqs); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2058, __pyx_L1_error)
    __pyx_t_9 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_v_freqs_view.shape[0];
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_v_freqs_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 2058, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_phases_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_phases_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 2058, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_v_amps_view.shape[0];
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_v_amps_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 2058, __pyx_L1_error)
    }
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_oscil_bank(__pyx_t_8, (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_freqs_view.data + __pyx_t_9 * __pyx_v_freqs_view.strides[0]) )))), (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_phases_view.data + __pyx_t_11 * __pyx_v_phases_view.strides[0]) )))), (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_amps_view.data + __pyx_t_12 * __pyx_v_amps_view.strides[0]) )))), __pyx_v_stable), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":2053
 *     phases_view = phases
 * 
 *     if amps is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(amps, list):
 *             amps = np.array(amps, dtype=np.double)
 */
    goto __pyx_L5;
  }

  /* "pysndlib/clm.pyx":2060
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], &amps_view[0], stable))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], NULL, stable))             # <<<<<<<<<<<<<<
 * 
 *     gen.cache_extend([freqs, phases, amps])
 */
  /*else*/ {
    __pyx_t_8 = PyObject_Length(__pyx_v_freqs); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2060, __pyx_L1_error)
    __pyx_t_12 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_v_freqs_view.shape[0];
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_v_freqs_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 2060, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_phases_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_phases_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 2060, __pyx_L1_error)
    }
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_oscil_bank(__pyx_t_8, (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_freqs_view.data + __pyx_t_12 * __pyx_v_freqs_view.strides[0]) )))), (&(*((mus_float_t *) ( /* dim=0 */ (__pyx_v_phases_view.data + __pyx_t_11 * __pyx_v_phases_view.strides[0]) )))), NULL, __pyx_v_stable), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "pysndlib/clm.pyx":2062
 *         gen = mus_any.from_ptr(cclm.mus_make_oscil_bank(len(freqs), &freqs_view[0], &phases_view[0], NULL, stable))
 * 
 *     gen.cache_extend([freqs, phases, amps])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_freqs);
  __Pyx_GIVEREF(__pyx_v_freqs);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_freqs)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_phases);
  __Pyx_GIVEREF(__pyx_v_phases);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_phases)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_amps);
  __Pyx_GIVEREF(__pyx_v_amps);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_v_amps)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __pyx_t_7 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_4, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":2063
 * 
 *     gen.cache_extend([freqs, phases, amps])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double oscil_bank(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2026
 * # ---------------- oscil-bank ---------------- #
 * 
 * cpdef mus_any make_oscil_bank(freqs, phases, amps=None, bint stable=False):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil_bank generator. (freqs in radians)
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_freqs_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_phases_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_amps_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_freqs);
  __Pyx_XDECREF(__pyx_v_phases);
  __Pyx_XDECREF(__pyx_v_amps);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_149make_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_148make_oscil_bank, "\n    return a new oscil_bank generator. (freqs in radians)\n    \n    :param freqs: list or np.ndarray of frequencies in radians\n    :param phases: list or np.ndarray of initial phases in radians\n    :param stable:  if it is true, oscil_bank can assume that the frequency. this is not operative\n    :return: oscil_bank gen\n    :rtype: mus_any\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_149make_oscil_bank = {"make_oscil_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_149make_oscil_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_148make_oscil_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_149make_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_freqs = 0;
  PyObject *__pyx_v_phases = 0;
  PyObject *__pyx_v_amps = 0;
  int __pyx_v_stable;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_oscil_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_freqs,&__pyx_n_s_phases,&__pyx_n_s_amps,&__pyx_n_s_stable,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_freqs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phases)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_oscil_bank", 0, 2, 4, 1); __PYX_ERR(0, 2026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amps);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stable);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_oscil_bank") < 0)) __PYX_ERR(0, 2026, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_freqs = values[0];
    __pyx_v_phases = values[1];
    __pyx_v_amps = values[2];
    if (values[3]) {
      __pyx_v_stable = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_stable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L3_error)
    } else {
      __pyx_v_stable = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_oscil_bank", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2026, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_148make_oscil_bank(__pyx_self, __pyx_v_freqs, __pyx_v_phases, __pyx_v_amps, __pyx_v_stable);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_148make_oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_freqs, PyObject *__pyx_v_phases, PyObject *__pyx_v_amps, int __pyx_v_stable) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_oscil_bank __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_oscil_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amps = __pyx_v_amps;
  __pyx_t_2.stable = __pyx_v_stable;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_oscil_bank(__pyx_v_freqs, __pyx_v_phases, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2065
 *     return gen
 * 
 * cpdef cython.double oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of oscils
 */

static PyObject *__pyx_pw_8pysndlib_3clm_151oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_oscil_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2072
 *     :rtype: float
 *     """
 *     return cclm.mus_oscil_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_oscil_bank(mus_any gen):
 */
  __pyx_r = mus_oscil_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2065
 *     return gen
 * 
 * cpdef cython.double oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of oscils
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_151oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_150oscil_bank, "\n    sum an array of oscils\n    \n    :param gen: oscil_bank gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_151oscil_bank = {"oscil_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_151oscil_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_150oscil_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_151oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("oscil_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "oscil_bank") < 0)) __PYX_ERR(0, 2065, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("oscil_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2065, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2065, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_150oscil_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_150oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("oscil_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_oscil_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2074
 *     return cclm.mus_oscil_bank(gen._ptr)
 * 
 * cpdef bint is_oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil_bank
 */

static PyObject *__pyx_pw_8pysndlib_3clm_153is_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_oscil_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2081
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_oscil_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_oscil_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2074
 *     return cclm.mus_oscil_bank(gen._ptr)
 * 
 * cpdef bint is_oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil_bank
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_153is_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_152is_oscil_bank, "\n    returns True if gen is an oscil_bank\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_153is_oscil_bank = {"is_oscil_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_153is_oscil_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_152is_oscil_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_153is_oscil_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_oscil_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_oscil_bank") < 0)) __PYX_ERR(0, 2074, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_oscil_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2074, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2074, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_152is_oscil_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_152is_oscil_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_oscil_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_oscil_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_oscil_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2087
 * 
 * # ---------------- env ---------------- #
 * cpdef mus_any make_env(envelope, cython.double duration=1.0, cython.double scaler=1.0, cython.double offset=0.0, cython.double base=1.0, cython.int length=0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the
 */

static PyObject *__pyx_pw_8pysndlib_3clm_155make_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_env(PyObject *__pyx_v_envelope, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_env *__pyx_optional_args) {
  double __pyx_v_duration = ((double)1.0);
  double __pyx_v_scaler = ((double)1.0);
  double __pyx_v_offset = ((double)0.0);
  double __pyx_v_base = ((double)1.0);
  int __pyx_v_length = ((int)0);
  __Pyx_memviewslice __pyx_v_envelope_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_t_6;
  double __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_env", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_duration = __pyx_optional_args->duration;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_scaler = __pyx_optional_args->scaler;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_offset = __pyx_optional_args->offset;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_base = __pyx_optional_args->base;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_length = __pyx_optional_args->length;
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_envelope);

  /* "pysndlib/clm.pyx":2105
 *     """
 * #     print(envelope)
 *     validate_envelope(envelope)             # <<<<<<<<<<<<<<
 *     check_range('duration', duration, 0.0, None)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_validate_envelope); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_envelope};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2106
 * #     print(envelope)
 *     validate_envelope(envelope)
 *     check_range('duration', duration, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     if length > 0:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_duration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_duration_2, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":2108
 *     check_range('duration', duration, 0.0, None)
 * 
 *     if length > 0:             # <<<<<<<<<<<<<<
 *         duration = samples2seconds(length)
 * 
 */
  __pyx_t_6 = (__pyx_v_length > 0);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":2109
 * 
 *     if length > 0:
 *         duration = samples2seconds(length)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(envelope, list):
 */
    __pyx_t_7 = __pyx_f_8pysndlib_3clm_samples2seconds(__pyx_v_length, 0); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L1_error)
    __pyx_v_duration = __pyx_t_7;

    /* "pysndlib/clm.pyx":2108
 *     check_range('duration', duration, 0.0, None)
 * 
 *     if length > 0:             # <<<<<<<<<<<<<<
 *         duration = samples2seconds(length)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2111
 *         duration = samples2seconds(length)
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 */
  __pyx_t_6 = PyList_Check(__pyx_v_envelope); 
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":2112
 * 
 *     if isinstance(envelope, list):
 *         envelope = np.array(envelope, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(envelope)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_envelope);
    __Pyx_GIVEREF(__pyx_v_envelope);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_envelope)) __PYX_ERR(0, 2112, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_envelope, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":2111
 *         duration = samples2seconds(length)
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2114
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 *     check_ndim(envelope)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] envelope_view = envelope
 */
  __pyx_t_9 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_envelope, 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2116
 *     check_ndim(envelope)
 * 
 *     cdef double [:] envelope_view = envelope             # <<<<<<<<<<<<<<
 *     gen =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, scaler, offset, base, duration, 0, NULL),owner=True, length=len(envelope))
 *     #sprint(gen)
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_envelope, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 2116, __pyx_L1_error)
  __pyx_v_envelope_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":2117
 * 
 *     cdef double [:] envelope_view = envelope
 *     gen =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, scaler, offset, base, duration, 0, NULL),owner=True, length=len(envelope))             # <<<<<<<<<<<<<<
 *     #sprint(gen)
 *     gen.cache_append(envelope)
 */
  __pyx_t_11 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_envelope_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_envelope_view.shape[0])) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 2117, __pyx_L1_error)
  }
  __pyx_t_12 = PyObject_Length(__pyx_v_envelope); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2117, __pyx_L1_error)
  __pyx_t_13 = PyObject_Length(__pyx_v_envelope); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2117, __pyx_L1_error)
  __pyx_t_14.__pyx_n = 2;
  __pyx_t_14.owner = 1;
  __pyx_t_14.length = __pyx_t_13;
  __pyx_t_9 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_env((&(*((double *) ( /* dim=0 */ (__pyx_v_envelope_view.data + __pyx_t_11 * __pyx_v_envelope_view.strides[0]) )))), __Pyx_div_Py_ssize_t(__pyx_t_12, 2), __pyx_v_scaler, __pyx_v_offset, __pyx_v_base, __pyx_v_duration, 0, NULL), &__pyx_t_14)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2119
 *     gen =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, scaler, offset, base, duration, 0, NULL),owner=True, length=len(envelope))
 *     #sprint(gen)
 *     gen.cache_append(envelope)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_9 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_envelope, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2120
 *     #sprint(gen)
 *     gen.cache_append(envelope)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double env(mus_any gen ):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2087
 * 
 * # ---------------- env ---------------- #
 * cpdef mus_any make_env(envelope, cython.double duration=1.0, cython.double scaler=1.0, cython.double offset=0.0, cython.double base=1.0, cython.int length=0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_envelope_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_envelope);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_155make_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_154make_env, "\n    return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the\n    envelope, these points are offset by 'offset', scaled by 'scaler', and mapped over the time interval\n    defined by either 'duration' (seconds) or 'length' (samples).  if 'base' is 1.0, the connecting segments\n    are linear, if 0.0 you get a step function, and anything else produces an exponential connecting segment.\n    \n    :param envelope: list or np.ndarry of breakpoint pairs\n    :param scaler: scaler on every y value (before offset is added)\n    :param duration: duration \\in seconds\n    :param offset: value added to every y value\n    :param base: type of connecting line between break-points\n    :param length:  duration \\in samples\n    :result: env gen\n    :rtype: mus_any\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_155make_env = {"make_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_155make_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_154make_env};
static PyObject *__pyx_pw_8pysndlib_3clm_155make_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_envelope = 0;
  double __pyx_v_duration;
  double __pyx_v_scaler;
  double __pyx_v_offset;
  double __pyx_v_base;
  int __pyx_v_length;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_envelope,&__pyx_n_s_duration_2,&__pyx_n_s_scaler,&__pyx_n_s_offset,&__pyx_n_s_base,&__pyx_n_s_length,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_envelope)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_duration_2);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scaler);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_offset);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_base);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_env") < 0)) __PYX_ERR(0, 2087, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_envelope = values[0];
    if (values[1]) {
      __pyx_v_duration = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_duration == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    } else {
      __pyx_v_duration = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_scaler = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_scaler == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    } else {
      __pyx_v_scaler = ((double)1.0);
    }
    if (values[3]) {
      __pyx_v_offset = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_offset == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    } else {
      __pyx_v_offset = ((double)0.0);
    }
    if (values[4]) {
      __pyx_v_base = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_base == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    } else {
      __pyx_v_base = ((double)1.0);
    }
    if (values[5]) {
      __pyx_v_length = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    } else {
      __pyx_v_length = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_env", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 2087, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_154make_env(__pyx_self, __pyx_v_envelope, __pyx_v_duration, __pyx_v_scaler, __pyx_v_offset, __pyx_v_base, __pyx_v_length);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_154make_env(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_envelope, double __pyx_v_duration, double __pyx_v_scaler, double __pyx_v_offset, double __pyx_v_base, int __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_env __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.duration = __pyx_v_duration;
  __pyx_t_2.scaler = __pyx_v_scaler;
  __pyx_t_2.offset = __pyx_v_offset;
  __pyx_t_2.base = __pyx_v_base;
  __pyx_t_2.length = __pyx_v_length;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_env(__pyx_v_envelope, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2122
 *     return gen
 * 
 * cpdef cython.double env(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_157env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_env(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2129
 *     :rtype: float
 *     """
 *     return cclm.mus_env(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_env(mus_any gen):
 */
  __pyx_r = mus_env(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2122
 *     return gen
 * 
 * cpdef cython.double env(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_157env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_156env, "\n    next sample from envelope generator.\n    \n    :param gen: env gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_157env = {"env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_157env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_156env};
static PyObject *__pyx_pw_8pysndlib_3clm_157env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "env") < 0)) __PYX_ERR(0, 2122, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("env", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2122, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2122, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_156env(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_156env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_env(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2131
 *     return cclm.mus_env(gen._ptr)
 * 
 * cpdef bint is_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an env.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_159is_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_env(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2138
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_env(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double env_interp(cython.double x , mus_any env):
 */
  __pyx_r = mus_is_env(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2131
 *     return cclm.mus_env(gen._ptr)
 * 
 * cpdef bint is_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an env.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_159is_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_158is_env, "\n    returns True if gen is an env.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_159is_env = {"is_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_159is_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_158is_env};
static PyObject *__pyx_pw_8pysndlib_3clm_159is_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_env") < 0)) __PYX_ERR(0, 2131, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_env", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2131, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2131, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_158is_env(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_158is_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_env(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2140
 *     return cclm.mus_is_env(gen._ptr)
 * 
 * cpdef cython.double env_interp(cython.double x , mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_161env_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_env_interp(double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2148
 *     :rtype: float
 *     """
 *     return cclm.mus_env_interp(x, env._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double envelope_interp(cython.double x ,  mus_any env):
 */
  __pyx_r = mus_env_interp(__pyx_v_x, __pyx_v_env->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2140
 *     return cclm.mus_is_env(gen._ptr)
 * 
 * cpdef cython.double env_interp(cython.double x , mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_161env_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_160env_interp, "\n    value of envelope env at x.\n    \n    :param x: location \\in envelope\n    :param env: env gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_161env_interp = {"env_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_161env_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_160env_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_161env_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("env_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_env,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_env)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("env_interp", 1, 2, 2, 1); __PYX_ERR(0, 2140, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "env_interp") < 0)) __PYX_ERR(0, 2140, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L3_error)
    __pyx_v_env = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("env_interp", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2140, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.env_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_env), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "env", 0))) __PYX_ERR(0, 2140, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_160env_interp(__pyx_self, __pyx_v_x, __pyx_v_env);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_160env_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_env_interp(__pyx_v_x, __pyx_v_env, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.env_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2150
 *     return cclm.mus_env_interp(x, env._ptr)
 * 
 * cpdef cython.double envelope_interp(cython.double x ,  mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_163envelope_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_envelope_interp(double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2158
 *     :rtype: float
 *     """
 *     return cclm.mus_env_interp(x, env._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_env_interp(__pyx_v_x, __pyx_v_env->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2150
 *     return cclm.mus_env_interp(x, env._ptr)
 * 
 * cpdef cython.double envelope_interp(cython.double x ,  mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_163envelope_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_162envelope_interp, "\n    value of envelope env at x.\n    \n    :param x: location \\in envelope\n    :param env: env gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_163envelope_interp = {"envelope_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_163envelope_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_162envelope_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_163envelope_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("envelope_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_env,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_env)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("envelope_interp", 1, 2, 2, 1); __PYX_ERR(0, 2150, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "envelope_interp") < 0)) __PYX_ERR(0, 2150, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L3_error)
    __pyx_v_env = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("envelope_interp", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2150, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.envelope_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_env), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "env", 0))) __PYX_ERR(0, 2150, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_162envelope_interp(__pyx_self, __pyx_v_x, __pyx_v_env);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_162envelope_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_env) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("envelope_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_envelope_interp(__pyx_v_x, __pyx_v_env, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.envelope_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2162
 * 
 * # #mus_env_rates
 * cpdef np.ndarray env_rates(gen: mus_any):             # <<<<<<<<<<<<<<
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_165env_rates(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_env_rates(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_array_obj *__pyx_v_arr = 0;
  mus_long_t __pyx_v_size;
  mus_float_t *__pyx_v_rates_ptr;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env_rates", 1);

  /* "pysndlib/clm.pyx":2163
 * # #mus_env_rates
 * cpdef np.ndarray env_rates(gen: mus_any):
 *     cdef view.array arr = None             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 *     cdef cclm.mus_float_t* rates_ptr = cclm.mus_env_rates(gen._ptr)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_arr = ((struct __pyx_array_obj *)Py_None);

  /* "pysndlib/clm.pyx":2164
 * cpdef np.ndarray env_rates(gen: mus_any):
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)             # <<<<<<<<<<<<<<
 *     cdef cclm.mus_float_t* rates_ptr = cclm.mus_env_rates(gen._ptr)
 *     arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 */
  __pyx_v_size = mus_length(__pyx_v_gen->_ptr);

  /* "pysndlib/clm.pyx":2165
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 *     cdef cclm.mus_float_t* rates_ptr = cclm.mus_env_rates(gen._ptr)             # <<<<<<<<<<<<<<
 *     arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *     arr.data = <char*>rates_ptr
 */
  __pyx_v_rates_ptr = mus_env_rates(__pyx_v_gen->_ptr);

  /* "pysndlib/clm.pyx":2166
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 *     cdef cclm.mus_float_t* rates_ptr = cclm.mus_env_rates(gen._ptr)
 *     arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)             # <<<<<<<<<<<<<<
 *     arr.data = <char*>rates_ptr
 *     return np.asarray(arr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_itemsize, __pyx_t_3) < 0) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_format, __pyx_n_u_d) < 0) __PYX_ERR(0, 2166, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 2166, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_arr, ((struct __pyx_array_obj *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2167
 *     cdef cclm.mus_float_t* rates_ptr = cclm.mus_env_rates(gen._ptr)
 *     arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *     arr.data = <char*>rates_ptr             # <<<<<<<<<<<<<<
 *     return np.asarray(arr)
 * #
 */
  __pyx_v_arr->data = ((char *)__pyx_v_rates_ptr);

  /* "pysndlib/clm.pyx":2168
 *     arr = view.array(shape=(size,),itemsize=sizeof(double), format='d', allocate_buffer=False)
 *     arr.data = <char*>rates_ptr
 *     return np.asarray(arr)             # <<<<<<<<<<<<<<
 * #
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2168, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2162
 * 
 * # #mus_env_rates
 * cpdef np.ndarray env_rates(gen: mus_any):             # <<<<<<<<<<<<<<
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.env_rates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_165env_rates(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_165env_rates = {"env_rates", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_165env_rates, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_165env_rates(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("env_rates (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "env_rates") < 0)) __PYX_ERR(0, 2162, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("env_rates", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2162, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.env_rates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 0, "gen", 0))) __PYX_ERR(0, 2162, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_164env_rates(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_164env_rates(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env_rates", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_env_rates(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.env_rates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2174
 * # this is slow because of needing ctypes to define function at runtime
 * # but no other way to do it with cython without changing sndlib code
 * cpdef cython.double env_any(mus_any gen, connection_function):             # <<<<<<<<<<<<<<
 *     """
 *     generate env output using conncection_func to 'connect the dots'.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_167env_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_env_any(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_connection_function, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_f = NULL;
  connect_points_cb __pyx_v_cy_f_ptr;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env_any", 1);

  /* "pysndlib/clm.pyx":2184
 *     """
 * 
 *     f = _envfunction(connection_function)             # <<<<<<<<<<<<<<
 *     cdef cclm.connect_points_cb cy_f_ptr = (<cclm.connect_points_cb*><size_t>ctypes.addressof(f))[0]
 *     return cclm.mus_env_any(gen._ptr, cy_f_ptr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_envfunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_connection_function};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2185
 * 
 *     f = _envfunction(connection_function)
 *     cdef cclm.connect_points_cb cy_f_ptr = (<cclm.connect_points_cb*><size_t>ctypes.addressof(f))[0]             # <<<<<<<<<<<<<<
 *     return cclm.mus_env_any(gen._ptr, cy_f_ptr)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_addressof); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_f};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cy_f_ptr = (((connect_points_cb *)((size_t)__pyx_t_5))[0]);

  /* "pysndlib/clm.pyx":2186
 *     f = _envfunction(connection_function)
 *     cdef cclm.connect_points_cb cy_f_ptr = (<cclm.connect_points_cb*><size_t>ctypes.addressof(f))[0]
 *     return cclm.mus_env_any(gen._ptr, cy_f_ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_env_any(__pyx_v_gen->_ptr, __pyx_v_cy_f_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2174
 * # this is slow because of needing ctypes to define function at runtime
 * # but no other way to do it with cython without changing sndlib code
 * cpdef cython.double env_any(mus_any gen, connection_function):             # <<<<<<<<<<<<<<
 *     """
 *     generate env output using conncection_func to 'connect the dots'.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.env_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_167env_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_166env_any, "\n    generate env output using conncection_func to 'connect the dots'.\n    \n    the env-any connecting function takes one argument, the current envelope value treated as going between 0.0 and 1.0 between each two points. \n    :param env: env gen\n    :param connection_function: function used to connect points\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_167env_any = {"env_any", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_167env_any, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_166env_any};
static PyObject *__pyx_pw_8pysndlib_3clm_167env_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  PyObject *__pyx_v_connection_function = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("env_any (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_connection_function,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connection_function)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("env_any", 1, 2, 2, 1); __PYX_ERR(0, 2174, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "env_any") < 0)) __PYX_ERR(0, 2174, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_connection_function = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("env_any", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2174, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.env_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2174, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_166env_any(__pyx_self, __pyx_v_gen, __pyx_v_connection_function);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_166env_any(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_connection_function) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("env_any", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_env_any(__pyx_v_gen, __pyx_v_connection_function, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.env_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2190
 * 
 * # ---------------- pulsed-env ---------------- #
 * cpdef mus_any make_pulsed_env(envelope, cython.double duration , cython.double frequency ):             # <<<<<<<<<<<<<<
 *     """
 *     produces a repeating envelope. env sticks at its last value, but pulsed-env repeats it over and over.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_169make_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_pulsed_env(PyObject *__pyx_v_envelope, double __pyx_v_duration, double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_pl = NULL;
  __Pyx_memviewslice __pyx_v_envelope_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_ge = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_pulsed_env", 0);
  __Pyx_INCREF(__pyx_v_envelope);

  /* "pysndlib/clm.pyx":2201
 *     """
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_envelope); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":2202
 * 
 *     if isinstance(envelope, list):
 *         envelope = np.array(envelope, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     pl = mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, 1.0, 0.0))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_envelope);
    __Pyx_GIVEREF(__pyx_v_envelope);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_envelope)) __PYX_ERR(0, 2202, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_envelope, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":2201
 *     """
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2204
 *         envelope = np.array(envelope, dtype=np.double)
 * 
 *     pl = mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, 1.0, 0.0))             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(envelope)
 */
  __pyx_t_6 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_pulse_train(__pyx_v_frequency, 1.0, 0.0), NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_pl = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2206
 *     pl = mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, 1.0, 0.0))
 * 
 *     check_ndim(envelope)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] envelope_view = envelope
 */
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_envelope, 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2208
 *     check_ndim(envelope)
 * 
 *     cdef double [:] envelope_view = envelope             # <<<<<<<<<<<<<<
 * 
 *     ge =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, 1.0, 0, 1.0, duration, 0, NULL))
 */
  __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_envelope, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __pyx_v_envelope_view = __pyx_t_7;
  __pyx_t_7.memview = NULL;
  __pyx_t_7.data = NULL;

  /* "pysndlib/clm.pyx":2210
 *     cdef double [:] envelope_view = envelope
 * 
 *     ge =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, 1.0, 0, 1.0, duration, 0, NULL))             # <<<<<<<<<<<<<<
 *     gen = mus_any.from_ptr(cclm.mus_make_pulsed_env(ge._ptr, pl._ptr))
 *     gen.cache_extend([pl, ge, envelope])
 */
  __pyx_t_8 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_envelope_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_envelope_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 2210, __pyx_L1_error)
  }
  __pyx_t_10 = PyObject_Length(__pyx_v_envelope); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2210, __pyx_L1_error)
  __pyx_t_6 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_env((&(*((double *) ( /* dim=0 */ (__pyx_v_envelope_view.data + __pyx_t_8 * __pyx_v_envelope_view.strides[0]) )))), __Pyx_div_Py_ssize_t(__pyx_t_10, 2), 1.0, 0.0, 1.0, __pyx_v_duration, 0, NULL), NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_ge = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2211
 * 
 *     ge =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, 1.0, 0, 1.0, duration, 0, NULL))
 *     gen = mus_any.from_ptr(cclm.mus_make_pulsed_env(ge._ptr, pl._ptr))             # <<<<<<<<<<<<<<
 *     gen.cache_extend([pl, ge, envelope])
 *     return gen
 */
  __pyx_t_6 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_pulsed_env(__pyx_v_ge->_ptr, __pyx_v_pl->_ptr), NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":2212
 *     ge =  mus_any.from_ptr(cclm.mus_make_env(&envelope_view[0], len(envelope) // 2, 1.0, 0, 1.0, duration, 0, NULL))
 *     gen = mus_any.from_ptr(cclm.mus_make_pulsed_env(ge._ptr, pl._ptr))
 *     gen.cache_extend([pl, ge, envelope])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF((PyObject *)__pyx_v_pl);
  __Pyx_GIVEREF((PyObject *)__pyx_v_pl);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_pl))) __PYX_ERR(0, 2212, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_ge);
  __Pyx_GIVEREF((PyObject *)__pyx_v_ge);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_ge))) __PYX_ERR(0, 2212, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_envelope);
  __Pyx_GIVEREF(__pyx_v_envelope);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_v_envelope)) __PYX_ERR(0, 2212, __pyx_L1_error);
  __pyx_t_4 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2213
 *     gen = mus_any.from_ptr(cclm.mus_make_pulsed_env(ge._ptr, pl._ptr))
 *     gen.cache_extend([pl, ge, envelope])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2190
 * 
 * # ---------------- pulsed-env ---------------- #
 * cpdef mus_any make_pulsed_env(envelope, cython.double duration , cython.double frequency ):             # <<<<<<<<<<<<<<
 *     """
 *     produces a repeating envelope. env sticks at its last value, but pulsed-env repeats it over and over.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pl);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_envelope_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_ge);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_envelope);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_169make_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_168make_pulsed_env, "\n    produces a repeating envelope. env sticks at its last value, but pulsed-env repeats it over and over. \n    \n    :param env: env gen\n    :param duration: duration of envelope\n    :param frequency: repetition rate \\in hz\n    :return: env output\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_169make_pulsed_env = {"make_pulsed_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_169make_pulsed_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_168make_pulsed_env};
static PyObject *__pyx_pw_8pysndlib_3clm_169make_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_envelope = 0;
  double __pyx_v_duration;
  double __pyx_v_frequency;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_pulsed_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_envelope,&__pyx_n_s_duration_2,&__pyx_n_s_frequency,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_envelope)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_duration_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_pulsed_env", 1, 3, 3, 1); __PYX_ERR(0, 2190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_pulsed_env", 1, 3, 3, 2); __PYX_ERR(0, 2190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_pulsed_env") < 0)) __PYX_ERR(0, 2190, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_envelope = values[0];
    __pyx_v_duration = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_duration == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error)
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_pulsed_env", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2190, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_168make_pulsed_env(__pyx_self, __pyx_v_envelope, __pyx_v_duration, __pyx_v_frequency);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_168make_pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_envelope, double __pyx_v_duration, double __pyx_v_frequency) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_pulsed_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_pulsed_env(__pyx_v_envelope, __pyx_v_duration, __pyx_v_frequency, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2215
 *     return gen
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_171pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulsed_env(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulsed_env *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2223
 *     :rtype: float
 *     """
 *     return cclm.mus_pulsed_env(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen):
 */
  __pyx_r = mus_pulsed_env(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2215
 *     return gen
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_171pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_170pulsed_env, "\n    next sample from envelope generator.\n    \n    :param gen: env gen\n    :param fm: change frequency of repetition\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_171pulsed_env = {"pulsed_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_171pulsed_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_170pulsed_env};
static PyObject *__pyx_pw_8pysndlib_3clm_171pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pulsed_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2215, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2215, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pulsed_env") < 0)) __PYX_ERR(0, 2215, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2215, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pulsed_env", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2215, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2215, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_170pulsed_env(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_170pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_pulsed_env __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pulsed_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_pulsed_env(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2215, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2225
 *     return cclm.mus_pulsed_env(gen._ptr, fm)
 * 
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator. no modulations
 */

static PyObject *__pyx_pw_8pysndlib_3clm_173pulsed_env_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulsed_env_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2232
 *     :rtype: float
 *     """
 *     return cclm.mus_pulsed_env_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_pulsed_env(mus_any gen):
 */
  __pyx_r = mus_pulsed_env_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2225
 *     return cclm.mus_pulsed_env(gen._ptr, fm)
 * 
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator. no modulations
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_173pulsed_env_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_172pulsed_env_unmodulated, "\n    next sample from envelope generator. no modulations\n    \n    :param gen: env gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_173pulsed_env_unmodulated = {"pulsed_env_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_173pulsed_env_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_172pulsed_env_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_173pulsed_env_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pulsed_env_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2225, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pulsed_env_unmodulated") < 0)) __PYX_ERR(0, 2225, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pulsed_env_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2225, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.pulsed_env_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2225, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_172pulsed_env_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_172pulsed_env_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pulsed_env_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_pulsed_env_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2225, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.pulsed_env_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2234
 *     return cclm.mus_pulsed_env_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulsed_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulsed_env.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_175is_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_pulsed_env(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2241
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_pulsed_env(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # todo envelope-interp different than env-interp
 */
  __pyx_r = mus_is_pulsed_env(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2234
 *     return cclm.mus_pulsed_env_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulsed_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulsed_env.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_175is_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_174is_pulsed_env, "\n    returns True if gen is a pulsed_env.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_175is_pulsed_env = {"is_pulsed_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_175is_pulsed_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_174is_pulsed_env};
static PyObject *__pyx_pw_8pysndlib_3clm_175is_pulsed_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_pulsed_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2234, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_pulsed_env") < 0)) __PYX_ERR(0, 2234, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_pulsed_env", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2234, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2234, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_174is_pulsed_env(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_174is_pulsed_env(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_pulsed_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_pulsed_env(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2234, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_pulsed_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2246
 * 
 * # ---------------- table-lookup ---------------- #
 * cpdef mus_any make_table_lookup(cython.double frequency=0.0, cython.double initial_phase=0.0, wave= None, size=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator. the default table size is 512; use size to set some other
 */

static PyObject *__pyx_pw_8pysndlib_3clm_177make_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_table_lookup(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup *__pyx_optional_args) {
  double __pyx_v_frequency = ((double)0.0);
  double __pyx_v_initial_phase = ((double)0.0);
  PyObject *__pyx_v_wave = ((PyObject *)Py_None);
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__32;
  __Pyx_memviewslice __pyx_v_wave_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_11;
  mus_long_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_table_lookup", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frequency = __pyx_optional_args->frequency;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_phase = __pyx_optional_args->initial_phase;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_wave = __pyx_optional_args->wave;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_size = __pyx_optional_args->size;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_interp_type = __pyx_optional_args->interp_type;
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_wave);
  __Pyx_INCREF(__pyx_v_size);

  /* "pysndlib/clm.pyx":2259
 *     :rtype: mus_any
 *     """
 *     size = size or default.table_size             # <<<<<<<<<<<<<<
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2259, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_size);
    __pyx_t_1 = __pyx_v_size;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_table_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2261
 *     size = size or default.table_size
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     if wave is None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2261, __pyx_L1_error)
  __pyx_t_4 = PyFloat_FromDouble((__pyx_t_5 / 2.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6.__pyx_n = 2;
  __pyx_t_6.low = __pyx_float_0_0;
  __pyx_t_6.high = __pyx_t_4;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2263
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     if wave is None:             # <<<<<<<<<<<<<<
 *         wave = np.zeros(size)
 * 
 */
  __pyx_t_2 = (__pyx_v_wave == Py_None);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":2264
 * 
 *     if wave is None:
 *         wave = np.zeros(size)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(wave, list):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_size};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_wave, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":2263
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     if wave is None:             # <<<<<<<<<<<<<<
 *         wave = np.zeros(size)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2266
 *         wave = np.zeros(size)
 * 
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave, dtype=np.double)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_wave); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":2267
 * 
 *     if isinstance(wave, list):
 *         wave = np.array(wave, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(wave)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_wave);
    __Pyx_GIVEREF(__pyx_v_wave);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_wave)) __PYX_ERR(0, 2267, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_wave, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":2266
 *         wave = np.zeros(size)
 * 
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2269
 *         wave = np.array(wave, dtype=np.double)
 * 
 *     check_ndim(wave)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] wave_view = wave
 */
  __pyx_t_9 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_wave, 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2271
 *     check_ndim(wave)
 * 
 *     cdef double [:] wave_view = wave             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_wave, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __pyx_v_wave_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":2275
 * 
 *     #print(frequency, initial_phase, wave, size, interp_type)
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, initial_phase, &wave_view[0], size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     gen.cache_append(wave)
 *     return gen
 */
  __pyx_t_11 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_wave_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_wave_view.shape[0])) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    __PYX_ERR(0, 2275, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_12 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2275, __pyx_L1_error)
  __pyx_t_9 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_table_lookup(__pyx_v_frequency, __pyx_v_initial_phase, (&(*((double *) ( /* dim=0 */ (__pyx_v_wave_view.data + __pyx_t_11 * __pyx_v_wave_view.strides[0]) )))), __pyx_t_12, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2276
 *     #print(frequency, initial_phase, wave, size, interp_type)
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, initial_phase, &wave_view[0], size, <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(wave)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_9 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_wave, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":2277
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, initial_phase, &wave_view[0], size, <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(wave)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm =0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2246
 * 
 * # ---------------- table-lookup ---------------- #
 * cpdef mus_any make_table_lookup(cython.double frequency=0.0, cython.double initial_phase=0.0, wave= None, size=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator. the default table size is 512; use size to set some other
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_wave_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_wave);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_177make_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_176make_table_lookup, "\n    return a new table_lookup generator. the default table size is 512; use size to set some other\n    size, or pass your own list/array as the 'wave'.\n    \n    :param frequency: frequency of gen \\in hz\n    :param initial_phase: initial phase of gen \\in radians\n    :param wave: np.ndarray if provided is waveform\n    :param size: if no wave provided, this will allocate a table of size \n    :param interp_type: type of interpolation used\n    :return: table_lookup gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_177make_table_lookup = {"make_table_lookup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_177make_table_lookup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_176make_table_lookup};
static PyObject *__pyx_pw_8pysndlib_3clm_177make_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_initial_phase;
  PyObject *__pyx_v_wave = 0;
  PyObject *__pyx_v_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_table_lookup (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_initial_phase,&__pyx_n_s_wave,&__pyx_n_s_size,&__pyx_n_s_interp_type,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_phase);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_wave);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_table_lookup") < 0)) __PYX_ERR(0, 2246, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
    } else {
      __pyx_v_frequency = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_initial_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_initial_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
    } else {
      __pyx_v_initial_phase = ((double)0.0);
    }
    __pyx_v_wave = values[2];
    __pyx_v_size = values[3];
    if (values[4]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[4])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__32;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_table_lookup", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 2246, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_176make_table_lookup(__pyx_self, __pyx_v_frequency, __pyx_v_initial_phase, __pyx_v_wave, __pyx_v_size, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_176make_table_lookup(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, PyObject *__pyx_v_wave, PyObject *__pyx_v_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_table_lookup", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.frequency = __pyx_v_frequency;
  __pyx_t_2.initial_phase = __pyx_v_initial_phase;
  __pyx_t_2.wave = __pyx_v_wave;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_table_lookup(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2279
 *     return gen
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_179table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_table_lookup(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_table_lookup *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2287
 *     :rtype: float
 *     """
 *     return cclm.mus_table_lookup(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double table_lookup_unmodulated(mus_any gen):
 */
  __pyx_r = mus_table_lookup(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2279
 *     return gen
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_179table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_178table_lookup, "\n    return next sample from table_lookup generator.\n    \n    :param gen: table_lookup gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_179table_lookup = {"table_lookup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_179table_lookup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_178table_lookup};
static PyObject *__pyx_pw_8pysndlib_3clm_179table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("table_lookup (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "table_lookup") < 0)) __PYX_ERR(0, 2279, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("table_lookup", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2279, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2279, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_178table_lookup(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_178table_lookup(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_table_lookup __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("table_lookup", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_table_lookup(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2289
 *     return cclm.mus_table_lookup(gen._ptr, fm)
 * 
 * cpdef cython.double table_lookup_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_181table_lookup_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_table_lookup_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2296
 *     :rtype: float
 *     """
 *     return cclm.mus_table_lookup_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_table_lookup(mus_any gen):
 */
  __pyx_r = mus_table_lookup_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2289
 *     return cclm.mus_table_lookup(gen._ptr, fm)
 * 
 * cpdef cython.double table_lookup_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_181table_lookup_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_180table_lookup_unmodulated, "\n    return next sample from table_lookup generator. unmodulated\n    \n    :param gen: table_lookup gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_181table_lookup_unmodulated = {"table_lookup_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_181table_lookup_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_180table_lookup_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_181table_lookup_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("table_lookup_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2289, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "table_lookup_unmodulated") < 0)) __PYX_ERR(0, 2289, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("table_lookup_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2289, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.table_lookup_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2289, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_180table_lookup_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_180table_lookup_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("table_lookup_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_table_lookup_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2289, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.table_lookup_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2298
 *     return cclm.mus_table_lookup_unmodulated(gen._ptr)
 * 
 * cpdef bint is_table_lookup(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a table_lookup.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_183is_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_table_lookup(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2305
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_table_lookup(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_table_lookup(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2298
 *     return cclm.mus_table_lookup_unmodulated(gen._ptr)
 * 
 * cpdef bint is_table_lookup(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a table_lookup.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_183is_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_182is_table_lookup, "\n    returns True if gen is a table_lookup.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_183is_table_lookup = {"is_table_lookup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_183is_table_lookup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_182is_table_lookup};
static PyObject *__pyx_pw_8pysndlib_3clm_183is_table_lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_table_lookup (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2298, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_table_lookup") < 0)) __PYX_ERR(0, 2298, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_table_lookup", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2298, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_182is_table_lookup(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_182is_table_lookup(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_table_lookup", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_table_lookup(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2298, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_table_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2308
 * 
 * 
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator with the envelope loaded \in with size.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_185make_table_lookup_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_table_lookup_with_env(double __pyx_v_frequency, PyObject *__pyx_v_envelope, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_v_table = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e = NULL;
  PyObject *__pyx_v_i = NULL;
  __Pyx_memviewslice __pyx_v_table_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_12;
  mus_long_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_table_lookup_with_env", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  __Pyx_INCREF(__pyx_v_size);

  /* "pysndlib/clm.pyx":2320
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     size = size or default.table_size
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2320, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2322
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     size = size or default.table_size             # <<<<<<<<<<<<<<
 *     table = np.zeros(size)
 *     e = make_env(envelope, length=size)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2322, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __Pyx_INCREF(__pyx_v_size);
    __pyx_t_4 = __pyx_v_size;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_table_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2323
 * 
 *     size = size or default.table_size
 *     table = np.zeros(size)             # <<<<<<<<<<<<<<
 *     e = make_env(envelope, length=size)
 *     for i in range(size):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_size};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2324
 *     size = size or default.table_size
 *     table = np.zeros(size)
 *     e = make_env(envelope, length=size)             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         table[i] = env(e)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_make_env); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_envelope);
  __Pyx_GIVEREF(__pyx_v_envelope);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_envelope)) __PYX_ERR(0, 2324, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_length, __pyx_v_size) < 0) __PYX_ERR(0, 2324, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 2324, __pyx_L1_error)
  __pyx_v_e = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":2325
 *     table = np.zeros(size)
 *     e = make_env(envelope, length=size)
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         table[i] = env(e)
 *     cdef double [:] table_view = table
 */
  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2325, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      }
    } else {
      __pyx_t_8 = __pyx_t_10(__pyx_t_1);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2325, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":2326
 *     e = make_env(envelope, length=size)
 *     for i in range(size):
 *         table[i] = env(e)             # <<<<<<<<<<<<<<
 *     cdef double [:] table_view = table
 * 
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_env(__pyx_v_e, 0); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2326, __pyx_L1_error)
    __pyx_t_8 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely((PyObject_SetItem(__pyx_v_table, __pyx_v_i, __pyx_t_8) < 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":2325
 *     table = np.zeros(size)
 *     e = make_env(envelope, length=size)
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         table[i] = env(e)
 *     cdef double [:] table_view = table
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2327
 *     for i in range(size):
 *         table[i] = env(e)
 *     cdef double [:] table_view = table             # <<<<<<<<<<<<<<
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, 0, &table_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 */
  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_table, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __pyx_v_table_view = __pyx_t_11;
  __pyx_t_11.memview = NULL;
  __pyx_t_11.data = NULL;

  /* "pysndlib/clm.pyx":2329
 *     cdef double [:] table_view = table
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, 0, &table_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))             # <<<<<<<<<<<<<<
 *     gen.cache_append(table)
 *     return gen
 */
  __pyx_t_12 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_table_view.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_table_view.shape[0])) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    __PYX_ERR(0, 2329, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_13 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2329, __pyx_L1_error)
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_table_lookup(__pyx_v_frequency, 0.0, (&(*((double *) ( /* dim=0 */ (__pyx_v_table_view.data + __pyx_t_12 * __pyx_v_table_view.strides[0]) )))), __pyx_t_13, ((mus_interp_t)__pyx_e_8pysndlib_3clm_LINEAR)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2330
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, 0, &table_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 *     gen.cache_append(table)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_table, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2331
 *     gen =  mus_any.from_ptr(cclm.mus_make_table_lookup(frequency, 0, &table_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 *     gen.cache_append(table)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * # ---------------- polywave ---------------- #
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2308
 * 
 * 
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator with the envelope loaded \in with size.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF((PyObject *)__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_i);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_table_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_185make_table_lookup_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_184make_table_lookup_with_env, "\n    return a new table_lookup generator with the envelope loaded \\in with size.\n    \n    :param frequency: frequency of gen \\in hz\n    :param env: envelope shape to load into generator\n    :param size: size of table derived from envelope\n    :return: table_lookup gen\n    :rtype: mus_any\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_185make_table_lookup_with_env = {"make_table_lookup_with_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_185make_table_lookup_with_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_184make_table_lookup_with_env};
static PyObject *__pyx_pw_8pysndlib_3clm_185make_table_lookup_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  PyObject *__pyx_v_envelope = 0;
  PyObject *__pyx_v_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_table_lookup_with_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_envelope,&__pyx_n_s_size,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_envelope)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_table_lookup_with_env", 0, 2, 3, 1); __PYX_ERR(0, 2308, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_table_lookup_with_env") < 0)) __PYX_ERR(0, 2308, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L3_error)
    __pyx_v_envelope = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_table_lookup_with_env", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2308, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_184make_table_lookup_with_env(__pyx_self, __pyx_v_frequency, __pyx_v_envelope, __pyx_v_size);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_184make_table_lookup_with_env(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_envelope, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_table_lookup_with_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_table_lookup_with_env(__pyx_v_frequency, __pyx_v_envelope, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_table_lookup_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2334
 * 
 * # ---------------- polywave ---------------- #
 * cpdef mus_any make_polywave(cython.double frequency,  partials = [0.,1.], Polynomial kind=Polynomial.FIRST_KIND, xcoeffs=None, ycoeffs=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is
 */

static PyObject *__pyx_pw_8pysndlib_3clm_187make_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_polywave(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_polywave *__pyx_optional_args) {
  PyObject *__pyx_v_partials = __pyx_k__33;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind = __pyx_k__34;
  PyObject *__pyx_v_xcoeffs = ((PyObject *)Py_None);
  PyObject *__pyx_v_ycoeffs = ((PyObject *)Py_None);
  __Pyx_memviewslice __pyx_v_xcoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_ycoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_xcoeffs_arr = NULL;
  PyObject *__pyx_v_ycoeffs_arr = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  PyObject *__pyx_v_partials_arr = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_maxpartial = NULL;
  PyObject *__pyx_v_prtls = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_curpartial = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_polywave", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_partials = __pyx_optional_args->partials;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_kind = __pyx_optional_args->kind;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_xcoeffs = __pyx_optional_args->xcoeffs;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_ycoeffs = __pyx_optional_args->ycoeffs;
          }
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2349
 *    # print(f'make_polywave: f: {frequency} p: {partials} x: {xcoeffs} y: {ycoeffs}')
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] xcoeffs_view = None
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2349, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2351
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     cdef double [:] xcoeffs_view = None             # <<<<<<<<<<<<<<
 *     cdef double [:] ycoeffs_view = None
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __pyx_v_xcoeffs_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":2352
 * 
 *     cdef double [:] xcoeffs_view = None
 *     cdef double [:] ycoeffs_view = None             # <<<<<<<<<<<<<<
 * 
 *     # TODO : catch when only one exists
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2352, __pyx_L1_error)
  __pyx_v_ycoeffs_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":2355
 * 
 *     # TODO : catch when only one exists
 *     if  isinstance(xcoeffs, (np.ndarray, list)) and isinstance(ycoeffs, (np.ndarray, list)):             # <<<<<<<<<<<<<<
 *         xcoeffs_arr = np.array(xcoeffs, dtype=np.double)
 *         xcoeffs_view = xcoeffs_arr
 */
  __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_xcoeffs, __pyx_ptype_5numpy_ndarray); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_9 = PyList_Check(__pyx_v_xcoeffs); 
  __pyx_t_8 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_ycoeffs, __pyx_ptype_5numpy_ndarray); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_9 = PyList_Check(__pyx_v_ycoeffs); 
  __pyx_t_8 = __pyx_t_9;
  __pyx_L8_bool_binop_done:;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":2356
 *     # TODO : catch when only one exists
 *     if  isinstance(xcoeffs, (np.ndarray, list)) and isinstance(ycoeffs, (np.ndarray, list)):
 *         xcoeffs_arr = np.array(xcoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 *         xcoeffs_view = xcoeffs_arr
 *         ycoeffs_arr = np.array(ycoeffs, dtype=np.double)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_xcoeffs);
    __Pyx_GIVEREF(__pyx_v_xcoeffs);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_xcoeffs)) __PYX_ERR(0, 2356, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_double); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_xcoeffs_arr = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "pysndlib/clm.pyx":2357
 *     if  isinstance(xcoeffs, (np.ndarray, list)) and isinstance(ycoeffs, (np.ndarray, list)):
 *         xcoeffs_arr = np.array(xcoeffs, dtype=np.double)
 *         xcoeffs_view = xcoeffs_arr             # <<<<<<<<<<<<<<
 *         ycoeffs_arr = np.array(ycoeffs, dtype=np.double)
 *         ycoeffs_view = ycoeffs_arr
 */
    __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_xcoeffs_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
    __pyx_v_xcoeffs_view = __pyx_t_6;
    __pyx_t_6.memview = NULL;
    __pyx_t_6.data = NULL;

    /* "pysndlib/clm.pyx":2358
 *         xcoeffs_arr = np.array(xcoeffs, dtype=np.double)
 *         xcoeffs_view = xcoeffs_arr
 *         ycoeffs_arr = np.array(ycoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 *         ycoeffs_view = ycoeffs_arr
 *         check_ndim(xcoeffs_arr)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_v_ycoeffs);
    __Pyx_GIVEREF(__pyx_v_ycoeffs);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_ycoeffs)) __PYX_ERR(0, 2358, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ycoeffs_arr = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":2359
 *         xcoeffs_view = xcoeffs_arr
 *         ycoeffs_arr = np.array(ycoeffs, dtype=np.double)
 *         ycoeffs_view = ycoeffs_arr             # <<<<<<<<<<<<<<
 *         check_ndim(xcoeffs_arr)
 *         check_ndim(ycoeffs_arr)
 */
    __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_ycoeffs_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2359, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_ycoeffs_view, 1);
    __pyx_v_ycoeffs_view = __pyx_t_6;
    __pyx_t_6.memview = NULL;
    __pyx_t_6.data = NULL;

    /* "pysndlib/clm.pyx":2360
 *         ycoeffs_arr = np.array(ycoeffs, dtype=np.double)
 *         ycoeffs_view = ycoeffs_arr
 *         check_ndim(xcoeffs_arr)             # <<<<<<<<<<<<<<
 *         check_ndim(ycoeffs_arr)
 *         compare_shapes(xcoeffs_arr, ycoeffs_arr)
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_xcoeffs_arr, 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":2361
 *         ycoeffs_view = ycoeffs_arr
 *         check_ndim(xcoeffs_arr)
 *         check_ndim(ycoeffs_arr)             # <<<<<<<<<<<<<<
 *         compare_shapes(xcoeffs_arr, ycoeffs_arr)
 * 
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_ycoeffs_arr, 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":2362
 *         check_ndim(xcoeffs_arr)
 *         check_ndim(ycoeffs_arr)
 *         compare_shapes(xcoeffs_arr, ycoeffs_arr)             # <<<<<<<<<<<<<<
 * 
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave_tu(frequency,&xcoeffs_view[0],&ycoeffs_view[0], len(xcoeffs_arr)))
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_compare_shapes(__pyx_v_xcoeffs_arr, __pyx_v_ycoeffs_arr, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":2364
 *         compare_shapes(xcoeffs_arr, ycoeffs_arr)
 * 
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave_tu(frequency,&xcoeffs_view[0],&ycoeffs_view[0], len(xcoeffs_arr)))             # <<<<<<<<<<<<<<
 *         gen.cache_extend([xcoeffs_arr, ycoeffs_arr])
 *         return gen
 */
    __pyx_t_12 = 0;
    __pyx_t_13 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_v_xcoeffs_view.shape[0];
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_v_xcoeffs_view.shape[0])) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      __PYX_ERR(0, 2364, __pyx_L1_error)
    }
    __pyx_t_14 = 0;
    __pyx_t_13 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_v_ycoeffs_view.shape[0];
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_v_ycoeffs_view.shape[0])) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      __PYX_ERR(0, 2364, __pyx_L1_error)
    }
    __pyx_t_15 = PyObject_Length(__pyx_v_xcoeffs_arr); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2364, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_polywave_tu(__pyx_v_frequency, (&(*((double *) ( /* dim=0 */ (__pyx_v_xcoeffs_view.data + __pyx_t_12 * __pyx_v_xcoeffs_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_ycoeffs_view.data + __pyx_t_14 * __pyx_v_ycoeffs_view.strides[0]) )))), __pyx_t_15), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":2365
 * 
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave_tu(frequency,&xcoeffs_view[0],&ycoeffs_view[0], len(xcoeffs_arr)))
 *         gen.cache_extend([xcoeffs_arr, ycoeffs_arr])             # <<<<<<<<<<<<<<
 *         return gen
 *     else:
 */
    __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_xcoeffs_arr);
    __Pyx_GIVEREF(__pyx_v_xcoeffs_arr);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v_xcoeffs_arr)) __PYX_ERR(0, 2365, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_ycoeffs_arr);
    __Pyx_GIVEREF(__pyx_v_ycoeffs_arr);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_v_ycoeffs_arr)) __PYX_ERR(0, 2365, __pyx_L1_error);
    __pyx_t_4 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_10, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":2366
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave_tu(frequency,&xcoeffs_view[0],&ycoeffs_view[0], len(xcoeffs_arr)))
 *         gen.cache_extend([xcoeffs_arr, ycoeffs_arr])
 *         return gen             # <<<<<<<<<<<<<<
 *     else:
 *         partials_arr = None
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_gen);
    __pyx_r = __pyx_v_gen;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":2355
 * 
 *     # TODO : catch when only one exists
 *     if  isinstance(xcoeffs, (np.ndarray, list)) and isinstance(ycoeffs, (np.ndarray, list)):             # <<<<<<<<<<<<<<
 *         xcoeffs_arr = np.array(xcoeffs, dtype=np.double)
 *         xcoeffs_view = xcoeffs_arr
 */
  }

  /* "pysndlib/clm.pyx":2368
 *         return gen
 *     else:
 *         partials_arr = None             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(partials, np.ndarray):
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_partials_arr = Py_None;

    /* "pysndlib/clm.pyx":2370
 *         partials_arr = None
 * 
 *         if isinstance(partials, np.ndarray):             # <<<<<<<<<<<<<<
 *             partials_arr = partials
 *         if isinstance(partials, list):
 */
    __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_partials, __pyx_ptype_5numpy_ndarray); 
    if (__pyx_t_7) {

      /* "pysndlib/clm.pyx":2371
 * 
 *         if isinstance(partials, np.ndarray):
 *             partials_arr = partials             # <<<<<<<<<<<<<<
 *         if isinstance(partials, list):
 *             partials_arr = np.array(partials, dtype=np.double)
 */
      __Pyx_INCREF(__pyx_v_partials);
      __Pyx_DECREF_SET(__pyx_v_partials_arr, __pyx_v_partials);

      /* "pysndlib/clm.pyx":2370
 *         partials_arr = None
 * 
 *         if isinstance(partials, np.ndarray):             # <<<<<<<<<<<<<<
 *             partials_arr = partials
 *         if isinstance(partials, list):
 */
    }

    /* "pysndlib/clm.pyx":2372
 *         if isinstance(partials, np.ndarray):
 *             partials_arr = partials
 *         if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *             partials_arr = np.array(partials, dtype=np.double)
 * 
 */
    __pyx_t_7 = PyList_Check(__pyx_v_partials); 
    if (__pyx_t_7) {

      /* "pysndlib/clm.pyx":2373
 *             partials_arr = partials
 *         if isinstance(partials, list):
 *             partials_arr = np.array(partials, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *         p = partials_arr[::2]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_partials);
      __Pyx_GIVEREF(__pyx_v_partials);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_partials)) __PYX_ERR(0, 2373, __pyx_L1_error);
      __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_partials_arr, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":2372
 *         if isinstance(partials, np.ndarray):
 *             partials_arr = partials
 *         if isinstance(partials, list):             # <<<<<<<<<<<<<<
 *             partials_arr = np.array(partials, dtype=np.double)
 * 
 */
    }

    /* "pysndlib/clm.pyx":2375
 *             partials_arr = np.array(partials, dtype=np.double)
 * 
 *         p = partials_arr[::2]             # <<<<<<<<<<<<<<
 *         maxpartial = max(p)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_partials_arr, __pyx_slice__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_p = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":2376
 * 
 *         p = partials_arr[::2]
 *         maxpartial = max(p)             # <<<<<<<<<<<<<<
 * 
 *         prtls = np.zeros(int(maxpartial)+1, dtype=np.double)
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_maxpartial = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":2378
 *         maxpartial = max(p)
 * 
 *         prtls = np.zeros(int(maxpartial)+1, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *         check_ndim(prtls)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_maxpartial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_prtls = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":2380
 *         prtls = np.zeros(int(maxpartial)+1, dtype=np.double)
 * 
 *         check_ndim(prtls)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(0, len(partials_arr),2):
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_prtls, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":2382
 *         check_ndim(prtls)
 * 
 *         for i in range(0, len(partials_arr),2):             # <<<<<<<<<<<<<<
 *             curpartial = partials_arr[i]
 *             prtls[int(curpartial)] = partials_arr[i+1]
 */
    __pyx_t_15 = PyObject_Length(__pyx_v_partials_arr); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2382, __pyx_L1_error)
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 2382, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_2)) __PYX_ERR(0, 2382, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
    } else {
      __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2382, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_16)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2382, __pyx_L1_error)
            #endif
            if (__pyx_t_15 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 2382, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2382, __pyx_L1_error)
            #endif
            if (__pyx_t_15 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 2382, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_16(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2382, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":2383
 * 
 *         for i in range(0, len(partials_arr),2):
 *             curpartial = partials_arr[i]             # <<<<<<<<<<<<<<
 *             prtls[int(curpartial)] = partials_arr[i+1]
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_partials_arr, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_curpartial, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":2384
 *         for i in range(0, len(partials_arr),2):
 *             curpartial = partials_arr[i]
 *             prtls[int(curpartial)] = partials_arr[i+1]             # <<<<<<<<<<<<<<
 * 
 *         xcoeffs_view = prtls
 */
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_partials_arr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_curpartial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely((PyObject_SetItem(__pyx_v_prtls, __pyx_t_1, __pyx_t_3) < 0))) __PYX_ERR(0, 2384, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":2382
 *         check_ndim(prtls)
 * 
 *         for i in range(0, len(partials_arr),2):             # <<<<<<<<<<<<<<
 *             curpartial = partials_arr[i]
 *             prtls[int(curpartial)] = partials_arr[i+1]
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":2386
 *             prtls[int(curpartial)] = partials_arr[i+1]
 * 
 *         xcoeffs_view = prtls             # <<<<<<<<<<<<<<
 * 
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave(frequency, &xcoeffs_view[0], len(prtls), kind))
 */
    __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_prtls, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2386, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
    __pyx_v_xcoeffs_view = __pyx_t_6;
    __pyx_t_6.memview = NULL;
    __pyx_t_6.data = NULL;

    /* "pysndlib/clm.pyx":2388
 *         xcoeffs_view = prtls
 * 
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave(frequency, &xcoeffs_view[0], len(prtls), kind))             # <<<<<<<<<<<<<<
 * 
 *         gen.cache_extend([prtls])
 */
    __pyx_t_14 = 0;
    __pyx_t_13 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_v_xcoeffs_view.shape[0];
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_v_xcoeffs_view.shape[0])) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      __PYX_ERR(0, 2388, __pyx_L1_error)
    }
    __pyx_t_15 = PyObject_Length(__pyx_v_prtls); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2388, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_polywave(__pyx_v_frequency, (&(*((double *) ( /* dim=0 */ (__pyx_v_xcoeffs_view.data + __pyx_t_14 * __pyx_v_xcoeffs_view.strides[0]) )))), __pyx_t_15, __pyx_v_kind), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":2390
 *         gen = mus_any.from_ptr(cclm.mus_make_polywave(frequency, &xcoeffs_view[0], len(prtls), kind))
 * 
 *         gen.cache_extend([prtls])             # <<<<<<<<<<<<<<
 *         return gen
 * 
 */
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_prtls);
    __Pyx_GIVEREF(__pyx_v_prtls);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_prtls)) __PYX_ERR(0, 2390, __pyx_L1_error);
    __pyx_t_3 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":2391
 * 
 *         gen.cache_extend([prtls])
 *         return gen             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_gen);
    __pyx_r = __pyx_v_gen;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":2334
 * 
 * # ---------------- polywave ---------------- #
 * cpdef mus_any make_polywave(cython.double frequency,  partials = [0.,1.], Polynomial kind=Polynomial.FIRST_KIND, xcoeffs=None, ycoeffs=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pysndlib.clm.make_polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ycoeffs_view, 1);
  __Pyx_XDECREF(__pyx_v_xcoeffs_arr);
  __Pyx_XDECREF(__pyx_v_ycoeffs_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_partials_arr);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_maxpartial);
  __Pyx_XDECREF(__pyx_v_prtls);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_curpartial);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_187make_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_186make_polywave, "\n    return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is\n    the same \\in effect as make_oscil.\n    \n    :param frequency: polywave frequency\n    :param partials: a list of harmonic numbers and their associated amplitudes\n    :param kind: Chebyshev polynomial choice\n    :param xcoeffs: tn for tu-sum case\n    :param ycoeffs: un for tu-sum case\n    :return: polywave gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_187make_polywave = {"make_polywave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_187make_polywave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_186make_polywave};
static PyObject *__pyx_pw_8pysndlib_3clm_187make_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  PyObject *__pyx_v_partials = 0;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind;
  PyObject *__pyx_v_xcoeffs = 0;
  PyObject *__pyx_v_ycoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_polywave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_partials,&__pyx_n_s_kind,&__pyx_n_s_xcoeffs,&__pyx_n_s_ycoeffs,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__33);
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kind);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xcoeffs);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ycoeffs);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_polywave") < 0)) __PYX_ERR(0, 2334, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
    __pyx_v_partials = values[1];
    if (values[2]) {
      __pyx_v_kind = ((enum __pyx_t_8pysndlib_3clm_Polynomial)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L3_error)
    } else {
      __pyx_v_kind = __pyx_k__34;
    }
    __pyx_v_xcoeffs = values[3];
    __pyx_v_ycoeffs = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_polywave", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 2334, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_186make_polywave(__pyx_self, __pyx_v_frequency, __pyx_v_partials, __pyx_v_kind, __pyx_v_xcoeffs, __pyx_v_ycoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_186make_polywave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind, PyObject *__pyx_v_xcoeffs, PyObject *__pyx_v_ycoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_polywave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_polywave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.partials = __pyx_v_partials;
  __pyx_t_2.kind = __pyx_v_kind;
  __pyx_t_2.xcoeffs = __pyx_v_xcoeffs;
  __pyx_t_2.ycoeffs = __pyx_v_ycoeffs;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_polywave(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2394
 * 
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_189polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_polywave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polywave *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2402
 *     :rtype: float
 *     """
 *     return cclm.mus_polywave(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_polywave(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2394
 * 
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_189polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_188polywave, "\n    next sample of polywave waveshaper.\n    \n    :param gen: polywave gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_189polywave = {"polywave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_189polywave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_188polywave};
static PyObject *__pyx_pw_8pysndlib_3clm_189polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polywave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polywave") < 0)) __PYX_ERR(0, 2394, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polywave", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2394, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2394, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_188polywave(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_188polywave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_polywave __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polywave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polywave(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2405
 * 
 * 
 * cpdef cython.double polywave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_191polywave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_polywave_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2412
 *     :rtype: float
 *     """
 *     return cclm.mus_polywave_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_polywave(mus_any gen):
 */
  __pyx_r = mus_polywave_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2405
 * 
 * 
 * cpdef cython.double polywave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_191polywave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_190polywave_unmodulated, "\n    next sample of polywave waveshaper. unmodulated\n    \n    :param gen: polywave gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_191polywave_unmodulated = {"polywave_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_191polywave_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_190polywave_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_191polywave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polywave_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polywave_unmodulated") < 0)) __PYX_ERR(0, 2405, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polywave_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2405, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polywave_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2405, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_190polywave_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_190polywave_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polywave_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polywave_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.polywave_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2414
 *     return cclm.mus_polywave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_polywave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polywave.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_193is_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_polywave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2421
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_polywave(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_polywave(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2414
 *     return cclm.mus_polywave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_polywave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polywave.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_193is_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_192is_polywave, "\n    returns True if gen is a polywave.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_193is_polywave = {"is_polywave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_193is_polywave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_192is_polywave};
static PyObject *__pyx_pw_8pysndlib_3clm_193is_polywave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_polywave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2414, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_polywave") < 0)) __PYX_ERR(0, 2414, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_polywave", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2414, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2414, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_192is_polywave(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_192is_polywave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_polywave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_polywave(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2414, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_polywave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2427
 * # ---------------- polyshape ---------------- #
 * 
 * cpdef mus_any make_polyshape(cython.double frequency, cython.double initial_phase=0.0, coeffs = None, partials = [1.,1.], Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

static PyObject *__pyx_pw_8pysndlib_3clm_195make_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_polyshape(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_polyshape *__pyx_optional_args) {
  double __pyx_v_initial_phase = ((double)0.0);
  PyObject *__pyx_v_coeffs = ((PyObject *)Py_None);
  PyObject *__pyx_v_partials = __pyx_k__35;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind = __pyx_k__36;
  PyObject *__pyx_v_data = NULL;
  __Pyx_memviewslice __pyx_v_data_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial __pyx_t_9;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_polyshape", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_phase = __pyx_optional_args->initial_phase;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_coeffs = __pyx_optional_args->coeffs;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_partials = __pyx_optional_args->partials;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_kind = __pyx_optional_args->kind;
          }
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2441
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     if coeffs:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2443
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     if coeffs:             # <<<<<<<<<<<<<<
 *         if isinstance(coeffs, list):
 *             data = np.array(coeffs, dtype=np.double)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_coeffs); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2443, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":2444
 * 
 *     if coeffs:
 *         if isinstance(coeffs, list):             # <<<<<<<<<<<<<<
 *             data = np.array(coeffs, dtype=np.double)
 *         else:
 */
    __pyx_t_6 = PyList_Check(__pyx_v_coeffs); 
    if (__pyx_t_6) {

      /* "pysndlib/clm.pyx":2445
 *     if coeffs:
 *         if isinstance(coeffs, list):
 *             data = np.array(coeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 *         else:
 *             data = coeffs
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_coeffs);
      __Pyx_GIVEREF(__pyx_v_coeffs);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_coeffs)) __PYX_ERR(0, 2445, __pyx_L1_error);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_double); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_data = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pysndlib/clm.pyx":2444
 * 
 *     if coeffs:
 *         if isinstance(coeffs, list):             # <<<<<<<<<<<<<<
 *             data = np.array(coeffs, dtype=np.double)
 *         else:
 */
      goto __pyx_L4;
    }

    /* "pysndlib/clm.pyx":2447
 *             data = np.array(coeffs, dtype=np.double)
 *         else:
 *             data = coeffs             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_coeffs);
      __pyx_v_data = __pyx_v_coeffs;
    }
    __pyx_L4:;

    /* "pysndlib/clm.pyx":2443
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     if coeffs:             # <<<<<<<<<<<<<<
 *         if isinstance(coeffs, list):
 *             data = np.array(coeffs, dtype=np.double)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":2450
 * 
 *     else:
 *         data = partials2polynomial(partials, kind)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(data)
 */
  /*else*/ {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.kind = __pyx_v_kind;
    __pyx_t_8 = ((PyObject *)__pyx_f_8pysndlib_3clm_partials2polynomial(__pyx_v_partials, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_v_data = __pyx_t_8;
    __pyx_t_8 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":2452
 *         data = partials2polynomial(partials, kind)
 * 
 *     check_ndim(data)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] data_view = data
 */
  __pyx_t_8 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_data, 0, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":2454
 *     check_ndim(data)
 * 
 *     cdef double [:] data_view = data             # <<<<<<<<<<<<<<
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_polyshape(frequency, initial_phase, &data_view[0], len(data), kind))
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 2454, __pyx_L1_error)
  __pyx_v_data_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":2456
 *     cdef double [:] data_view = data
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_polyshape(frequency, initial_phase, &data_view[0], len(data), kind))             # <<<<<<<<<<<<<<
 *     gen.cache_append(data)
 *     return gen
 */
  __pyx_t_11 = 0;
  __pyx_t_12 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_data_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_data_view.shape[0])) __pyx_t_12 = 0;
  if (unlikely(__pyx_t_12 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_12);
    __PYX_ERR(0, 2456, __pyx_L1_error)
  }
  __pyx_t_13 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2456, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_polyshape(__pyx_v_frequency, __pyx_v_initial_phase, (&(*((double *) ( /* dim=0 */ (__pyx_v_data_view.data + __pyx_t_11 * __pyx_v_data_view.strides[0]) )))), __pyx_t_13, __pyx_v_kind), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":2457
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_polyshape(frequency, initial_phase, &data_view[0], len(data), kind))
 *     gen.cache_append(data)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_data, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":2458
 *     gen = mus_any.from_ptr(cclm.mus_make_polyshape(frequency, initial_phase, &data_view[0], len(data), kind))
 *     gen.cache_append(data)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=1.0, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2427
 * # ---------------- polyshape ---------------- #
 * 
 * cpdef mus_any make_polyshape(cython.double frequency, cython.double initial_phase=0.0, coeffs = None, partials = [1.,1.], Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_195make_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_194make_polyshape, "\n    return a new polynomial-based waveshaping generator.\n    \n    :param frequency: frequency of gen \\in hz\n    :param initial_phase: initial phase of gen \\in radians\n    :param coeff: coefficients can be passed to polyshape\n    :param partials: a list of harmonic numbers and their associated amplitudes\n    :param kind: Chebyshev polynomial choice\n    :return: polyshape gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_195make_polyshape = {"make_polyshape", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_195make_polyshape, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_194make_polyshape};
static PyObject *__pyx_pw_8pysndlib_3clm_195make_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_initial_phase;
  PyObject *__pyx_v_coeffs = 0;
  PyObject *__pyx_v_partials = 0;
  enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_polyshape (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_initial_phase,&__pyx_n_s_coeffs,&__pyx_n_s_partials,&__pyx_n_s_kind,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__35);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_phase);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_coeffs);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_partials);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kind);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_polyshape") < 0)) __PYX_ERR(0, 2427, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_initial_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_initial_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
    } else {
      __pyx_v_initial_phase = ((double)0.0);
    }
    __pyx_v_coeffs = values[2];
    __pyx_v_partials = values[3];
    if (values[4]) {
      __pyx_v_kind = ((enum __pyx_t_8pysndlib_3clm_Polynomial)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(values[4])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L3_error)
    } else {
      __pyx_v_kind = __pyx_k__36;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_polyshape", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 2427, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_194make_polyshape(__pyx_self, __pyx_v_frequency, __pyx_v_initial_phase, __pyx_v_coeffs, __pyx_v_partials, __pyx_v_kind);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_194make_polyshape(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, PyObject *__pyx_v_coeffs, PyObject *__pyx_v_partials, enum __pyx_t_8pysndlib_3clm_Polynomial __pyx_v_kind) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_polyshape __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_polyshape", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.initial_phase = __pyx_v_initial_phase;
  __pyx_t_2.coeffs = __pyx_v_coeffs;
  __pyx_t_2.partials = __pyx_v_partials;
  __pyx_t_2.kind = __pyx_v_kind;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_polyshape(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2460
 *     return gen
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=1.0, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_197polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_polyshape(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape *__pyx_optional_args) {
  double __pyx_v_index = ((double)1.0);
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  int __pyx_t_1;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_index = __pyx_optional_args->index;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_fm = __pyx_optional_args->fm;
      }
    }
  }

  /* "pysndlib/clm.pyx":2469
 *     :rtype: float
 *     """
 *     if fm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_polyshape(gen._ptr, index, fm)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fm != 0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":2470
 *     """
 *     if fm:
 *         return cclm.mus_polyshape(gen._ptr, index, fm)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)
 */
    __pyx_r = mus_polyshape(__pyx_v_gen->_ptr, __pyx_v_index, __pyx_v_fm);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":2469
 *     :rtype: float
 *     """
 *     if fm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_polyshape(gen._ptr, index, fm)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":2472
 *         return cclm.mus_polyshape(gen._ptr, index, fm)
 *     else:
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=1.0):
 */
  /*else*/ {
    __pyx_r = mus_polyshape_unmodulated(__pyx_v_gen->_ptr, __pyx_v_index);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":2460
 *     return gen
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=1.0, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_197polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_196polyshape, "\n    next sample of polynomial-based waveshaper.\n    \n    :param gen: polyshape gen\n    :param index: fm index\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_197polyshape = {"polyshape", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_197polyshape, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_196polyshape};
static PyObject *__pyx_pw_8pysndlib_3clm_197polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_index;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polyshape (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_index,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polyshape") < 0)) __PYX_ERR(0, 2460, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_index = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_index == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L3_error)
    } else {
      __pyx_v_index = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polyshape", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2460, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2460, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_196polyshape(__pyx_self, __pyx_v_gen, __pyx_v_index, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_196polyshape(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_polyshape __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polyshape", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.index = __pyx_v_index;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polyshape(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2474
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)
 * 
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=1.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_199polyshape_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_polyshape_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated *__pyx_optional_args) {
  double __pyx_v_index = ((double)1.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_index = __pyx_optional_args->index;
    }
  }

  /* "pysndlib/clm.pyx":2482
 *     :rtype: float
 *     """
 *     return cclm.mus_polyshape_unmodulated(gen._ptr, index)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_polyshape_unmodulated(__pyx_v_gen->_ptr, __pyx_v_index);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2474
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)
 * 
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=1.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_199polyshape_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_198polyshape_unmodulated, "\n    next sample of polynomial-based waveshaper. unmodulated\n    \n    :param gen: polyshape gen\n    :param index: fm index\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_199polyshape_unmodulated = {"polyshape_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_199polyshape_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_198polyshape_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_199polyshape_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polyshape_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_index,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "polyshape_unmodulated") < 0)) __PYX_ERR(0, 2474, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_index = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_index == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L3_error)
    } else {
      __pyx_v_index = ((double)1.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polyshape_unmodulated", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2474, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.polyshape_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2474, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_198polyshape_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_index);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_198polyshape_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polyshape_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.index = __pyx_v_index;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_polyshape_unmodulated(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.polyshape_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2485
 * 
 * 
 * cpdef bint is_polyshape(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polyshape.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_201is_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_polyshape(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2492
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_polyshape(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_polyshape(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2485
 * 
 * 
 * cpdef bint is_polyshape(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polyshape.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_201is_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_200is_polyshape, "\n    returns True if gen is a polyshape.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_201is_polyshape = {"is_polyshape", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_201is_polyshape, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_200is_polyshape};
static PyObject *__pyx_pw_8pysndlib_3clm_201is_polyshape(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_polyshape (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2485, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_polyshape") < 0)) __PYX_ERR(0, 2485, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_polyshape", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2485, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2485, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_200is_polyshape(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_200is_polyshape(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_polyshape", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_polyshape(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2485, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_polyshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2496
 * 
 * # ---------------- triangle-wave ---------------- #
 * cpdef mus_any make_triangle_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new triangle_wave generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_203make_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_triangle_wave(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_triangle_wave *__pyx_optional_args) {
  double __pyx_v_amplitude = ((double)1.0);
  double __pyx_v_phase = __pyx_k__37;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_triangle_wave", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amplitude = __pyx_optional_args->amplitude;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_phase = __pyx_optional_args->phase;
      }
    }
  }

  /* "pysndlib/clm.pyx":2507
 * 
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2507, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2509
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_triangle_wave(__pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2496
 * 
 * # ---------------- triangle-wave ---------------- #
 * cpdef mus_any make_triangle_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new triangle_wave generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_203make_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_202make_triangle_wave, "\n    return a new triangle_wave generator.\n    \n    :param frequency: frequency of generator\n    :param amplitude: amplitude of generator\n    :param phase: initial phase\n    :return: triangle_wave gen\n    :rtype: mus_any\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_203make_triangle_wave = {"make_triangle_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_203make_triangle_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_202make_triangle_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_203make_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  double __pyx_v_phase;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_triangle_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_phase,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_triangle_wave") < 0)) __PYX_ERR(0, 2496, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_phase = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    } else {
      __pyx_v_phase = __pyx_k__37;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_triangle_wave", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2496, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_202make_triangle_wave(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_202make_triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_triangle_wave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_triangle_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.phase = __pyx_v_phase;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_triangle_wave(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2511
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_205triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_triangle_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_triangle_wave *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2519
 *     :rtype: float
 *     """
 *     return cclm.mus_triangle_wave(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_triangle_wave(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2511
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_205triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_204triangle_wave, "\n    next triangle wave sample from generator. \n    \n    :param gen: polyshape gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_205triangle_wave = {"triangle_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_205triangle_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_204triangle_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_205triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangle_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2511, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2511, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "triangle_wave") < 0)) __PYX_ERR(0, 2511, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2511, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("triangle_wave", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2511, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2511, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_204triangle_wave(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_204triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_triangle_wave __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangle_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_triangle_wave(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2511, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2522
 * 
 * 
 * cpdef cython.double triangle_wave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_207triangle_wave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_triangle_wave_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2529
 *     :rtype: float
 *     """
 *     return cclm.mus_triangle_wave_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_triangle_wave(mus_any gen):
 */
  __pyx_r = mus_triangle_wave_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2522
 * 
 * 
 * cpdef cython.double triangle_wave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_207triangle_wave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_206triangle_wave_unmodulated, "\n    next triangle wave sample from generator. unmodulated\n    \n    :param gen: polyshape gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_207triangle_wave_unmodulated = {"triangle_wave_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_207triangle_wave_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_206triangle_wave_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_207triangle_wave_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangle_wave_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2522, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "triangle_wave_unmodulated") < 0)) __PYX_ERR(0, 2522, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("triangle_wave_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2522, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.triangle_wave_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_206triangle_wave_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_206triangle_wave_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangle_wave_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_triangle_wave_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.triangle_wave_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2531
 *     return cclm.mus_triangle_wave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_triangle_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a triangle_wave.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_209is_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_triangle_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2538
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_triangle_wave(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- square-wave ---------------- #
 */
  __pyx_r = mus_is_triangle_wave(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2531
 *     return cclm.mus_triangle_wave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_triangle_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a triangle_wave.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_209is_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_208is_triangle_wave, "\n    returns True if gen is a triangle_wave.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_209is_triangle_wave = {"is_triangle_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_209is_triangle_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_208is_triangle_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_209is_triangle_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_triangle_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2531, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_triangle_wave") < 0)) __PYX_ERR(0, 2531, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_triangle_wave", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2531, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2531, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_208is_triangle_wave(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_208is_triangle_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_triangle_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_triangle_wave(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2531, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_triangle_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2541
 * 
 * # ---------------- square-wave ---------------- #
 * cpdef mus_any make_square_wave(cython.double frequency , cython.double amplitude=1.0, cython.double phase=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new square_wave generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_211make_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_square_wave(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_square_wave *__pyx_optional_args) {
  double __pyx_v_amplitude = ((double)1.0);
  double __pyx_v_phase = ((double)0.0);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_square_wave", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amplitude = __pyx_optional_args->amplitude;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_phase = __pyx_optional_args->phase;
      }
    }
  }

  /* "pysndlib/clm.pyx":2551
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2551, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2553
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_square_wave(__pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2541
 * 
 * # ---------------- square-wave ---------------- #
 * cpdef mus_any make_square_wave(cython.double frequency , cython.double amplitude=1.0, cython.double phase=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new square_wave generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_211make_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_210make_square_wave, "\n    return a new square_wave generator.\n    \n    :param frequency: frequency of generator\n    :param amplitude: amplitude of generator\n    :param phase: initial phase\n    :return: square_wave gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_211make_square_wave = {"make_square_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_211make_square_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_210make_square_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_211make_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  double __pyx_v_phase;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_square_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_phase,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_square_wave") < 0)) __PYX_ERR(0, 2541, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_phase = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L3_error)
    } else {
      __pyx_v_phase = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_square_wave", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_210make_square_wave(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_210make_square_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_square_wave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_square_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.phase = __pyx_v_phase;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_square_wave(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2555
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next square wave sample from generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_213square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_square_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_square_wave *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2563
 *     :rtype: float
 *     """
 *     return cclm.mus_square_wave(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_square_wave(mus_any gen):
 */
  __pyx_r = mus_square_wave(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2555
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next square wave sample from generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_213square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_212square_wave, "\n    next square wave sample from generator.\n    \n    :param gen: polyshape gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_213square_wave = {"square_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_213square_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_212square_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_213square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("square_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "square_wave") < 0)) __PYX_ERR(0, 2555, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("square_wave", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2555, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2555, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_212square_wave(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_212square_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_square_wave __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("square_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_square_wave(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2565
 *     return cclm.mus_square_wave(gen._ptr, fm)
 * 
 * cpdef bint is_square_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a square_wave.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_215is_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_square_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2572
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_square_wave(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- sawtooth-wave ---------------- #
 */
  __pyx_r = mus_is_square_wave(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2565
 *     return cclm.mus_square_wave(gen._ptr, fm)
 * 
 * cpdef bint is_square_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a square_wave.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_215is_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_214is_square_wave, "\n    returns True if gen is a square_wave.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_215is_square_wave = {"is_square_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_215is_square_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_214is_square_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_215is_square_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_square_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2565, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_square_wave") < 0)) __PYX_ERR(0, 2565, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_square_wave", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2565, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2565, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_214is_square_wave(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_214is_square_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_square_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_square_wave(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2565, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_square_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2575
 * 
 * # ---------------- sawtooth-wave ---------------- #
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sawtooth_wave generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_217make_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_sawtooth_wave(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave *__pyx_optional_args) {
  double __pyx_v_amplitude = ((double)1.0);
  double __pyx_v_phase = __pyx_k__38;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_sawtooth_wave", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amplitude = __pyx_optional_args->amplitude;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_phase = __pyx_optional_args->phase;
      }
    }
  }

  /* "pysndlib/clm.pyx":2586
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2586, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2588
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_sawtooth_wave(__pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2575
 * 
 * # ---------------- sawtooth-wave ---------------- #
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sawtooth_wave generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_217make_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_216make_sawtooth_wave, "\n    return a new sawtooth_wave generator.\n    \n    :param frequency: frequency of generator\n    :param amplitude: amplitude of generator\n    :param phase: initial phase\n    :return: sawtooth_wave gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_217make_sawtooth_wave = {"make_sawtooth_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_217make_sawtooth_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_216make_sawtooth_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_217make_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  double __pyx_v_phase;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_sawtooth_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_phase,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_sawtooth_wave") < 0)) __PYX_ERR(0, 2575, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_phase = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L3_error)
    } else {
      __pyx_v_phase = __pyx_k__38;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_sawtooth_wave", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2575, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_216make_sawtooth_wave(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_216make_sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_sawtooth_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.phase = __pyx_v_phase;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_sawtooth_wave(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2590
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sawtooth wave sample from generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_219sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_sawtooth_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2598
 *     :rtype: float
 *     """
 *     return cclm.mus_sawtooth_wave(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_sawtooth_wave(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2590
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sawtooth wave sample from generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_219sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_218sawtooth_wave, "\n    next sawtooth wave sample from generator.\n    \n    :param gen: polyshape gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_219sawtooth_wave = {"sawtooth_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_219sawtooth_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_218sawtooth_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_219sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sawtooth_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2590, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2590, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sawtooth_wave") < 0)) __PYX_ERR(0, 2590, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2590, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sawtooth_wave", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2590, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2590, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_218sawtooth_wave(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_218sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sawtooth_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_sawtooth_wave(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2590, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2601
 * 
 * 
 * cpdef bint is_sawtooth_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sawtooth_wave.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_221is_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_sawtooth_wave(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2608
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_sawtooth_wave(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- pulse-train ---------------- #
 */
  __pyx_r = mus_is_sawtooth_wave(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2601
 * 
 * 
 * cpdef bint is_sawtooth_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sawtooth_wave.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_221is_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_220is_sawtooth_wave, "\n    returns True if gen is a sawtooth_wave.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_221is_sawtooth_wave = {"is_sawtooth_wave", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_221is_sawtooth_wave, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_220is_sawtooth_wave};
static PyObject *__pyx_pw_8pysndlib_3clm_221is_sawtooth_wave(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_sawtooth_wave (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2601, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_sawtooth_wave") < 0)) __PYX_ERR(0, 2601, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_sawtooth_wave", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2601, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2601, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_220is_sawtooth_wave(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_220is_sawtooth_wave(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sawtooth_wave", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_sawtooth_wave(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2601, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_sawtooth_wave", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2611
 * 
 * # ---------------- pulse-train ---------------- #
 * cpdef mus_any make_pulse_train(cython.double frequency=1.0, cython.double amplitude=1.0, cython.double phase=(np.pi*2)):             # <<<<<<<<<<<<<<
 *     """
 *     return a new pulse_train generator. this produces a sequence of impulses.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_223make_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_pulse_train(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_pulse_train *__pyx_optional_args) {
  double __pyx_v_frequency = ((double)1.0);
  double __pyx_v_amplitude = ((double)1.0);
  double __pyx_v_phase = __pyx_k__39;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_pulse_train", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frequency = __pyx_optional_args->frequency;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_amplitude = __pyx_optional_args->amplitude;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_phase = __pyx_optional_args->phase;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2622
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2622, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2624
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_pulse_train(__pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2611
 * 
 * # ---------------- pulse-train ---------------- #
 * cpdef mus_any make_pulse_train(cython.double frequency=1.0, cython.double amplitude=1.0, cython.double phase=(np.pi*2)):             # <<<<<<<<<<<<<<
 *     """
 *     return a new pulse_train generator. this produces a sequence of impulses.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_223make_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_222make_pulse_train, "\n    return a new pulse_train generator. this produces a sequence of impulses.\n    \n    :param frequency: frequency of generator\n    :param amplitude: amplitude of generator\n    :param phase: initial phase\n    :return: pulse_train gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_223make_pulse_train = {"make_pulse_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_223make_pulse_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_222make_pulse_train};
static PyObject *__pyx_pw_8pysndlib_3clm_223make_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  double __pyx_v_phase;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_pulse_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_phase,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_pulse_train") < 0)) __PYX_ERR(0, 2611, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
    } else {
      __pyx_v_frequency = ((double)1.0);
    }
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    if (values[2]) {
      __pyx_v_phase = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
    } else {
      __pyx_v_phase = __pyx_k__39;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_pulse_train", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2611, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_222make_pulse_train(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_phase);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_222make_pulse_train(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, double __pyx_v_phase) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_pulse_train __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_pulse_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.frequency = __pyx_v_frequency;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.phase = __pyx_v_phase;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_pulse_train(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2626
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_225pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulse_train(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulse_train *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2634
 *     :rtype: float
 *     """
 *     return cclm.mus_pulse_train(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_pulse_train(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2626
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_225pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_224pulse_train, "\n    next pulse train sample from generator.\n    \n    :param gen: pulse_train gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_225pulse_train = {"pulse_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_225pulse_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_224pulse_train};
static PyObject *__pyx_pw_8pysndlib_3clm_225pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pulse_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2626, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2626, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pulse_train") < 0)) __PYX_ERR(0, 2626, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2626, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pulse_train", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2626, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2626, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_224pulse_train(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_224pulse_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_pulse_train __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pulse_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_pulse_train(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2626, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2637
 * 
 * 
 * cpdef cython.double pulse_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_227pulse_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_pulse_train_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2643
 *     :rtype: float
 *     """
 *     return cclm.mus_pulse_train_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_pulse_train(mus_any gen):
 */
  __pyx_r = mus_pulse_train_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2637
 * 
 * 
 * cpdef cython.double pulse_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_227pulse_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_226pulse_train_unmodulated, "\n    next pulse train sample from generator. unmodulated\n    :param gen: pulse_train gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_227pulse_train_unmodulated = {"pulse_train_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_227pulse_train_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_226pulse_train_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_227pulse_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pulse_train_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2637, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pulse_train_unmodulated") < 0)) __PYX_ERR(0, 2637, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pulse_train_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2637, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.pulse_train_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2637, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_226pulse_train_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_226pulse_train_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pulse_train_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_pulse_train_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2637, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.pulse_train_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2645
 *     return cclm.mus_pulse_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulse_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulse_train.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_229is_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_pulse_train(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2652
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_pulse_train(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- ncos ---------------- #
 */
  __pyx_r = mus_is_pulse_train(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2645
 *     return cclm.mus_pulse_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulse_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulse_train.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_229is_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_228is_pulse_train, "\n    returns True if gen is a pulse_train.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_229is_pulse_train = {"is_pulse_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_229is_pulse_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_228is_pulse_train};
static PyObject *__pyx_pw_8pysndlib_3clm_229is_pulse_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_pulse_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2645, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_pulse_train") < 0)) __PYX_ERR(0, 2645, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_pulse_train", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2645, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2645, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_228is_pulse_train(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_228is_pulse_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_pulse_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_pulse_train(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2645, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_pulse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2656
 * # ---------------- ncos ---------------- #
 * 
 * cpdef mus_any make_ncos(cython.double frequency, cython.int n=1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ncos generator, producing a sum of 'n' equal amplitude cosines.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_231make_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_ncos(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_ncos *__pyx_optional_args) {
  int __pyx_v_n = ((int)1);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_ncos", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_n = __pyx_optional_args->n;
    }
  }

  /* "pysndlib/clm.pyx":2665
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('n', n, 0, None)
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2665, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2666
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('n', n, 0, None)             # <<<<<<<<<<<<<<
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_int_0;
  __pyx_t_5.high = Py_None;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_n, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2667
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('n', n, 0, None)
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_ncos(__pyx_v_frequency, __pyx_v_n), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2656
 * # ---------------- ncos ---------------- #
 * 
 * cpdef mus_any make_ncos(cython.double frequency, cython.int n=1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ncos generator, producing a sum of 'n' equal amplitude cosines.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_231make_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_230make_ncos, "\n    return a new ncos generator, producing a sum of 'n' equal amplitude cosines.\n    \n    :param frequency: frequency of generator\n    :param n: number of cosines\n    :return: ncos gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_231make_ncos = {"make_ncos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_231make_ncos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_230make_ncos};
static PyObject *__pyx_pw_8pysndlib_3clm_231make_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  int __pyx_v_n;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_ncos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_n,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_ncos") < 0)) __PYX_ERR(0, 2656, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_n = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
    } else {
      __pyx_v_n = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_ncos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2656, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_230make_ncos(__pyx_self, __pyx_v_frequency, __pyx_v_n);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_230make_ncos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_ncos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_ncos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.n = __pyx_v_n;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_ncos(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2669
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an ncos generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_233ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_ncos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ncos *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2677
 *     :rtype: float
 *     """
 *     return cclm.mus_ncos(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_ncos(mus_any gen):
 */
  __pyx_r = mus_ncos(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2669
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an ncos generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_233ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_232ncos, "\n    get the next sample from 'gen', an ncos generator.\n    \n    :param gen: ncos gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_233ncos = {"ncos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_233ncos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_232ncos};
static PyObject *__pyx_pw_8pysndlib_3clm_233ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ncos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2669, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2669, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ncos") < 0)) __PYX_ERR(0, 2669, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2669, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ncos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2669, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2669, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_232ncos(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_232ncos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_ncos __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ncos(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2669, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2679
 *     return cclm.mus_ncos(gen._ptr, fm)
 * 
 * cpdef bint is_ncos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ncos.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_235is_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_ncos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2686
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_ncos(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_ncos(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2679
 *     return cclm.mus_ncos(gen._ptr, fm)
 * 
 * cpdef bint is_ncos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ncos.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_235is_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_234is_ncos, "\n    returns True if gen is a ncos.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_235is_ncos = {"is_ncos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_235is_ncos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_234is_ncos};
static PyObject *__pyx_pw_8pysndlib_3clm_235is_ncos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ncos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2679, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_ncos") < 0)) __PYX_ERR(0, 2679, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_ncos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2679, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2679, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_234is_ncos(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_234is_ncos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ncos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_ncos(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2679, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_ncos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2690
 * 
 * # ---------------- nsin ---------------- #
 * cpdef mus_any make_nsin(cython.double frequency, cython.int n =1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nsin generator, producing a sum of 'n' equal amplitude sines.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_237make_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nsin(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nsin *__pyx_optional_args) {
  int __pyx_v_n = ((int)1);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nsin", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_n = __pyx_optional_args->n;
    }
  }

  /* "pysndlib/clm.pyx":2700
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('n', n, 0, None)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2700, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2701
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('n', n, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_int_0;
  __pyx_t_5.high = Py_None;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_n, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2703
 *     check_range('n', n, 0, None)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_nsin(__pyx_v_frequency, __pyx_v_n), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2690
 * 
 * # ---------------- nsin ---------------- #
 * cpdef mus_any make_nsin(cython.double frequency, cython.int n =1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nsin generator, producing a sum of 'n' equal amplitude sines.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_237make_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_236make_nsin, "\n    return a new nsin generator, producing a sum of 'n' equal amplitude sines.\n    \n    :param frequency: frequency of generator\n    :param n: number of sines\n    :return: nsin gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_237make_nsin = {"make_nsin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_237make_nsin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_236make_nsin};
static PyObject *__pyx_pw_8pysndlib_3clm_237make_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  int __pyx_v_n;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_nsin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_n,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_nsin") < 0)) __PYX_ERR(0, 2690, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_n = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    } else {
      __pyx_v_n = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_nsin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2690, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_236make_nsin(__pyx_self, __pyx_v_frequency, __pyx_v_n);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_236make_nsin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_nsin __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nsin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.n = __pyx_v_n;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_nsin(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2705
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an nsin generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_239nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_nsin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nsin *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2713
 *     :rtype: float
 *     """
 *     return cclm.mus_nsin(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_nsin(mus_any gen ):
 */
  __pyx_r = mus_nsin(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2705
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an nsin generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_239nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_238nsin, "\n    get the next sample from 'gen', an nsin generator.\n    \n    :param gen: ncos gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_239nsin = {"nsin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_239nsin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_238nsin};
static PyObject *__pyx_pw_8pysndlib_3clm_239nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nsin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "nsin") < 0)) __PYX_ERR(0, 2705, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nsin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2705, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2705, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_238nsin(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_238nsin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_nsin __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nsin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_nsin(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2715
 *     return cclm.mus_nsin(gen._ptr, fm)
 * 
 * cpdef bint is_nsin(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nsin.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_241is_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nsin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2722
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_nsin(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- nrxysin and nrxycos ---------------- #
 */
  __pyx_r = mus_is_nsin(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2715
 *     return cclm.mus_nsin(gen._ptr, fm)
 * 
 * cpdef bint is_nsin(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nsin.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_241is_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_240is_nsin, "\n    returns True if gen is a nsin.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_241is_nsin = {"is_nsin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_241is_nsin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_240is_nsin};
static PyObject *__pyx_pw_8pysndlib_3clm_241is_nsin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_nsin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2715, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_nsin") < 0)) __PYX_ERR(0, 2715, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_nsin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2715, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2715, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_240is_nsin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_240is_nsin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nsin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_nsin(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2715, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_nsin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2726
 * # ---------------- nrxysin and nrxycos ---------------- #
 * 
 * cpdef mus_any make_nrxysin( cython.double frequency,  cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxysin generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_243make_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nrxysin(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nrxysin *__pyx_optional_args) {
  double __pyx_v_ratio = ((double)1.);
  int __pyx_v_n = ((int)1);
  double __pyx_v_r = ((double).5);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nrxysin", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ratio = __pyx_optional_args->ratio;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_n = __pyx_optional_args->n;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_r = __pyx_optional_args->r;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2737
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('r', r, -1.0, 1.0)
 *     check_range('n', n, 0, None)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2737, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2738
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)             # <<<<<<<<<<<<<<
 *     check_range('n', n, 0, None)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_neg_1_0;
  __pyx_t_5.high = __pyx_float_1_0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_r, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2739
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)
 *     check_range('n', n, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_int_0;
  __pyx_t_5.high = Py_None;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_n, __pyx_t_3, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2741
 *     check_range('n', n, 0, None)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=0.):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_nrxysin(__pyx_v_frequency, __pyx_v_ratio, __pyx_v_n, __pyx_v_r), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2726
 * # ---------------- nrxysin and nrxycos ---------------- #
 * 
 * cpdef mus_any make_nrxysin( cython.double frequency,  cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxysin generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_243make_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_242make_nrxysin, "\n    return a new nrxysin generator.\n    \n    :param frequency: frequency of generator\n    :param ratio: ratio between frequency and the spacing between successive sidebands\n    :param n: number of sidebands\n    :param r: amplitude ratio between successive sidebands (-1.0 < r < 1.0)\n    :return: nrxysin gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_243make_nrxysin = {"make_nrxysin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_243make_nrxysin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_242make_nrxysin};
static PyObject *__pyx_pw_8pysndlib_3clm_243make_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_ratio;
  int __pyx_v_n;
  double __pyx_v_r;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_nrxysin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_ratio,&__pyx_n_s_n,&__pyx_n_s_r,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_nrxysin") < 0)) __PYX_ERR(0, 2726, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_ratio = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_ratio == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
    } else {
      __pyx_v_ratio = ((double)1.);
    }
    if (values[2]) {
      __pyx_v_n = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
    } else {
      __pyx_v_n = ((int)1);
    }
    if (values[3]) {
      __pyx_v_r = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L3_error)
    } else {
      __pyx_v_r = ((double).5);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_nrxysin", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2726, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_242make_nrxysin(__pyx_self, __pyx_v_frequency, __pyx_v_ratio, __pyx_v_n, __pyx_v_r);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_242make_nrxysin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_ratio, int __pyx_v_n, double __pyx_v_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_nrxysin __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nrxysin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.ratio = __pyx_v_ratio;
  __pyx_t_2.n = __pyx_v_n;
  __pyx_t_2.r = __pyx_v_r;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_nrxysin(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2743
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxysin generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_245nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_nrxysin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxysin *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2751
 *     :rtype: float
 *     """
 *     return cclm.mus_nrxysin(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_nrxysin(mus_any gen):
 */
  __pyx_r = mus_nrxysin(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2743
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxysin generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_245nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_244nrxysin, "\n    next sample of nrxysin generator.\n    \n    :param gen: ncos gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_245nrxysin = {"nrxysin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_245nrxysin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_244nrxysin};
static PyObject *__pyx_pw_8pysndlib_3clm_245nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nrxysin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "nrxysin") < 0)) __PYX_ERR(0, 2743, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nrxysin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2743, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_244nrxysin(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_244nrxysin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_nrxysin __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nrxysin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_nrxysin(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2753
 *     return cclm.mus_nrxysin(gen._ptr, fm)
 * 
 * cpdef bint is_nrxysin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxysin.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_247is_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nrxysin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2760
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_nrxysin(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_nrxysin(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2753
 *     return cclm.mus_nrxysin(gen._ptr, fm)
 * 
 * cpdef bint is_nrxysin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxysin.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_247is_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_246is_nrxysin, "\n    returns True if gen is a nrxysin.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_247is_nrxysin = {"is_nrxysin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_247is_nrxysin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_246is_nrxysin};
static PyObject *__pyx_pw_8pysndlib_3clm_247is_nrxysin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_nrxysin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2753, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_nrxysin") < 0)) __PYX_ERR(0, 2753, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_nrxysin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2753, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2753, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_246is_nrxysin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_246is_nrxysin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nrxysin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_nrxysin(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2753, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_nrxysin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2763
 * 
 * 
 * cpdef mus_any make_nrxycos(cython.double frequency , cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxycos generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_249make_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_nrxycos(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_nrxycos *__pyx_optional_args) {
  double __pyx_v_ratio = ((double)1.);
  int __pyx_v_n = ((int)1);
  double __pyx_v_r = ((double).5);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nrxycos", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ratio = __pyx_optional_args->ratio;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_n = __pyx_optional_args->n;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_r = __pyx_optional_args->r;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2775
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('r', r, -1.0, 1.0)
 *     check_range('n', n, 0, None)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2775, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2776
 * 
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)             # <<<<<<<<<<<<<<
 *     check_range('n', n, 0, None)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_neg_1_0;
  __pyx_t_5.high = __pyx_float_1_0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_r, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2777
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)
 *     check_range('n', n, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_int_0;
  __pyx_t_5.high = Py_None;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_n, __pyx_t_3, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2779
 *     check_range('n', n, 0, None)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=0.):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_nrxycos(__pyx_v_frequency, __pyx_v_ratio, __pyx_v_n, __pyx_v_r), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2763
 * 
 * 
 * cpdef mus_any make_nrxycos(cython.double frequency , cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxycos generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_249make_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_248make_nrxycos, "\n    return a new nrxycos generator.\n    \n    :param frequency: frequency of generator\n    :param ratio: ratio between frequency and the spacing between successive sidebands\n    :param n: number of sidebands\n    :param r: amplitude ratio between successive sidebands (-1.0 < r < 1.0)\n    :return: nrxycos gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_249make_nrxycos = {"make_nrxycos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_249make_nrxycos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_248make_nrxycos};
static PyObject *__pyx_pw_8pysndlib_3clm_249make_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_ratio;
  int __pyx_v_n;
  double __pyx_v_r;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_nrxycos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_ratio,&__pyx_n_s_n,&__pyx_n_s_r,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_nrxycos") < 0)) __PYX_ERR(0, 2763, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_ratio = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_ratio == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
    } else {
      __pyx_v_ratio = ((double)1.);
    }
    if (values[2]) {
      __pyx_v_n = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
    } else {
      __pyx_v_n = ((int)1);
    }
    if (values[3]) {
      __pyx_v_r = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L3_error)
    } else {
      __pyx_v_r = ((double).5);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_nrxycos", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2763, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_248make_nrxycos(__pyx_self, __pyx_v_frequency, __pyx_v_ratio, __pyx_v_n, __pyx_v_r);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_248make_nrxycos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_ratio, int __pyx_v_n, double __pyx_v_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_nrxycos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_nrxycos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.ratio = __pyx_v_ratio;
  __pyx_t_2.n = __pyx_v_n;
  __pyx_t_2.r = __pyx_v_r;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_nrxycos(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2781
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxycos generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_251nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_nrxycos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxycos *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2789
 *     :rtype: float
 *     """
 *     return cclm.mus_nrxycos(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_nrxycos(mus_any gen):
 */
  __pyx_r = mus_nrxycos(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2781
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxycos generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_251nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_250nrxycos, "\n    next sample of nrxycos generator.\n    \n    :param gen: ncos gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_251nrxycos = {"nrxycos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_251nrxycos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_250nrxycos};
static PyObject *__pyx_pw_8pysndlib_3clm_251nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nrxycos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "nrxycos") < 0)) __PYX_ERR(0, 2781, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nrxycos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2781, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2781, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_250nrxycos(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_250nrxycos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_nrxycos __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nrxycos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_nrxycos(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2791
 *     return cclm.mus_nrxycos(gen._ptr, fm)
 * 
 * cpdef bint is_nrxycos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxycos.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_253is_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_nrxycos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2798
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_nrxycos(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_nrxycos(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2791
 *     return cclm.mus_nrxycos(gen._ptr, fm)
 * 
 * cpdef bint is_nrxycos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxycos.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_253is_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_252is_nrxycos, "\n    returns True if gen is a nrxycos.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_253is_nrxycos = {"is_nrxycos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_253is_nrxycos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_252is_nrxycos};
static PyObject *__pyx_pw_8pysndlib_3clm_253is_nrxycos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_nrxycos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2791, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_nrxycos") < 0)) __PYX_ERR(0, 2791, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_nrxycos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2791, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2791, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_252is_nrxycos(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_252is_nrxycos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nrxycos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_nrxycos(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2791, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_nrxycos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2802
 * 
 * # ---------------- rxykcos and rxyksin ---------------- #
 * cpdef mus_any make_rxykcos(cython.double frequency, cython.double phase=0.0, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxykcos generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_255make_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rxykcos(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rxykcos *__pyx_optional_args) {
  double __pyx_v_phase = ((double)0.0);
  double __pyx_v_r = ((double).5);
  double __pyx_v_ratio = ((double)1.);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rxykcos", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_phase = __pyx_optional_args->phase;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_r = __pyx_optional_args->r;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_ratio = __pyx_optional_args->ratio;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":2812
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('r', r, -1.0, 1.0)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2812, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2813
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_neg_1_0;
  __pyx_t_5.high = __pyx_float_1_0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_r, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2815
 *     check_range('r', r, -1.0, 1.0)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=0.):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rxykcos(__pyx_v_frequency, __pyx_v_phase, __pyx_v_r, __pyx_v_ratio), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2802
 * 
 * # ---------------- rxykcos and rxyksin ---------------- #
 * cpdef mus_any make_rxykcos(cython.double frequency, cython.double phase=0.0, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxykcos generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_255make_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_254make_rxykcos, "\n    return a new rxykcos generator.\n    \n    :param frequency: frequency of generator\n    :param ratio: ratio between frequency and the spacing between successive sidebands\n    :param r: amplitude ratio between successive sidebands (-1.0 < r < 1.0)\n    :return: rxykcos gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_255make_rxykcos = {"make_rxykcos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_255make_rxykcos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_254make_rxykcos};
static PyObject *__pyx_pw_8pysndlib_3clm_255make_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_phase;
  double __pyx_v_r;
  double __pyx_v_ratio;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_rxykcos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_phase,&__pyx_n_s_r,&__pyx_n_s_ratio,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_rxykcos") < 0)) __PYX_ERR(0, 2802, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
    } else {
      __pyx_v_phase = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_r = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
    } else {
      __pyx_v_r = ((double).5);
    }
    if (values[3]) {
      __pyx_v_ratio = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_ratio == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L3_error)
    } else {
      __pyx_v_ratio = ((double)1.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_rxykcos", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2802, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_254make_rxykcos(__pyx_self, __pyx_v_frequency, __pyx_v_phase, __pyx_v_r, __pyx_v_ratio);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_254make_rxykcos(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_phase, double __pyx_v_r, double __pyx_v_ratio) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_rxykcos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rxykcos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.phase = __pyx_v_phase;
  __pyx_t_2.r = __pyx_v_r;
  __pyx_t_2.ratio = __pyx_v_ratio;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_rxykcos(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2817
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxykcos generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_257rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_rxykcos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxykcos *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2825
 *     :rtype: float
 *     """
 *     return cclm.mus_rxykcos(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_rxykcos(gen: mus_any):
 */
  __pyx_r = mus_rxykcos(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2817
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxykcos generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_257rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_256rxykcos, "\n    next sample of rxykcos generator.\n    \n    :param gen: rxykcos gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_257rxykcos = {"rxykcos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_257rxykcos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_256rxykcos};
static PyObject *__pyx_pw_8pysndlib_3clm_257rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rxykcos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2817, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2817, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rxykcos") < 0)) __PYX_ERR(0, 2817, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2817, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rxykcos", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2817, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2817, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_256rxykcos(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_256rxykcos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_rxykcos __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rxykcos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rxykcos(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2817, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2827
 *     return cclm.mus_rxykcos(gen._ptr, fm)
 * 
 * cpdef bint is_rxykcos(gen: mus_any):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxykcos.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_259is_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rxykcos(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2834
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_rxykcos(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):
 */
  __pyx_r = mus_is_rxykcos(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2827
 *     return cclm.mus_rxykcos(gen._ptr, fm)
 * 
 * cpdef bint is_rxykcos(gen: mus_any):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxykcos.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_259is_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_258is_rxykcos, "\n    returns True if gen is a rxykcos.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_259is_rxykcos = {"is_rxykcos", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_259is_rxykcos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_258is_rxykcos};
static PyObject *__pyx_pw_8pysndlib_3clm_259is_rxykcos(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rxykcos (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2827, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_rxykcos") < 0)) __PYX_ERR(0, 2827, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rxykcos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2827, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 0, "gen", 0))) __PYX_ERR(0, 2827, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_258is_rxykcos(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_258is_rxykcos(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_rxykcos", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_rxykcos(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2827, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_rxykcos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2836
 *     return cclm.mus_is_rxykcos(gen._ptr)
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxyksin generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_261make_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rxyksin(double __pyx_v_frequency, double __pyx_v_phase, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rxyksin *__pyx_optional_args) {
  double __pyx_v_r = ((double).5);
  double __pyx_v_ratio = ((double)1.);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rxyksin", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_r = __pyx_optional_args->r;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_ratio = __pyx_optional_args->ratio;
      }
    }
  }

  /* "pysndlib/clm.pyx":2846
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 *     check_range('r', r, -1.0, 1.0)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2846, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2847
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 *     check_range('r', r, -1.0, 1.0)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_neg_1_0;
  __pyx_t_5.high = __pyx_float_1_0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_r, __pyx_t_4, 0, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2849
 *     check_range('r', r, -1.0, 1.0)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=0.):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rxyksin(__pyx_v_frequency, __pyx_v_phase, __pyx_v_r, __pyx_v_ratio), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2836
 *     return cclm.mus_is_rxykcos(gen._ptr)
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxyksin generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_261make_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_260make_rxyksin, "\n    return a new rxyksin generator.\n    \n    :param frequency: frequency of generator\n    :param ratio: ratio between frequency and the spacing between successive sidebands\n    :param r: amplitude ratio between successive sidebands (-1.0 < r < 1.0)\n    :return: rxyksin gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_261make_rxyksin = {"make_rxyksin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_261make_rxyksin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_260make_rxyksin};
static PyObject *__pyx_pw_8pysndlib_3clm_261make_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_phase;
  double __pyx_v_r;
  double __pyx_v_ratio;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_rxyksin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_phase,&__pyx_n_s_r,&__pyx_n_s_ratio,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_phase)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_rxyksin", 0, 2, 4, 1); __PYX_ERR(0, 2836, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_rxyksin") < 0)) __PYX_ERR(0, 2836, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
    __pyx_v_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_r = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
    } else {
      __pyx_v_r = ((double).5);
    }
    if (values[3]) {
      __pyx_v_ratio = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_ratio == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
    } else {
      __pyx_v_ratio = ((double)1.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_rxyksin", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2836, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_260make_rxyksin(__pyx_self, __pyx_v_frequency, __pyx_v_phase, __pyx_v_r, __pyx_v_ratio);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_260make_rxyksin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_phase, double __pyx_v_r, double __pyx_v_ratio) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_rxyksin __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rxyksin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.r = __pyx_v_r;
  __pyx_t_2.ratio = __pyx_v_ratio;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_rxyksin(__pyx_v_frequency, __pyx_v_phase, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2851
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxyksin generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_263rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_rxyksin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxyksin *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2859
 *     :rtype: float
 *     """
 *     return cclm.mus_rxyksin(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint  is_rxyksin(mus_any gen):
 */
  __pyx_r = mus_rxyksin(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2851
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxyksin generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_263rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_262rxyksin, "\n    next sample of rxyksin generator.\n    \n    :param gen: rxyksin gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_263rxyksin = {"rxyksin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_263rxyksin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_262rxyksin};
static PyObject *__pyx_pw_8pysndlib_3clm_263rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rxyksin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2851, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2851, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rxyksin") < 0)) __PYX_ERR(0, 2851, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2851, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rxyksin", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2851, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2851, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_262rxyksin(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_262rxyksin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_rxyksin __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rxyksin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rxyksin(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2851, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2861
 *     return cclm.mus_rxyksin(gen._ptr, fm)
 * 
 * cpdef bint  is_rxyksin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxyksin.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_265is_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rxyksin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2868
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_rxyksin(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- ssb-am ---------------- #
 */
  __pyx_r = mus_is_rxyksin(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2861
 *     return cclm.mus_rxyksin(gen._ptr, fm)
 * 
 * cpdef bint  is_rxyksin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxyksin.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_265is_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_264is_rxyksin, "\n    returns True if gen is a rxyksin.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_265is_rxyksin = {"is_rxyksin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_265is_rxyksin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_264is_rxyksin};
static PyObject *__pyx_pw_8pysndlib_3clm_265is_rxyksin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rxyksin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2861, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_rxyksin") < 0)) __PYX_ERR(0, 2861, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rxyksin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2861, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2861, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_264is_rxyksin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_264is_rxyksin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_rxyksin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_rxyksin(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2861, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_rxyksin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2871
 * 
 * # ---------------- ssb-am ---------------- #
 * cpdef mus_any make_ssb_am(cython.double frequency, cython.int order=40):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ssb_am generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_267make_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_ssb_am(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_ssb_am *__pyx_optional_args) {
  int __pyx_v_order = ((int)40);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_ssb_am", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_order = __pyx_optional_args->order;
    }
  }

  /* "pysndlib/clm.pyx":2880
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2880, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2882
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig , cython.double  fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_ssb_am(__pyx_v_frequency, __pyx_v_order), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2871
 * 
 * # ---------------- ssb-am ---------------- #
 * cpdef mus_any make_ssb_am(cython.double frequency, cython.int order=40):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ssb_am generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_267make_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_266make_ssb_am, "\n    return a new ssb_am generator.\n    \n    :param frequency: frequency of generator\n    :param order: embedded delay line size\n    :return: ssb_am gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_267make_ssb_am = {"make_ssb_am", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_267make_ssb_am, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_266make_ssb_am};
static PyObject *__pyx_pw_8pysndlib_3clm_267make_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  int __pyx_v_order;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_ssb_am (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_order,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_order);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_ssb_am") < 0)) __PYX_ERR(0, 2871, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_order = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L3_error)
    } else {
      __pyx_v_order = ((int)40);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_ssb_am", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2871, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_266make_ssb_am(__pyx_self, __pyx_v_frequency, __pyx_v_order);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_266make_ssb_am(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, int __pyx_v_order) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_ssb_am __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_ssb_am", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.order = __pyx_v_order;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_ssb_am(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2884
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig , cython.double  fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_269ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_ssb_am(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ssb_am *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2892
 *     :rtype: float
 *     """
 *     return cclm.mus_ssb_am(gen._ptr, insig, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_ssb_am(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2884
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig , cython.double  fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_269ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_268ssb_am, "\n    get the next sample from ssb_am generator.\n    \n    :param gen: ssb_am gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_269ssb_am = {"ssb_am", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_269ssb_am, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_268ssb_am};
static PyObject *__pyx_pw_8pysndlib_3clm_269ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ssb_am (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("ssb_am", 0, 2, 3, 1); __PYX_ERR(0, 2884, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ssb_am") < 0)) __PYX_ERR(0, 2884, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ssb_am", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2884, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2884, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_268ssb_am(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_268ssb_am(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_ssb_am __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ssb_am", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ssb_am(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2884, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2895
 * 
 * 
 * cpdef cython.double ssb_am_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator. unmodulated.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_271ssb_am_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_ssb_am_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2902
 *     :rtype: float
 *     """
 *     return cclm.mus_ssb_am_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_ssb_am(mus_any gen):
 */
  __pyx_r = mus_ssb_am_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2895
 * 
 * 
 * cpdef cython.double ssb_am_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator. unmodulated.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_271ssb_am_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_270ssb_am_unmodulated, "\n    get the next sample from ssb_am generator. unmodulated.\n    \n    :param gen: ssb_am gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_271ssb_am_unmodulated = {"ssb_am_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_271ssb_am_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_270ssb_am_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_271ssb_am_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ssb_am_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("ssb_am_unmodulated", 1, 2, 2, 1); __PYX_ERR(0, 2895, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ssb_am_unmodulated") < 0)) __PYX_ERR(0, 2895, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ssb_am_unmodulated", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2895, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ssb_am_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2895, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_270ssb_am_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_270ssb_am_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ssb_am_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ssb_am_unmodulated(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.ssb_am_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2904
 *     return cclm.mus_ssb_am_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_ssb_am(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ssb_am.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_273is_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_ssb_am(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2911
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_ssb_am(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_ssb_am(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2904
 *     return cclm.mus_ssb_am_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_ssb_am(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ssb_am.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_273is_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_272is_ssb_am, "\n    returns True if gen is a ssb_am.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_273is_ssb_am = {"is_ssb_am", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_273is_ssb_am, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_272is_ssb_am};
static PyObject *__pyx_pw_8pysndlib_3clm_273is_ssb_am(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ssb_am (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2904, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_ssb_am") < 0)) __PYX_ERR(0, 2904, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_ssb_am", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2904, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2904, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_272is_ssb_am(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_272is_ssb_am(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ssb_am", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_ssb_am(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2904, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_ssb_am", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2916
 * 
 * # ---------------- wave-train ----------------#
 * cpdef mus_any make_wave_train(cython.double frequency, wave=None, cython.double initial_phase=0., Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate
 */

static PyObject *__pyx_pw_8pysndlib_3clm_275make_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_wave_train(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_wave_train *__pyx_optional_args) {
  PyObject *__pyx_v_wave = ((PyObject *)Py_None);
  double __pyx_v_initial_phase = ((double)0.);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__40;
  __Pyx_memviewslice __pyx_v_wave_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  double __pyx_t_6;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_7;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_wave_train", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_wave = __pyx_optional_args->wave;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_phase = __pyx_optional_args->initial_phase;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_interp_type = __pyx_optional_args->interp_type;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_wave);

  /* "pysndlib/clm.pyx":2928
 *     :rtype: mus_any
 *     """
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_wave); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":2929
 *     """
 *     if isinstance(wave, list):
 *         wave = np.array(wave)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(wave)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_wave};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_wave, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":2928
 *     :rtype: mus_any
 *     """
 *     if isinstance(wave, list):             # <<<<<<<<<<<<<<
 *         wave = np.array(wave)
 * 
 */
  }

  /* "pysndlib/clm.pyx":2931
 *         wave = np.array(wave)
 * 
 *     check_ndim(wave)             # <<<<<<<<<<<<<<
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_wave, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":2932
 * 
 *     check_ndim(wave)
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] wave_view = wave
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2932, __pyx_L1_error)
  __pyx_t_4 = PyFloat_FromDouble((__pyx_t_6 / 2.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.low = __pyx_float_0_0;
  __pyx_t_7.high = __pyx_t_4;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2934
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     cdef double [:] wave_view = wave             # <<<<<<<<<<<<<<
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, initial_phase, &wave_view[0], len(wave), <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(wave)
 */
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_wave, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2934, __pyx_L1_error)
  __pyx_v_wave_view = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "pysndlib/clm.pyx":2935
 * 
 *     cdef double [:] wave_view = wave
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, initial_phase, &wave_view[0], len(wave), <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     gen.cache_append(wave)
 *     return gen
 */
  __pyx_t_9 = 0;
  __pyx_t_5 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_v_wave_view.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_v_wave_view.shape[0])) __pyx_t_5 = 0;
  if (unlikely(__pyx_t_5 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_5);
    __PYX_ERR(0, 2935, __pyx_L1_error)
  }
  __pyx_t_10 = PyObject_Length(__pyx_v_wave); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2935, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_wave_train(__pyx_v_frequency, __pyx_v_initial_phase, (&(*((double *) ( /* dim=0 */ (__pyx_v_wave_view.data + __pyx_t_9 * __pyx_v_wave_view.strides[0]) )))), __pyx_t_10, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2936
 *     cdef double [:] wave_view = wave
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, initial_phase, &wave_view[0], len(wave), <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(wave)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_wave, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":2937
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, initial_phase, &wave_view[0], len(wave), <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(wave)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2916
 * 
 * # ---------------- wave-train ----------------#
 * cpdef mus_any make_wave_train(cython.double frequency, wave=None, cython.double initial_phase=0., Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_wave_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_wave);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_275make_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_274make_wave_train, "\n    return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate\n    of the wave found \\in wave. successive waves can overlap.\n    \n    :param frequency: frequency of gen \\in hz\n    :param wave: np.ndarray if provided is waveform\n    :param initial_phase: initial phase of gen \\in radians\n    :param interp_type: type of interpolation used\n    :return: wave_train gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_275make_wave_train = {"make_wave_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_275make_wave_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_274make_wave_train};
static PyObject *__pyx_pw_8pysndlib_3clm_275make_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  PyObject *__pyx_v_wave = 0;
  double __pyx_v_initial_phase;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_wave_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_wave,&__pyx_n_s_initial_phase,&__pyx_n_s_interp_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_wave);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_phase);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_wave_train") < 0)) __PYX_ERR(0, 2916, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
    __pyx_v_wave = values[1];
    if (values[2]) {
      __pyx_v_initial_phase = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_initial_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
    } else {
      __pyx_v_initial_phase = ((double)0.);
    }
    if (values[3]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2916, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__40;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_wave_train", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2916, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_274make_wave_train(__pyx_self, __pyx_v_frequency, __pyx_v_wave, __pyx_v_initial_phase, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_274make_wave_train(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_wave, double __pyx_v_initial_phase, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_wave_train __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_wave_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.wave = __pyx_v_wave;
  __pyx_t_2.initial_phase = __pyx_v_initial_phase;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_wave_train(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2939
 *     return gen
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_277wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_wave_train(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_wave_train *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":2947
 *     :rtype: float
 *     """
 *     return cclm.mus_wave_train(gen._ptr, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_wave_train(__pyx_v_gen->_ptr, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2939
 *     return gen
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_277wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_276wave_train, "\n    next sample of wave_train.\n    \n    :param gen: wave_train gen\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_277wave_train = {"wave_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_277wave_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_276wave_train};
static PyObject *__pyx_pw_8pysndlib_3clm_277wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wave_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wave_train") < 0)) __PYX_ERR(0, 2939, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wave_train", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2939, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2939, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_276wave_train(__pyx_self, __pyx_v_gen, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_276wave_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_wave_train __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wave_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_wave_train(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2950
 * 
 * 
 * cpdef cython.double wave_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_279wave_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_wave_train_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":2957
 *     :rtype: float
 *     """
 *     return cclm.mus_wave_train_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_wave_train(mus_any gen):
 */
  __pyx_r = mus_wave_train_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2950
 * 
 * 
 * cpdef cython.double wave_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_279wave_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_278wave_train_unmodulated, "\n    next sample of wave_train. unmodulated\n    \n    :param gen: wave_train gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_279wave_train_unmodulated = {"wave_train_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_279wave_train_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_278wave_train_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_279wave_train_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wave_train_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2950, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wave_train_unmodulated") < 0)) __PYX_ERR(0, 2950, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wave_train_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2950, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.wave_train_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2950, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_278wave_train_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_278wave_train_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wave_train_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_wave_train_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2950, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.wave_train_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2959
 *     return cclm.mus_wave_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_wave_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a wave_train.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_281is_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_wave_train(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":2966
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_wave_train(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_wave_train(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2959
 *     return cclm.mus_wave_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_wave_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a wave_train.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_281is_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_280is_wave_train, "\n    returns True if gen is a wave_train.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_281is_wave_train = {"is_wave_train", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_281is_wave_train, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_280is_wave_train};
static PyObject *__pyx_pw_8pysndlib_3clm_281is_wave_train(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_wave_train (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2959, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_wave_train") < 0)) __PYX_ERR(0, 2959, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_wave_train", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2959, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 2959, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_280is_wave_train(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_280is_wave_train(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_wave_train", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_wave_train(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2959, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_wave_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2969
 * 
 * 
 * cpdef mus_any make_wave_train_with_env(cython.double frequency, envelope, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator with the envelope loaded \in with size.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_283make_wave_train_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_wave_train_with_env(double __pyx_v_frequency, PyObject *__pyx_v_envelope, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_wave_train_with_env *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_v_wave = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e = NULL;
  PyObject *__pyx_v_i = NULL;
  __Pyx_memviewslice __pyx_v_wave_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_12;
  mus_long_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_wave_train_with_env", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  __Pyx_INCREF(__pyx_v_size);

  /* "pysndlib/clm.pyx":2980
 * 
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     size = size or default.table_size
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2980, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2982
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     size = size or default.table_size             # <<<<<<<<<<<<<<
 *     wave = np.zeros(size)
 *     e = make_env(envelope, length=size)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2982, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __Pyx_INCREF(__pyx_v_size);
    __pyx_t_4 = __pyx_v_size;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_table_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2983
 * 
 *     size = size or default.table_size
 *     wave = np.zeros(size)             # <<<<<<<<<<<<<<
 *     e = make_env(envelope, length=size)
 *     for i in range(size):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_size};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_wave = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":2984
 *     size = size or default.table_size
 *     wave = np.zeros(size)
 *     e = make_env(envelope, length=size)             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         wave[i] = env(e)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_make_env); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_envelope);
  __Pyx_GIVEREF(__pyx_v_envelope);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_envelope)) __PYX_ERR(0, 2984, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_length, __pyx_v_size) < 0) __PYX_ERR(0, 2984, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 2984, __pyx_L1_error)
  __pyx_v_e = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":2985
 *     wave = np.zeros(size)
 *     e = make_env(envelope, length=size)
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         wave[i] = env(e)
 *     cdef double [:] wave_view = wave
 */
  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2985, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2985, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2985, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2985, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2985, __pyx_L1_error)
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      }
    } else {
      __pyx_t_8 = __pyx_t_10(__pyx_t_1);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2985, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":2986
 *     e = make_env(envelope, length=size)
 *     for i in range(size):
 *         wave[i] = env(e)             # <<<<<<<<<<<<<<
 *     cdef double [:] wave_view = wave
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, 0.0, &wave_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_env(__pyx_v_e, 0); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2986, __pyx_L1_error)
    __pyx_t_8 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely((PyObject_SetItem(__pyx_v_wave, __pyx_v_i, __pyx_t_8) < 0))) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":2985
 *     wave = np.zeros(size)
 *     e = make_env(envelope, length=size)
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         wave[i] = env(e)
 *     cdef double [:] wave_view = wave
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2987
 *     for i in range(size):
 *         wave[i] = env(e)
 *     cdef double [:] wave_view = wave             # <<<<<<<<<<<<<<
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, 0.0, &wave_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 *     gen.cache_append(wave)
 */
  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_wave, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 2987, __pyx_L1_error)
  __pyx_v_wave_view = __pyx_t_11;
  __pyx_t_11.memview = NULL;
  __pyx_t_11.data = NULL;

  /* "pysndlib/clm.pyx":2988
 *         wave[i] = env(e)
 *     cdef double [:] wave_view = wave
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, 0.0, &wave_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))             # <<<<<<<<<<<<<<
 *     gen.cache_append(wave)
 *     return gen
 */
  __pyx_t_12 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_wave_view.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_wave_view.shape[0])) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    __PYX_ERR(0, 2988, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_13 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2988, __pyx_L1_error)
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_wave_train(__pyx_v_frequency, 0.0, (&(*((double *) ( /* dim=0 */ (__pyx_v_wave_view.data + __pyx_t_12 * __pyx_v_wave_view.strides[0]) )))), __pyx_t_13, ((mus_interp_t)__pyx_e_8pysndlib_3clm_LINEAR)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2989
 *     cdef double [:] wave_view = wave
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, 0.0, &wave_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 *     gen.cache_append(wave)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_wave, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":2990
 *     gen = mus_any.from_ptr(cclm.mus_make_wave_train(frequency, 0.0, &wave_view[0], size, <cclm.mus_interp_t>Interp.LINEAR))
 *     gen.cache_append(wave)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * # ---------------- rand, rand_interp ---------------- #
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":2969
 * 
 * 
 * cpdef mus_any make_wave_train_with_env(cython.double frequency, envelope, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator with the envelope loaded \in with size.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wave);
  __Pyx_XDECREF((PyObject *)__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_i);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_wave_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_283make_wave_train_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_282make_wave_train_with_env, "\n    return a new wave-train generator with the envelope loaded \\in with size.\n    \n    :param frequency: frequency of gen \\in hz\n    :param env: envelope shape to load into generator\n    :param size: size of wave derived from envelope\n    :return: wave_train gen\n    :rtype: mus_any\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_283make_wave_train_with_env = {"make_wave_train_with_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_283make_wave_train_with_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_282make_wave_train_with_env};
static PyObject *__pyx_pw_8pysndlib_3clm_283make_wave_train_with_env(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  PyObject *__pyx_v_envelope = 0;
  PyObject *__pyx_v_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_wave_train_with_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_envelope,&__pyx_n_s_size,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2969, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_envelope)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2969, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_wave_train_with_env", 0, 2, 3, 1); __PYX_ERR(0, 2969, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2969, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_wave_train_with_env") < 0)) __PYX_ERR(0, 2969, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2969, __pyx_L3_error)
    __pyx_v_envelope = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_wave_train_with_env", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2969, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_282make_wave_train_with_env(__pyx_self, __pyx_v_frequency, __pyx_v_envelope, __pyx_v_size);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_282make_wave_train_with_env(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, PyObject *__pyx_v_envelope, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_wave_train_with_env __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_wave_train_with_env", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_wave_train_with_env(__pyx_v_frequency, __pyx_v_envelope, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_wave_train_with_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":2993
 * 
 * # ---------------- rand, rand_interp ---------------- #
 * cpdef mus_any make_rand(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand generator, producing a sequence of random numbers (a step  function). frequency
 */

static PyObject *__pyx_pw_8pysndlib_3clm_285make_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rand(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rand *__pyx_optional_args) {
  double __pyx_v_amplitude = ((double)1.0);
  PyObject *__pyx_v_distribution = ((PyObject *)Py_None);
  __Pyx_memviewslice __pyx_v_distribution_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rand", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amplitude = __pyx_optional_args->amplitude;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_distribution = __pyx_optional_args->distribution;
      }
    }
  }

  /* "pysndlib/clm.pyx":3004
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate())             # <<<<<<<<<<<<<<
 *     cdef double [:] distribution_view = None
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3004, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3005
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate())
 *     cdef double [:] distribution_view = None             # <<<<<<<<<<<<<<
 * 
 *     if distribution:
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __pyx_v_distribution_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":3007
 *     cdef double [:] distribution_view = None
 * 
 *     if distribution:             # <<<<<<<<<<<<<<
 *         check_ndim(distribution)
 *         distribution_view = distribution
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_distribution); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3007, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":3008
 * 
 *     if distribution:
 *         check_ndim(distribution)             # <<<<<<<<<<<<<<
 *         distribution_view = distribution
 *         gen =  mus_any.from_ptr(cclm.mus_make_rand_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 */
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_distribution, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3009
 *     if distribution:
 *         check_ndim(distribution)
 *         distribution_view = distribution             # <<<<<<<<<<<<<<
 *         gen =  mus_any.from_ptr(cclm.mus_make_rand_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)
 */
    __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_distribution, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_distribution_view, 1);
    __pyx_v_distribution_view = __pyx_t_6;
    __pyx_t_6.memview = NULL;
    __pyx_t_6.data = NULL;

    /* "pysndlib/clm.pyx":3010
 *         check_ndim(distribution)
 *         distribution_view = distribution
 *         gen =  mus_any.from_ptr(cclm.mus_make_rand_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))             # <<<<<<<<<<<<<<
 *         gen.cache_append(distribution)
 *         return gen
 */
    __pyx_t_8 = 0;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_v_distribution_view.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_v_distribution_view.shape[0])) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      __PYX_ERR(0, 3010, __pyx_L1_error)
    }
    __pyx_t_10 = PyObject_Length(__pyx_v_distribution); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3010, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rand_with_distribution(__pyx_v_frequency, __pyx_v_amplitude, (&(*((double *) ( /* dim=0 */ (__pyx_v_distribution_view.data + __pyx_t_8 * __pyx_v_distribution_view.strides[0]) )))), __pyx_t_10), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3011
 *         distribution_view = distribution
 *         gen =  mus_any.from_ptr(cclm.mus_make_rand_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)             # <<<<<<<<<<<<<<
 *         return gen
 *     else:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_distribution, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3012
 *         gen =  mus_any.from_ptr(cclm.mus_make_rand_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)
 *         return gen             # <<<<<<<<<<<<<<
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_gen);
    __pyx_r = __pyx_v_gen;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3007
 *     cdef double [:] distribution_view = None
 * 
 *     if distribution:             # <<<<<<<<<<<<<<
 *         check_ndim(distribution)
 *         distribution_view = distribution
 */
  }

  /* "pysndlib/clm.pyx":3014
 *         return gen
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=0.0):
 */
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rand(__pyx_v_frequency, __pyx_v_amplitude), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":2993
 * 
 * # ---------------- rand, rand_interp ---------------- #
 * cpdef mus_any make_rand(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand generator, producing a sequence of random numbers (a step  function). frequency
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_distribution_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_285make_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_284make_rand, "\n    return a new rand generator, producing a sequence of random numbers (a step  function). frequency\n    is the rate at which new numbers are chosen.\n    \n    :param frequency: frequency at which new random numbers occur\n    :param amplitude: numbers are between -amplitude and amplitude\n    :param distribution: distribution envelope\n    :return: rand gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_285make_rand = {"make_rand", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_285make_rand, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_284make_rand};
static PyObject *__pyx_pw_8pysndlib_3clm_285make_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  PyObject *__pyx_v_distribution = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_rand (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_distribution,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_distribution);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_rand") < 0)) __PYX_ERR(0, 2993, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    __pyx_v_distribution = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_rand", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2993, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_284make_rand(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_distribution);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_284make_rand(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, PyObject *__pyx_v_distribution) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_rand __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rand", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.distribution = __pyx_v_distribution;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_rand(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3016
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_287rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_rand(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand *__pyx_optional_args) {
  double __pyx_v_sweep = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sweep = __pyx_optional_args->sweep;
    }
  }

  /* "pysndlib/clm.pyx":3025
 * 
 *     """
 *     return cclm.mus_rand(gen._ptr, sweep)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double rand_unmodulated(mus_any gen):
 */
  __pyx_r = mus_rand(__pyx_v_gen->_ptr, __pyx_v_sweep);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3016
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_287rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_286rand, "\n    gen's current random number. sweep modulates the rate at which the current number is changed.\n    \n    :param gen: rand gen\n    :param sweep: fm\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_287rand = {"rand", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_287rand, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_286rand};
static PyObject *__pyx_pw_8pysndlib_3clm_287rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_sweep;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rand (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_sweep,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3016, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sweep);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3016, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rand") < 0)) __PYX_ERR(0, 3016, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_sweep = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sweep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3016, __pyx_L3_error)
    } else {
      __pyx_v_sweep = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rand", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3016, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3016, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_286rand(__pyx_self, __pyx_v_gen, __pyx_v_sweep);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_286rand(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sweep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_rand __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.sweep = __pyx_v_sweep;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rand(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3016, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3027
 *     return cclm.mus_rand(gen._ptr, sweep)
 * 
 * cpdef cython.double rand_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_289rand_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_rand_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3035
 * 
 *     """
 *     return cclm.mus_rand_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_rand(mus_any gen):
 */
  __pyx_r = mus_rand_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3027
 *     return cclm.mus_rand(gen._ptr, sweep)
 * 
 * cpdef cython.double rand_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_289rand_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_288rand_unmodulated, "\n    gen's current random number. sweep modulates the rate at which the current number is changed. unmodulated\n    \n    :param gen: rand gen\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_289rand_unmodulated = {"rand_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_289rand_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_288rand_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_289rand_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rand_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3027, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rand_unmodulated") < 0)) __PYX_ERR(0, 3027, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rand_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3027, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rand_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3027, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_288rand_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_288rand_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rand_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3027, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.rand_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3037
 *     return cclm.mus_rand_unmodulated(gen._ptr)
 * 
 * cpdef bint is_rand(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_291is_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rand(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3044
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_rand(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):
 */
  __pyx_r = mus_is_rand(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3037
 *     return cclm.mus_rand_unmodulated(gen._ptr)
 * 
 * cpdef bint is_rand(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_291is_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_290is_rand, "\n    returns True if gen is a rand.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_291is_rand = {"is_rand", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_291is_rand, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_290is_rand};
static PyObject *__pyx_pw_8pysndlib_3clm_291is_rand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rand (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3037, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_rand") < 0)) __PYX_ERR(0, 3037, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rand", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3037, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3037, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_290is_rand(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_290is_rand(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_rand", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_rand(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3037, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3046
 *     return cclm.mus_is_rand(gen._ptr)
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand_interp generator, producing linearly interpolated random numbers. frequency is
 */

static PyObject *__pyx_pw_8pysndlib_3clm_293make_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_rand_interp(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_rand_interp *__pyx_optional_args) {
  double __pyx_v_amplitude = ((double)1.0);
  PyObject *__pyx_v_distribution = ((PyObject *)Py_None);
  __Pyx_memviewslice __pyx_v_distribution_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rand_interp", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amplitude = __pyx_optional_args->amplitude;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_distribution = __pyx_optional_args->distribution;
      }
    }
  }

  /* "pysndlib/clm.pyx":3057
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate())             # <<<<<<<<<<<<<<
 *     cdef double [:] distribution_view = None
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3057, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3058
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate())
 *     cdef double [:] distribution_view = None             # <<<<<<<<<<<<<<
 * 
 *     if distribution:
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __pyx_v_distribution_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":3060
 *     cdef double [:] distribution_view = None
 * 
 *     if distribution:             # <<<<<<<<<<<<<<
 *         check_ndim(distribution)
 *         distribution_view = distribution
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_distribution); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3060, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":3061
 * 
 *     if distribution:
 *         check_ndim(distribution)             # <<<<<<<<<<<<<<
 *         distribution_view = distribution
 *         gen = mus_any.from_ptr(cclm.mus_make_rand_interp_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 */
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_distribution, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3062
 *     if distribution:
 *         check_ndim(distribution)
 *         distribution_view = distribution             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_rand_interp_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)
 */
    __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_distribution, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_distribution_view, 1);
    __pyx_v_distribution_view = __pyx_t_6;
    __pyx_t_6.memview = NULL;
    __pyx_t_6.data = NULL;

    /* "pysndlib/clm.pyx":3063
 *         check_ndim(distribution)
 *         distribution_view = distribution
 *         gen = mus_any.from_ptr(cclm.mus_make_rand_interp_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))             # <<<<<<<<<<<<<<
 *         gen.cache_append(distribution)
 *         return gen
 */
    __pyx_t_8 = 0;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_v_distribution_view.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_v_distribution_view.shape[0])) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      __PYX_ERR(0, 3063, __pyx_L1_error)
    }
    __pyx_t_10 = PyObject_Length(__pyx_v_distribution); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3063, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rand_interp_with_distribution(__pyx_v_frequency, __pyx_v_amplitude, (&(*((double *) ( /* dim=0 */ (__pyx_v_distribution_view.data + __pyx_t_8 * __pyx_v_distribution_view.strides[0]) )))), __pyx_t_10), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3064
 *         distribution_view = distribution
 *         gen = mus_any.from_ptr(cclm.mus_make_rand_interp_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)             # <<<<<<<<<<<<<<
 *         return gen
 *     else:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_distribution, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":3065
 *         gen = mus_any.from_ptr(cclm.mus_make_rand_interp_with_distribution(frequency, amplitude, &distribution_view[0], len(distribution)))
 *         gen.cache_append(distribution)
 *         return gen             # <<<<<<<<<<<<<<
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_gen);
    __pyx_r = __pyx_v_gen;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3060
 *     cdef double [:] distribution_view = None
 * 
 *     if distribution:             # <<<<<<<<<<<<<<
 *         check_ndim(distribution)
 *         distribution_view = distribution
 */
  }

  /* "pysndlib/clm.pyx":3067
 *         return gen
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))             # <<<<<<<<<<<<<<
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=0.):
 */
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_rand_interp(__pyx_v_frequency, __pyx_v_amplitude), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":3046
 *     return cclm.mus_is_rand(gen._ptr)
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand_interp generator, producing linearly interpolated random numbers. frequency is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_distribution_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_293make_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_292make_rand_interp, "\n    return a new rand_interp generator, producing linearly interpolated random numbers. frequency is\n    the rate at which new end-points are chosen.\n    \n    :param frequency: frequency at which new random numbers occur\n    :param amplitude: numbers are between -amplitude and amplitude\n    :param distribution: distribution envelope\n    :return: rand_interp gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_293make_rand_interp = {"make_rand_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_293make_rand_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_292make_rand_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_293make_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_amplitude;
  PyObject *__pyx_v_distribution = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_rand_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_amplitude,&__pyx_n_s_distribution,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amplitude);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_distribution);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_rand_interp") < 0)) __PYX_ERR(0, 3046, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_amplitude = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_amplitude == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L3_error)
    } else {
      __pyx_v_amplitude = ((double)1.0);
    }
    __pyx_v_distribution = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_rand_interp", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3046, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_292make_rand_interp(__pyx_self, __pyx_v_frequency, __pyx_v_amplitude, __pyx_v_distribution);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_292make_rand_interp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_amplitude, PyObject *__pyx_v_distribution) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_rand_interp __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_rand_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.amplitude = __pyx_v_amplitude;
  __pyx_t_2.distribution = __pyx_v_distribution;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_rand_interp(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3069
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=0.):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */

static PyObject *__pyx_pw_8pysndlib_3clm_295rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rand_interp(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand_interp *__pyx_optional_args) {
  double __pyx_v_sweep = ((double)0.);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand_interp", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sweep = __pyx_optional_args->sweep;
    }
  }

  /* "pysndlib/clm.pyx":3078
 *     :rtype: float
 *     """
 *     return cclm.mus_rand_interp(gen._ptr, sweep)             # <<<<<<<<<<<<<<
 * 
 * cpdef rand_interp_unmodulated(mus_any gen):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_rand_interp(__pyx_v_gen->_ptr, __pyx_v_sweep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3069
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=0.):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_295rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_294rand_interp, "\n    gen's current (interpolating) random number. fm modulates the rate at which new segment end-points\n    are chosen.\n    \n    :param gen: rand_interp gen\n    :param sweep: fm \n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_295rand_interp = {"rand_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_295rand_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_294rand_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_295rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_sweep;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rand_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_sweep,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3069, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sweep);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3069, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rand_interp") < 0)) __PYX_ERR(0, 3069, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_sweep = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sweep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3069, __pyx_L3_error)
    } else {
      __pyx_v_sweep = ((double)0.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rand_interp", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3069, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3069, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_294rand_interp(__pyx_self, __pyx_v_gen, __pyx_v_sweep);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_294rand_interp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sweep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_rand_interp __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.sweep = __pyx_v_sweep;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rand_interp(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3080
 *     return cclm.mus_rand_interp(gen._ptr, sweep)
 * 
 * cpdef rand_interp_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */

static PyObject *__pyx_pw_8pysndlib_3clm_297rand_interp_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_rand_interp_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand_interp_unmodulated", 1);

  /* "pysndlib/clm.pyx":3088
 *     :rtype: float
 *     """
 *     return cclm.mus_rand_interp_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(mus_rand_interp_unmodulated(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3080
 *     return cclm.mus_rand_interp(gen._ptr, sweep)
 * 
 * cpdef rand_interp_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rand_interp_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_297rand_interp_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_296rand_interp_unmodulated, "\n    gen's current (interpolating) random number. fm modulates the rate at which new segment end-points\n    are chosen. unmodulated\n    \n    :param gen: rand_interp gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_297rand_interp_unmodulated = {"rand_interp_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_297rand_interp_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_296rand_interp_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_297rand_interp_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rand_interp_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3080, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rand_interp_unmodulated") < 0)) __PYX_ERR(0, 3080, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rand_interp_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3080, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.rand_interp_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3080, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_296rand_interp_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_296rand_interp_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand_interp_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_rand_interp_unmodulated(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.rand_interp_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3091
 * 
 * 
 * cpdef bint is_rand_interp(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand_interp.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_299is_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_rand_interp(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3097
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_rand_interp(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_rand_interp(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3091
 * 
 * 
 * cpdef bint is_rand_interp(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand_interp.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_299is_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_298is_rand_interp, "\n    returns True if gen is a rand_interp.\n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_299is_rand_interp = {"is_rand_interp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_299is_rand_interp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_298is_rand_interp};
static PyObject *__pyx_pw_8pysndlib_3clm_299is_rand_interp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rand_interp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3091, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_rand_interp") < 0)) __PYX_ERR(0, 3091, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rand_interp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3091, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3091, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_298is_rand_interp(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_298is_rand_interp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_rand_interp", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_rand_interp(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3091, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_rand_interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3101
 * 
 * # ---------------- simple filters ---------------- #
 * cpdef mus_any make_one_pole(cython.double a0, cython.double b1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole filter: y(n) = a0 x(n) - b1 y(n-1)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_301make_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_pole(double __pyx_v_a0, double __pyx_v_b1, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_pole", 1);

  /* "pysndlib/clm.pyx":3112
 *     """
 * 
 *     return mus_any.from_ptr(cclm.mus_make_one_pole(a0, b1))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_one_pole(__pyx_v_a0, __pyx_v_b1), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3101
 * 
 * # ---------------- simple filters ---------------- #
 * cpdef mus_any make_one_pole(cython.double a0, cython.double b1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole filter: y(n) = a0 x(n) - b1 y(n-1)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_301make_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_300make_one_pole, "\n    return a new one_pole filter: y(n) = a0 x(n) - b1 y(n-1)\n    b1 < 0.0 gives lowpass, b1 > 0.0 gives highpass.\n    \n    :param a0: coefficient\n    :param b1: coefficient\n    :return: one_pole gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_301make_one_pole = {"make_one_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_301make_one_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_300make_one_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_301make_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_a0;
  double __pyx_v_b1;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_one_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a0,&__pyx_n_s_b1,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a0)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_b1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_one_pole", 1, 2, 2, 1); __PYX_ERR(0, 3101, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_one_pole") < 0)) __PYX_ERR(0, 3101, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_a0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
    __pyx_v_b1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_one_pole", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3101, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_300make_one_pole(__pyx_self, __pyx_v_a0, __pyx_v_b1);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_300make_one_pole(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_b1) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_one_pole(__pyx_v_a0, __pyx_v_b1, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3116
 * 
 * 
 * cpdef cython.double one_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole filter of input.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_303one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3125
 *     """
 * 
 *     return cclm.mus_one_pole(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_one_pole(mus_any gen):
 */
  __pyx_r = mus_one_pole(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3116
 * 
 * 
 * cpdef cython.double one_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole filter of input.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_303one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_302one_pole, "\n    one pole filter of input.\n    \n    :param gen: one_pole gen\n    :param insig: input \n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_303one_pole = {"one_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_303one_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_302one_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_303one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("one_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3116, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3116, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("one_pole", 1, 2, 2, 1); __PYX_ERR(0, 3116, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "one_pole") < 0)) __PYX_ERR(0, 3116, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3116, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("one_pole", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3116, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3116, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_302one_pole(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_302one_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("one_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_one_pole(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3116, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3127
 *     return cclm.mus_one_pole(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_305is_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3134
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_one_pole(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_one_pole(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3127
 *     return cclm.mus_one_pole(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_305is_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_304is_one_pole, "\n    returns True if gen is a one_pole.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_305is_one_pole = {"is_one_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_305is_one_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_304is_one_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_305is_one_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_one_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3127, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_one_pole") < 0)) __PYX_ERR(0, 3127, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_one_pole", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3127, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3127, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_304is_one_pole(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_304is_one_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_one_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_one_pole(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3127, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_one_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3137
 * 
 * 
 * cpdef mus_any make_one_zero(cython.double a0 , cython.double a1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_zero filter: y(n) = a0 x(n) + a1 x(n-1)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_307make_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_zero(double __pyx_v_a0, double __pyx_v_a1, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_zero", 1);

  /* "pysndlib/clm.pyx":3147
 *     :rtype: mus_any
 *     """
 *     return mus_any.from_ptr(cclm.mus_make_one_zero(a0, a1))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double one_zero(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_one_zero(__pyx_v_a0, __pyx_v_a1), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3137
 * 
 * 
 * cpdef mus_any make_one_zero(cython.double a0 , cython.double a1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_zero filter: y(n) = a0 x(n) + a1 x(n-1)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_307make_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_306make_one_zero, "\n    return a new one_zero filter: y(n) = a0 x(n) + a1 x(n-1)\n    a1 > 0.0 gives weak lowpass, a1 < 0.0 highpass.\n    \n    :param a0: coefficient\n    :param a1: coefficient\n    :return: one_pole gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_307make_one_zero = {"make_one_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_307make_one_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_306make_one_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_307make_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_a0;
  double __pyx_v_a1;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_one_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a0,&__pyx_n_s_a1,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a0)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3137, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3137, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_one_zero", 1, 2, 2, 1); __PYX_ERR(0, 3137, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_one_zero") < 0)) __PYX_ERR(0, 3137, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_a0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3137, __pyx_L3_error)
    __pyx_v_a1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_a1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3137, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_one_zero", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3137, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_306make_one_zero(__pyx_self, __pyx_v_a0, __pyx_v_a1);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_306make_one_zero(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_a1) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_one_zero(__pyx_v_a0, __pyx_v_a1, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3149
 *     return mus_any.from_ptr(cclm.mus_make_one_zero(a0, a1))
 * 
 * cpdef cython.double one_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one zero filter of input.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_309one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3157
 *     :rtype: float
 *     """
 *     return cclm.mus_one_zero(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_one_zero(mus_any gen):
 */
  __pyx_r = mus_one_zero(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3149
 *     return mus_any.from_ptr(cclm.mus_make_one_zero(a0, a1))
 * 
 * cpdef cython.double one_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one zero filter of input.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_309one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_308one_zero, "\n    one zero filter of input.\n    \n    :param gen: one_zero gen\n    :param insig: input \n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_309one_zero = {"one_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_309one_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_308one_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_309one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("one_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3149, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3149, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("one_zero", 1, 2, 2, 1); __PYX_ERR(0, 3149, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "one_zero") < 0)) __PYX_ERR(0, 3149, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3149, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("one_zero", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3149, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_308one_zero(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_308one_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("one_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_one_zero(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3149, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3159
 *     return cclm.mus_one_zero(gen._ptr, insig)
 * 
 * cpdef bint is_one_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_zero.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_311is_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3166
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_one_zero(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_one_zero(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3159
 *     return cclm.mus_one_zero(gen._ptr, insig)
 * 
 * cpdef bint is_one_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_zero.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_311is_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_310is_one_zero, "\n    returns True if gen is a one_zero.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_311is_one_zero = {"is_one_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_311is_one_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_310is_one_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_311is_one_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_one_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3159, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_one_zero") < 0)) __PYX_ERR(0, 3159, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_one_zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3159, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3159, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_310is_one_zero(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_310is_one_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_one_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_one_zero(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3159, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_one_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3169
 * 
 * 
 * cpdef make_two_pole(frequency=None, radius=None, a0=None,b1=None,b2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_313make_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_make_two_pole(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_two_pole *__pyx_optional_args) {
  PyObject *__pyx_v_frequency = ((PyObject *)Py_None);
  PyObject *__pyx_v_radius = ((PyObject *)Py_None);
  PyObject *__pyx_v_a0 = ((PyObject *)Py_None);
  PyObject *__pyx_v_b1 = ((PyObject *)Py_None);
  PyObject *__pyx_v_b2 = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  mus_float_t __pyx_t_4;
  mus_float_t __pyx_t_5;
  mus_float_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_two_pole", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frequency = __pyx_optional_args->frequency;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_radius = __pyx_optional_args->radius;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_a0 = __pyx_optional_args->a0;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_b1 = __pyx_optional_args->b1;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_b2 = __pyx_optional_args->b2;
            }
          }
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":3179
 *     :rtype: mus_any
 *     """
 *     if all((frequency, radius)):             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_frequency);
  __Pyx_GIVEREF(__pyx_v_frequency);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_frequency)) __PYX_ERR(0, 3179, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_radius);
  __Pyx_GIVEREF(__pyx_v_radius);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_radius)) __PYX_ERR(0, 3179, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":3180
 *     """
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))             # <<<<<<<<<<<<<<
 *     elif any((frequency, radius)):
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_frequency); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3180, __pyx_L1_error)
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_radius); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3180, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_two_pole_from_frequency_and_radius(__pyx_t_4, __pyx_t_5), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3179
 *     :rtype: mus_any
 *     """
 *     if all((frequency, radius)):             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 */
  }

  /* "pysndlib/clm.pyx":3181
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_frequency);
  __Pyx_GIVEREF(__pyx_v_frequency);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frequency)) __PYX_ERR(0, 3181, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_radius);
  __Pyx_GIVEREF(__pyx_v_radius);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_radius)) __PYX_ERR(0, 3181, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_any, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_3)) {

    /* "pysndlib/clm.pyx":3182
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")             # <<<<<<<<<<<<<<
 *     else:
 *         if all((a0,b1,b2)):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3182, __pyx_L1_error)

    /* "pysndlib/clm.pyx":3181
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":3184
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 *         if all((a0,b1,b2)):             # <<<<<<<<<<<<<<
 *             return mus_any.from_ptr(cclm.mus_make_two_pole(a0,b2,b2))
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_a0);
    __Pyx_GIVEREF(__pyx_v_a0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a0)) __PYX_ERR(0, 3184, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_b1);
    __Pyx_GIVEREF(__pyx_v_b1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_b1)) __PYX_ERR(0, 3184, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_b2);
    __Pyx_GIVEREF(__pyx_v_b2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_b2)) __PYX_ERR(0, 3184, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_3)) {

      /* "pysndlib/clm.pyx":3185
 *     else:
 *         if all((a0,b1,b2)):
 *             return mus_any.from_ptr(cclm.mus_make_two_pole(a0,b2,b2))             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(f'Filter needs values for a0, b1, b2 got a0: {a0}, b1: {b1}, b2: {b2}')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_a0); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3185, __pyx_L1_error)
      __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_b2); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3185, __pyx_L1_error)
      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_b2); if (unlikely((__pyx_t_6 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3185, __pyx_L1_error)
      __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_two_pole(__pyx_t_5, __pyx_t_4, __pyx_t_6), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":3184
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 *         if all((a0,b1,b2)):             # <<<<<<<<<<<<<<
 *             return mus_any.from_ptr(cclm.mus_make_two_pole(a0,b2,b2))
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":3187
 *             return mus_any.from_ptr(cclm.mus_make_two_pole(a0,b2,b2))
 *         else:
 *             raise KeyError(f'Filter needs values for a0, b1, b2 got a0: {a0}, b1: {b1}, b2: {b2}')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_Filter_needs_values_for_a0_b1_b2);
      __pyx_t_7 += 43;
      __Pyx_GIVEREF(__pyx_kp_u_Filter_needs_values_for_a0_b1_b2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Filter_needs_values_for_a0_b1_b2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_a0, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_b1_2);
      __pyx_t_7 += 6;
      __Pyx_GIVEREF(__pyx_kp_u_b1_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_b1_2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_b1, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_b2);
      __pyx_t_7 += 6;
      __Pyx_GIVEREF(__pyx_kp_u_b2);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_b2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_b2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3187, __pyx_L1_error)
    }
  }

  /* "pysndlib/clm.pyx":3169
 * 
 * 
 * cpdef make_two_pole(frequency=None, radius=None, a0=None,b1=None,b2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_313make_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_312make_two_pole, "\n    return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).\n    \n    :param frequency: Center frequency \\in Hz\n    :param radius: Radius of filter. Refers to the unit circle, so it should be between 0.0 and (less than) 1.0. \n    :param kwargs: If frequency and radius not provided, these should be keyword arguments 'a0', 'b1', 'b2'\n    :return: two_pole gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_313make_two_pole = {"make_two_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_313make_two_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_312make_two_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_313make_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_frequency = 0;
  PyObject *__pyx_v_radius = 0;
  PyObject *__pyx_v_a0 = 0;
  PyObject *__pyx_v_b1 = 0;
  PyObject *__pyx_v_b2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_two_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_radius,&__pyx_n_s_a0,&__pyx_n_s_b1,&__pyx_n_s_b2_2,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a0);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_b1);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_b2_2);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3169, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_two_pole") < 0)) __PYX_ERR(0, 3169, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = values[0];
    __pyx_v_radius = values[1];
    __pyx_v_a0 = values[2];
    __pyx_v_b1 = values[3];
    __pyx_v_b2 = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_two_pole", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 3169, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_312make_two_pole(__pyx_self, __pyx_v_frequency, __pyx_v_radius, __pyx_v_a0, __pyx_v_b1, __pyx_v_b2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_312make_two_pole(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frequency, PyObject *__pyx_v_radius, PyObject *__pyx_v_a0, PyObject *__pyx_v_b1, PyObject *__pyx_v_b2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_two_pole __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_two_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.frequency = __pyx_v_frequency;
  __pyx_t_2.radius = __pyx_v_radius;
  __pyx_t_2.a0 = __pyx_v_a0;
  __pyx_t_2.b1 = __pyx_v_b1;
  __pyx_t_2.b2 = __pyx_v_b2;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_make_two_pole(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3190
 * 
 * 
 * cpdef cython.double two_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two pole filter of input.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_315two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_two_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3199
 * 
 *     """
 *     return cclm.mus_two_pole(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_two_pole(mus_any gen):
 */
  __pyx_r = mus_two_pole(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3190
 * 
 * 
 * cpdef cython.double two_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two pole filter of input.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_315two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_314two_pole, "\n    two pole filter of input.\n    \n    :param gen: two_pole gen\n    :param insig: input \n    :rtype: float  \n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_315two_pole = {"two_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_315two_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_314two_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_315two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("two_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3190, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3190, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("two_pole", 1, 2, 2, 1); __PYX_ERR(0, 3190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "two_pole") < 0)) __PYX_ERR(0, 3190, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3190, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("two_pole", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3190, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3190, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_314two_pole(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_314two_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("two_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_two_pole(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3190, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3201
 *     return cclm.mus_two_pole(gen._ptr, insig)
 * 
 * cpdef bint is_two_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_pole.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_317is_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_two_pole(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3208
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_two_pole(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_two_pole(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3201
 *     return cclm.mus_two_pole(gen._ptr, insig)
 * 
 * cpdef bint is_two_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_pole.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_317is_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_316is_two_pole, "\n    returns True if gen is a two_pole.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_317is_two_pole = {"is_two_pole", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_317is_two_pole, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_316is_two_pole};
static PyObject *__pyx_pw_8pysndlib_3clm_317is_two_pole(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_two_pole (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3201, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_two_pole") < 0)) __PYX_ERR(0, 3201, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_two_pole", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3201, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3201, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_316is_two_pole(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_316is_two_pole(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_two_pole", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_two_pole(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3201, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_two_pole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3211
 * 
 * 
 * cpdef make_two_zero(frequency=None, radius=None, a0=None,a1=None,a2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_319make_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_make_two_zero(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_two_zero *__pyx_optional_args) {
  PyObject *__pyx_v_frequency = ((PyObject *)Py_None);
  PyObject *__pyx_v_radius = ((PyObject *)Py_None);
  PyObject *__pyx_v_a0 = ((PyObject *)Py_None);
  PyObject *__pyx_v_a1 = ((PyObject *)Py_None);
  PyObject *__pyx_v_a2 = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  mus_float_t __pyx_t_4;
  mus_float_t __pyx_t_5;
  mus_float_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_two_zero", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frequency = __pyx_optional_args->frequency;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_radius = __pyx_optional_args->radius;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_a0 = __pyx_optional_args->a0;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_a1 = __pyx_optional_args->a1;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_a2 = __pyx_optional_args->a2;
            }
          }
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":3221
 *     :rtype: mus_any
 *     """
 *     if all((frequency, radius)):             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_frequency);
  __Pyx_GIVEREF(__pyx_v_frequency);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_frequency)) __PYX_ERR(0, 3221, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_radius);
  __Pyx_GIVEREF(__pyx_v_radius);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_radius)) __PYX_ERR(0, 3221, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":3222
 *     """
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))             # <<<<<<<<<<<<<<
 *     elif any((frequency, radius)):
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_frequency); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3222, __pyx_L1_error)
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_radius); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3222, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_two_zero_from_frequency_and_radius(__pyx_t_4, __pyx_t_5), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3221
 *     :rtype: mus_any
 *     """
 *     if all((frequency, radius)):             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 */
  }

  /* "pysndlib/clm.pyx":3223
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_frequency);
  __Pyx_GIVEREF(__pyx_v_frequency);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frequency)) __PYX_ERR(0, 3223, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_radius);
  __Pyx_GIVEREF(__pyx_v_radius);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_radius)) __PYX_ERR(0, 3223, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_any, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_3)) {

    /* "pysndlib/clm.pyx":3224
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")             # <<<<<<<<<<<<<<
 *     else:
 *         if all((a0,a1,a2)):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3224, __pyx_L1_error)

    /* "pysndlib/clm.pyx":3223
 *     if all((frequency, radius)):
 *         return mus_any.from_ptr(cclm.mus_make_two_zero_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":3226
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 *         if all((a0,a1,a2)):             # <<<<<<<<<<<<<<
 *             return mus_any.from_ptr(cclm.mus_make_two_zero(a0,a1,a2))
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_a0);
    __Pyx_GIVEREF(__pyx_v_a0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a0)) __PYX_ERR(0, 3226, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_a1);
    __Pyx_GIVEREF(__pyx_v_a1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_a1)) __PYX_ERR(0, 3226, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_a2);
    __Pyx_GIVEREF(__pyx_v_a2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_a2)) __PYX_ERR(0, 3226, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3226, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_3)) {

      /* "pysndlib/clm.pyx":3227
 *     else:
 *         if all((a0,a1,a2)):
 *             return mus_any.from_ptr(cclm.mus_make_two_zero(a0,a1,a2))             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(f'Filter needs values for a0, a1, a2 got a0: {a0}, a1: {a1}, a2: {a2}')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_a0); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3227, __pyx_L1_error)
      __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_a1); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3227, __pyx_L1_error)
      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_a2); if (unlikely((__pyx_t_6 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3227, __pyx_L1_error)
      __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_two_zero(__pyx_t_5, __pyx_t_4, __pyx_t_6), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pysndlib/clm.pyx":3226
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")
 *     else:
 *         if all((a0,a1,a2)):             # <<<<<<<<<<<<<<
 *             return mus_any.from_ptr(cclm.mus_make_two_zero(a0,a1,a2))
 *         else:
 */
    }

    /* "pysndlib/clm.pyx":3229
 *             return mus_any.from_ptr(cclm.mus_make_two_zero(a0,a1,a2))
 *         else:
 *             raise KeyError(f'Filter needs values for a0, a1, a2 got a0: {a0}, a1: {a1}, a2: {a2}')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_Filter_needs_values_for_a0_a1_a2);
      __pyx_t_7 += 43;
      __Pyx_GIVEREF(__pyx_kp_u_Filter_needs_values_for_a0_a1_a2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Filter_needs_values_for_a0_a1_a2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_a0, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_a1_2);
      __pyx_t_7 += 6;
      __Pyx_GIVEREF(__pyx_kp_u_a1_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_a1_2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_a1, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_a2);
      __pyx_t_7 += 6;
      __Pyx_GIVEREF(__pyx_kp_u_a2);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_a2);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_a2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3229, __pyx_L1_error)
    }
  }

  /* "pysndlib/clm.pyx":3211
 * 
 * 
 * cpdef make_two_zero(frequency=None, radius=None, a0=None,a1=None,a2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_319make_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_318make_two_zero, "\n    return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).\n    \n    :param frequency: Center frequency \\in Hz\n    :param radius: Radius of filter. Refers to the unit circle, so it should be between 0.0 and (less than) 1.0. \n    :param kwargs: If frequency and radius not provided, these should be keyword arguments 'a0', 'a1', 'a2'\n    :return: two_zero gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_319make_two_zero = {"make_two_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_319make_two_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_318make_two_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_319make_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_frequency = 0;
  PyObject *__pyx_v_radius = 0;
  PyObject *__pyx_v_a0 = 0;
  PyObject *__pyx_v_a1 = 0;
  PyObject *__pyx_v_a2 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_two_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_radius,&__pyx_n_s_a0,&__pyx_n_s_a1,&__pyx_n_s_a2_2,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a0);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a1);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a2_2);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_two_zero") < 0)) __PYX_ERR(0, 3211, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = values[0];
    __pyx_v_radius = values[1];
    __pyx_v_a0 = values[2];
    __pyx_v_a1 = values[3];
    __pyx_v_a2 = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_two_zero", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 3211, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_318make_two_zero(__pyx_self, __pyx_v_frequency, __pyx_v_radius, __pyx_v_a0, __pyx_v_a1, __pyx_v_a2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_318make_two_zero(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frequency, PyObject *__pyx_v_radius, PyObject *__pyx_v_a0, PyObject *__pyx_v_a1, PyObject *__pyx_v_a2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_two_zero __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_two_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.frequency = __pyx_v_frequency;
  __pyx_t_2.radius = __pyx_v_radius;
  __pyx_t_2.a0 = __pyx_v_a0;
  __pyx_t_2.a1 = __pyx_v_a1;
  __pyx_t_2.a2 = __pyx_v_a2;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_make_two_zero(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3232
 * 
 * 
 * cpdef cython.double two_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two zero filter of input.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_321two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_two_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3240
 *     :rtype: float
 *     """
 *     return cclm.mus_two_zero(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_two_zero(mus_any gen):
 */
  __pyx_r = mus_two_zero(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3232
 * 
 * 
 * cpdef cython.double two_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two zero filter of input.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_321two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_320two_zero, "\n    two zero filter of input. \n    \n    :param gen: two_zero gen\n    :param insig: input \n    :rtype: float  \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_321two_zero = {"two_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_321two_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_320two_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_321two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("two_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3232, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3232, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("two_zero", 1, 2, 2, 1); __PYX_ERR(0, 3232, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "two_zero") < 0)) __PYX_ERR(0, 3232, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3232, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("two_zero", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_320two_zero(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_320two_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("two_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_two_zero(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3232, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3242
 *     return cclm.mus_two_zero(gen._ptr, insig)
 * 
 * cpdef bint is_two_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_zero.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_323is_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_two_zero(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3249
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_two_zero(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_two_zero(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3242
 *     return cclm.mus_two_zero(gen._ptr, insig)
 * 
 * cpdef bint is_two_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_zero.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_323is_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_322is_two_zero, "\n    returns True if gen is a two_zero.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_323is_two_zero = {"is_two_zero", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_323is_two_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_322is_two_zero};
static PyObject *__pyx_pw_8pysndlib_3clm_323is_two_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_two_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3242, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_two_zero") < 0)) __PYX_ERR(0, 3242, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_two_zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3242, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3242, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_322is_two_zero(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_322is_two_zero(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_two_zero", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_two_zero(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3242, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_two_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3255
 * 
 * # ---------------- formant ---------------- #
 * cpdef mus_any make_formant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant generator (a resonator). radius sets the pole radius (in terms of the 'unit circle').
 */

static PyObject *__pyx_pw_8pysndlib_3clm_325make_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_formant(double __pyx_v_frequency, double __pyx_v_radius, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_formant", 1);

  /* "pysndlib/clm.pyx":3265
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3265, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3267
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_formant(__pyx_v_frequency, __pyx_v_radius), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3255
 * 
 * # ---------------- formant ---------------- #
 * cpdef mus_any make_formant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant generator (a resonator). radius sets the pole radius (in terms of the 'unit circle').
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_325make_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_324make_formant, "\n    return a new formant generator (a resonator). radius sets the pole radius (in terms of the 'unit circle').\n    frequency sets the resonance center frequency (hz).\n    \n    :param frequency: resonance center frequency \\in Hz\n    :param radius: resonance width, refers to the unit circle, so it should be between 0.0 and (less than) 1.0. \n    :return: formant gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_325make_formant = {"make_formant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_325make_formant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_324make_formant};
static PyObject *__pyx_pw_8pysndlib_3clm_325make_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_radius;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_formant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_radius,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3255, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3255, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_formant", 1, 2, 2, 1); __PYX_ERR(0, 3255, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_formant") < 0)) __PYX_ERR(0, 3255, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3255, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3255, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_formant", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3255, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_324make_formant(__pyx_self, __pyx_v_frequency, __pyx_v_radius);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_324make_formant(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_formant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_formant(__pyx_v_frequency, __pyx_v_radius, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3269
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from formant generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_327formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_formant(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_formant *__pyx_optional_args) {
  double __pyx_v_radians = ((double)0.0);
  double __pyx_r;
  int __pyx_t_1;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_radians = __pyx_optional_args->radians;
    }
  }

  /* "pysndlib/clm.pyx":3279
 * 
 *     """
 *     if radians == 0.0:             # <<<<<<<<<<<<<<
 *         return cclm.mus_formant(gen._ptr, insig)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_radians == 0.0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":3280
 *     """
 *     if radians == 0.0:
 *         return cclm.mus_formant(gen._ptr, insig)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_formant_with_frequency(gen._ptr, insig, radians)
 */
    __pyx_r = mus_formant(__pyx_v_gen->_ptr, __pyx_v_insig);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3279
 * 
 *     """
 *     if radians == 0.0:             # <<<<<<<<<<<<<<
 *         return cclm.mus_formant(gen._ptr, insig)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":3282
 *         return cclm.mus_formant(gen._ptr, insig)
 *     else:
 *         return cclm.mus_formant_with_frequency(gen._ptr, insig, radians)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_r = mus_formant_with_frequency(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_radians);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":3269
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from formant generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_327formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_326formant, "\n    next sample from formant generator.\n    \n    :param gen: formant gen\n    :param insig: input value\n    :param radians: frequency \\in radians\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_327formant = {"formant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_327formant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_326formant};
static PyObject *__pyx_pw_8pysndlib_3clm_327formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_radians;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("formant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_radians,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("formant", 0, 2, 3, 1); __PYX_ERR(0, 3269, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radians);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "formant") < 0)) __PYX_ERR(0, 3269, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_radians = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radians == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L3_error)
    } else {
      __pyx_v_radians = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("formant", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3269, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3269, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_326formant(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_radians);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_326formant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_radians) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_formant __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("formant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.radians = __pyx_v_radians;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_formant(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3285
 * 
 * 
 * cpdef bint is_formant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_329is_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_formant(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3292
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_formant(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- formant-bank ---------------- #
 */
  __pyx_r = mus_is_formant(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3285
 * 
 * 
 * cpdef bint is_formant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_329is_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_328is_formant, "\n    returns True if gen is a formant.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_329is_formant = {"is_formant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_329is_formant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_328is_formant};
static PyObject *__pyx_pw_8pysndlib_3clm_329is_formant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_formant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3285, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_formant") < 0)) __PYX_ERR(0, 3285, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_formant", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3285, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3285, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_328is_formant(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_328is_formant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_formant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_formant(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3285, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_formant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3295
 * 
 * # ---------------- formant-bank ---------------- #
 * cpdef mus_any make_formant_bank(list filters, amps=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant-bank generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_331make_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_formant_bank(PyObject *__pyx_v_filters, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_formant_bank *__pyx_optional_args) {
  PyObject *__pyx_v_amps = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  __Pyx_memviewslice __pyx_v_amps_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_filt_array = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_formant_bank", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_amps = __pyx_optional_args->amps;
    }
  }
  __Pyx_INCREF(__pyx_v_amps);

  /* "pysndlib/clm.pyx":3305
 *     """
 * 
 *     p = list(map(is_formant, filters))             # <<<<<<<<<<<<<<
 * 
 *     if not all(p):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_formant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3305, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_filters);
  __Pyx_GIVEREF(__pyx_v_filters);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_filters)) __PYX_ERR(0, 3305, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_p = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3307
 *     p = list(map(is_formant, filters))
 * 
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":3308
 * 
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] amps_view = None
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3308, __pyx_L1_error)

    /* "pysndlib/clm.pyx":3307
 *     p = list(map(is_formant, filters))
 * 
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":3310
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 *     cdef double [:] amps_view = None             # <<<<<<<<<<<<<<
 * 
 *     filt_array = mus_any_array.from_pylist(filters)
 */
  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 3310, __pyx_L1_error)
  __pyx_v_amps_view = __pyx_t_5;
  __pyx_t_5.memview = NULL;
  __pyx_t_5.data = NULL;

  /* "pysndlib/clm.pyx":3312
 *     cdef double [:] amps_view = None
 * 
 *     filt_array = mus_any_array.from_pylist(filters)             # <<<<<<<<<<<<<<
 * 
 *     if amps is not None:
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(__pyx_v_filters)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_filt_array = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3314
 *     filt_array = mus_any_array.from_pylist(filters)
 * 
 *     if amps is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(amps, list):
 *             amps = np.array(amps)
 */
  __pyx_t_4 = (__pyx_v_amps != Py_None);
  if (__pyx_t_4) {

    /* "pysndlib/clm.pyx":3315
 * 
 *     if amps is not None:
 *         if isinstance(amps, list):             # <<<<<<<<<<<<<<
 *             amps = np.array(amps)
 *         amps_view = amps
 */
    __pyx_t_4 = PyList_Check(__pyx_v_amps); 
    if (__pyx_t_4) {

      /* "pysndlib/clm.pyx":3316
 *     if amps is not None:
 *         if isinstance(amps, list):
 *             amps = np.array(amps)             # <<<<<<<<<<<<<<
 *         amps_view = amps
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, &amps_view[0]))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_amps};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3316, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_amps, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysndlib/clm.pyx":3315
 * 
 *     if amps is not None:
 *         if isinstance(amps, list):             # <<<<<<<<<<<<<<
 *             amps = np.array(amps)
 *         amps_view = amps
 */
    }

    /* "pysndlib/clm.pyx":3317
 *         if isinstance(amps, list):
 *             amps = np.array(amps)
 *         amps_view = amps             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, &amps_view[0]))
 *     else:
 */
    __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_amps, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 3317, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_amps_view, 1);
    __pyx_v_amps_view = __pyx_t_5;
    __pyx_t_5.memview = NULL;
    __pyx_t_5.data = NULL;

    /* "pysndlib/clm.pyx":3318
 *             amps = np.array(amps)
 *         amps_view = amps
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, &amps_view[0]))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, NULL))
 */
    if (unlikely(__pyx_v_filters == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 3318, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_filters); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3318, __pyx_L1_error)
    __pyx_t_9 = 0;
    __pyx_t_7 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_v_amps_view.shape[0];
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_v_amps_view.shape[0])) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      __PYX_ERR(0, 3318, __pyx_L1_error)
    }
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_formant_bank(__pyx_t_8, __pyx_v_filt_array->data, (&(*((double *) ( /* dim=0 */ (__pyx_v_amps_view.data + __pyx_t_9 * __pyx_v_amps_view.strides[0]) ))))), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":3314
 *     filt_array = mus_any_array.from_pylist(filters)
 * 
 *     if amps is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(amps, list):
 *             amps = np.array(amps)
 */
    goto __pyx_L4;
  }

  /* "pysndlib/clm.pyx":3320
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, &amps_view[0]))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, NULL))             # <<<<<<<<<<<<<<
 *     gen.cache_extend([filt_array, amps, filters])
 *     return gen
 */
  /*else*/ {
    if (unlikely(__pyx_v_filters == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 3320, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_filters); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3320, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_formant_bank(__pyx_t_8, __pyx_v_filt_array->data, NULL), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "pysndlib/clm.pyx":3321
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, NULL))
 *     gen.cache_extend([filt_array, amps, filters])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_filt_array);
  __Pyx_GIVEREF((PyObject *)__pyx_v_filt_array);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_filt_array))) __PYX_ERR(0, 3321, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_amps);
  __Pyx_GIVEREF(__pyx_v_amps);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_amps)) __PYX_ERR(0, 3321, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_filters);
  __Pyx_GIVEREF(__pyx_v_filters);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_v_filters)) __PYX_ERR(0, 3321, __pyx_L1_error);
  __pyx_t_6 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pysndlib/clm.pyx":3322
 *         gen = mus_any.from_ptr(cclm.mus_make_formant_bank(len(filters),filt_array.data, NULL))
 *     gen.cache_extend([filt_array, amps, filters])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3295
 * 
 * # ---------------- formant-bank ---------------- #
 * cpdef mus_any make_formant_bank(list filters, amps=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant-bank generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_amps_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_filt_array);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_amps);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_331make_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_330make_formant_bank, "\n    return a new formant-bank generator.\n    \n    :param filters: list of filter gens\n    :param amps: list of amps to apply to filters\n    :return: formant_bank gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_331make_formant_bank = {"make_formant_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_331make_formant_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_330make_formant_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_331make_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filters = 0;
  PyObject *__pyx_v_amps = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_formant_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filters,&__pyx_n_s_amps,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filters)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3295, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amps);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3295, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_formant_bank") < 0)) __PYX_ERR(0, 3295, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filters = ((PyObject*)values[0]);
    __pyx_v_amps = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_formant_bank", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3295, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filters), (&PyList_Type), 1, "filters", 1))) __PYX_ERR(0, 3295, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_330make_formant_bank(__pyx_self, __pyx_v_filters, __pyx_v_amps);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_330make_formant_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filters, PyObject *__pyx_v_amps) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_formant_bank __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_formant_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.amps = __pyx_v_amps;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_formant_bank(__pyx_v_filters, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3325
 * 
 * 
 * cpdef cython.double formant_bank(mus_any gen, inputs):             # <<<<<<<<<<<<<<
 *     """
 *     sum a bank of formant generators.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_333formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_formant_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_inputs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_inputs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_res = NULL;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  double __pyx_t_6;
  mus_float_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("formant_bank", 1);

  /* "pysndlib/clm.pyx":3335
 *     """
 * 
 *     cdef double [:] inputs_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(inputs, np.ndarray):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __pyx_v_inputs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3337
 *     cdef double [:] inputs_view = None
 * 
 *     if isinstance(inputs, np.ndarray):             # <<<<<<<<<<<<<<
 *         inputs_view = inputs
 *         res = cclm.mus_formant_bank_with_inputs(gen._ptr, &inputs_view[0])
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_inputs, __pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":3338
 * 
 *     if isinstance(inputs, np.ndarray):
 *         inputs_view = inputs             # <<<<<<<<<<<<<<
 *         res = cclm.mus_formant_bank_with_inputs(gen._ptr, &inputs_view[0])
 *         return res
 */
    __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_inputs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3338, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_inputs_view, 1);
    __pyx_v_inputs_view = __pyx_t_1;
    __pyx_t_1.memview = NULL;
    __pyx_t_1.data = NULL;

    /* "pysndlib/clm.pyx":3339
 *     if isinstance(inputs, np.ndarray):
 *         inputs_view = inputs
 *         res = cclm.mus_formant_bank_with_inputs(gen._ptr, &inputs_view[0])             # <<<<<<<<<<<<<<
 *         return res
 *     else:
 */
    __pyx_t_3 = 0;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_v_inputs_view.shape[0];
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_v_inputs_view.shape[0])) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      __PYX_ERR(0, 3339, __pyx_L1_error)
    }
    __pyx_t_5 = PyFloat_FromDouble(mus_formant_bank_with_inputs(__pyx_v_gen->_ptr, (&(*((double *) ( /* dim=0 */ (__pyx_v_inputs_view.data + __pyx_t_3 * __pyx_v_inputs_view.strides[0]) )))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_res = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":3340
 *         inputs_view = inputs
 *         res = cclm.mus_formant_bank_with_inputs(gen._ptr, &inputs_view[0])
 *         return res             # <<<<<<<<<<<<<<
 *     else:
 *         res = cclm.mus_formant_bank(gen._ptr, inputs)
 */
    __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_res); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3340, __pyx_L1_error)
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3337
 *     cdef double [:] inputs_view = None
 * 
 *     if isinstance(inputs, np.ndarray):             # <<<<<<<<<<<<<<
 *         inputs_view = inputs
 *         res = cclm.mus_formant_bank_with_inputs(gen._ptr, &inputs_view[0])
 */
  }

  /* "pysndlib/clm.pyx":3342
 *         return res
 *     else:
 *         res = cclm.mus_formant_bank(gen._ptr, inputs)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  /*else*/ {
    __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_inputs); if (unlikely((__pyx_t_7 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3342, __pyx_L1_error)
    __pyx_t_5 = PyFloat_FromDouble(mus_formant_bank(__pyx_v_gen->_ptr, __pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_res = __pyx_t_5;
    __pyx_t_5 = 0;
  }

  /* "pysndlib/clm.pyx":3343
 *     else:
 *         res = cclm.mus_formant_bank(gen._ptr, inputs)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_formant_bank(mus_any gen):
 */
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_res); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3343, __pyx_L1_error)
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3325
 * 
 * 
 * cpdef cython.double formant_bank(mus_any gen, inputs):             # <<<<<<<<<<<<<<
 *     """
 *     sum a bank of formant generators.
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inputs_view, 1);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_333formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_332formant_bank, "\n    sum a bank of formant generators.\n    \n    :param gen: formant_bank gen\n    :param inputs: can be a list/array of inputs or a single input\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_333formant_bank = {"formant_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_333formant_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_332formant_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_333formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  PyObject *__pyx_v_inputs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("formant_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_inputs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inputs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("formant_bank", 1, 2, 2, 1); __PYX_ERR(0, 3325, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "formant_bank") < 0)) __PYX_ERR(0, 3325, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_inputs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("formant_bank", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3325, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3325, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_332formant_bank(__pyx_self, __pyx_v_gen, __pyx_v_inputs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_332formant_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_inputs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("formant_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_formant_bank(__pyx_v_gen, __pyx_v_inputs, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3345
 *     return res
 * 
 * cpdef bint is_formant_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant_bank.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_335is_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_formant_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3352
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_formant_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- firmant ---------------- #
 */
  __pyx_r = mus_is_formant_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3345
 *     return res
 * 
 * cpdef bint is_formant_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant_bank.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_335is_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_334is_formant_bank, "\n    returns True if gen is a formant_bank.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_335is_formant_bank = {"is_formant_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_335is_formant_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_334is_formant_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_335is_formant_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_formant_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3345, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_formant_bank") < 0)) __PYX_ERR(0, 3345, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_formant_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3345, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3345, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_334is_formant_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_334is_formant_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_formant_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_formant_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3345, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_formant_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3355
 * 
 * # ---------------- firmant ---------------- #
 * cpdef mus_any make_firmant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new firmant generator (a resonator).  radius sets the pole radius (in terms of the 'unit
 */

static PyObject *__pyx_pw_8pysndlib_3clm_337make_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_firmant(double __pyx_v_frequency, double __pyx_v_radius, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_firmant", 1);

  /* "pysndlib/clm.pyx":3365
 *     :rtype: mus_any
 *     """
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3365, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_2 / 2.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5.__pyx_n = 2;
  __pyx_t_5.low = __pyx_float_0_0;
  __pyx_t_5.high = __pyx_t_3;
  __pyx_t_4 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3367
 *     check_range('frequency', frequency, 0.0, get_srate() / 2)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))             # <<<<<<<<<<<<<<
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=0.0 ):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_firmant(__pyx_v_frequency, __pyx_v_radius), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3355
 * 
 * # ---------------- firmant ---------------- #
 * cpdef mus_any make_firmant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new firmant generator (a resonator).  radius sets the pole radius (in terms of the 'unit
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_337make_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_336make_firmant, "\n    return a new firmant generator (a resonator).  radius sets the pole radius (in terms of the 'unit\n    circle'). frequency sets the resonance center frequency (hz).\n    \n    :param frequency: resonance center frequency \\in Hz\n    :param radius: resonance width, refers to the unit circle, so it should be between 0.0 and (less than) 1.0. \n    :return: formant gen\n    :rtype: mus_any       \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_337make_firmant = {"make_firmant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_337make_firmant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_336make_firmant};
static PyObject *__pyx_pw_8pysndlib_3clm_337make_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_radius;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_firmant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_radius,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3355, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3355, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_firmant", 1, 2, 2, 1); __PYX_ERR(0, 3355, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_firmant") < 0)) __PYX_ERR(0, 3355, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3355, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3355, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_firmant", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3355, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_336make_firmant(__pyx_self, __pyx_v_frequency, __pyx_v_radius);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_336make_firmant(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_firmant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_firmant(__pyx_v_frequency, __pyx_v_radius, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3369
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=0.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from resonator generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_339firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_firmant(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_firmant *__pyx_optional_args) {
  double __pyx_v_radians = ((double)0.0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("firmant", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_radians = __pyx_optional_args->radians;
    }
  }

  /* "pysndlib/clm.pyx":3379
 *     :rtype: float
 *     """
 *     if radians == 0.0:             # <<<<<<<<<<<<<<
 *         return cclm.mus_firmant(gen._ptr, insig)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_radians == 0.0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":3380
 *     """
 *     if radians == 0.0:
 *         return cclm.mus_firmant(gen._ptr, insig)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_firmant_with_frequency(gen._ptr, insig, radians)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyFloat_FromDouble(mus_firmant(__pyx_v_gen->_ptr, __pyx_v_insig)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3379
 *     :rtype: float
 *     """
 *     if radians == 0.0:             # <<<<<<<<<<<<<<
 *         return cclm.mus_firmant(gen._ptr, insig)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":3382
 *         return cclm.mus_firmant(gen._ptr, insig)
 *     else:
 *         return cclm.mus_firmant_with_frequency(gen._ptr, insig, radians)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyFloat_FromDouble(mus_firmant_with_frequency(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_radians)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":3369
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=0.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from resonator generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_339firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_338firmant, "\n    next sample from resonator generator.\n    \n    next sample from firmant generator.\n    :param gen: firmant gen\n    :param insig: input value\n    :param radians: frequency \\in radians\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_339firmant = {"firmant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_339firmant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_338firmant};
static PyObject *__pyx_pw_8pysndlib_3clm_339firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_radians;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("firmant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_radians,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("firmant", 0, 2, 3, 1); __PYX_ERR(0, 3369, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radians);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "firmant") < 0)) __PYX_ERR(0, 3369, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_radians = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radians == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L3_error)
    } else {
      __pyx_v_radians = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("firmant", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3369, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3369, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_338firmant(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_radians);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_338firmant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_radians) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_firmant __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("firmant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.radians = __pyx_v_radians;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_firmant(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3385
 * 
 * 
 * cpdef is_firmant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a firmant.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_341is_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_firmant(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_firmant", 1);

  /* "pysndlib/clm.pyx":3392
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_firmant(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- filter ---------------- #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(mus_is_firmant(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3385
 * 
 * 
 * cpdef is_firmant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a firmant.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_341is_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_340is_firmant, "\n    returns True if gen is a firmant.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_341is_firmant = {"is_firmant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_341is_firmant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_340is_firmant};
static PyObject *__pyx_pw_8pysndlib_3clm_341is_firmant(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_firmant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3385, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_firmant") < 0)) __PYX_ERR(0, 3385, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_firmant", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3385, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3385, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_340is_firmant(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_340is_firmant(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_firmant", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_firmant(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_firmant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3395
 * 
 * # ---------------- filter ---------------- #
 * cpdef mus_any make_filter(cython.int order, xcoeffs, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new direct form fir/iir filter, coeff args are list/ndarray.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_343make_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filter(int __pyx_v_order, PyObject *__pyx_v_xcoeffs, PyObject *__pyx_v_ycoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_xcoeffs_cpy = NULL;
  PyObject *__pyx_v_ycoeffs_cpy = NULL;
  __Pyx_memviewslice __pyx_v_xcoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_ycoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filter", 1);

  /* "pysndlib/clm.pyx":3406
 *     """
 * 
 *     xcoeffs_cpy = np.array(xcoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 *     ycoeffs_cpy = np.array(ycoeffs, dtype=np.double)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_xcoeffs);
  __Pyx_GIVEREF(__pyx_v_xcoeffs);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xcoeffs)) __PYX_ERR(0, 3406, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_xcoeffs_cpy = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":3407
 * 
 *     xcoeffs_cpy = np.array(xcoeffs, dtype=np.double)
 *     ycoeffs_cpy = np.array(ycoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] xcoeffs_view = xcoeffs_cpy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_ycoeffs);
  __Pyx_GIVEREF(__pyx_v_ycoeffs);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ycoeffs)) __PYX_ERR(0, 3407, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ycoeffs_cpy = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3409
 *     ycoeffs_cpy = np.array(ycoeffs, dtype=np.double)
 * 
 *     cdef double [:] xcoeffs_view = xcoeffs_cpy             # <<<<<<<<<<<<<<
 *     cdef double [:] ycoeffs_view = ycoeffs_cpy
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_xcoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3409, __pyx_L1_error)
  __pyx_v_xcoeffs_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":3410
 * 
 *     cdef double [:] xcoeffs_view = xcoeffs_cpy
 *     cdef double [:] ycoeffs_view = ycoeffs_cpy             # <<<<<<<<<<<<<<
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_filter(order, &xcoeffs_view[0], &ycoeffs_view[0], NULL))
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_ycoeffs_cpy, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3410, __pyx_L1_error)
  __pyx_v_ycoeffs_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":3412
 *     cdef double [:] ycoeffs_view = ycoeffs_cpy
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_filter(order, &xcoeffs_view[0], &ycoeffs_view[0], NULL))             # <<<<<<<<<<<<<<
 * 
 *     gen.cache_extend([xcoeffs_cpy, ycoeffs_cpy])
 */
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_xcoeffs_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_xcoeffs_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 3412, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_v_ycoeffs_view.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_v_ycoeffs_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 3412, __pyx_L1_error)
  }
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_filter(__pyx_v_order, (&(*((double *) ( /* dim=0 */ (__pyx_v_xcoeffs_view.data + __pyx_t_7 * __pyx_v_xcoeffs_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_ycoeffs_view.data + __pyx_t_9 * __pyx_v_ycoeffs_view.strides[0]) )))), NULL), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":3414
 *     gen =  mus_any.from_ptr(cclm.mus_make_filter(order, &xcoeffs_view[0], &ycoeffs_view[0], NULL))
 * 
 *     gen.cache_extend([xcoeffs_cpy, ycoeffs_cpy])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_xcoeffs_cpy);
  __Pyx_GIVEREF(__pyx_v_xcoeffs_cpy);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_xcoeffs_cpy)) __PYX_ERR(0, 3414, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ycoeffs_cpy);
  __Pyx_GIVEREF(__pyx_v_ycoeffs_cpy);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_ycoeffs_cpy)) __PYX_ERR(0, 3414, __pyx_L1_error);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3415
 * 
 *     gen.cache_extend([xcoeffs_cpy, ycoeffs_cpy])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double filter(mus_any gen, cython.double insig): # todo : conflicts with buitl in function
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3395
 * 
 * # ---------------- filter ---------------- #
 * cpdef mus_any make_filter(cython.int order, xcoeffs, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new direct form fir/iir filter, coeff args are list/ndarray.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.make_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xcoeffs_cpy);
  __Pyx_XDECREF(__pyx_v_ycoeffs_cpy);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ycoeffs_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_343make_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_342make_filter, "\n    return a new direct form fir/iir filter, coeff args are list/ndarray.\n    \n    :param order: filter order\n    :param xcoeffs: x coeffs\n    :param ycoeffs: y coeffs\n    :return: filter gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_343make_filter = {"make_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_343make_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_342make_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_343make_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_order;
  PyObject *__pyx_v_xcoeffs = 0;
  PyObject *__pyx_v_ycoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_order,&__pyx_n_s_xcoeffs,&__pyx_n_s_ycoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_order)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xcoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_filter", 1, 3, 3, 1); __PYX_ERR(0, 3395, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ycoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_filter", 1, 3, 3, 2); __PYX_ERR(0, 3395, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_filter") < 0)) __PYX_ERR(0, 3395, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_order = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L3_error)
    __pyx_v_xcoeffs = values[1];
    __pyx_v_ycoeffs = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_filter", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3395, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_342make_filter(__pyx_self, __pyx_v_order, __pyx_v_xcoeffs, __pyx_v_ycoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_342make_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_xcoeffs, PyObject *__pyx_v_ycoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_filter(__pyx_v_order, __pyx_v_xcoeffs, __pyx_v_ycoeffs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3417
 *     return gen
 * 
 * cpdef cython.double filter(mus_any gen, cython.double insig): # todo : conflicts with buitl in function             # <<<<<<<<<<<<<<
 *     """
 *     next sample from filter.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_345filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3425
 *     :rtype: float
 *     """
 *     return cclm.mus_filter(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_filter(mus_any gen ):
 */
  __pyx_r = mus_filter(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3417
 *     return gen
 * 
 * cpdef cython.double filter(mus_any gen, cython.double insig): # todo : conflicts with buitl in function             # <<<<<<<<<<<<<<
 *     """
 *     next sample from filter.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_345filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_344filter, "\n    next sample from filter.\n    \n    :param gen: filter gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_345filter = {"filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_345filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_344filter};
static PyObject *__pyx_pw_8pysndlib_3clm_345filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("filter", 1, 2, 2, 1); __PYX_ERR(0, 3417, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "filter") < 0)) __PYX_ERR(0, 3417, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3417, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3417, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_344filter(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_344filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filter(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3427
 *     return cclm.mus_filter(gen._ptr, insig)
 * 
 * cpdef bint is_filter(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filter.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_347is_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3434
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_filter(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- fir-filter ---------------- #
 */
  __pyx_r = mus_is_filter(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3427
 *     return cclm.mus_filter(gen._ptr, insig)
 * 
 * cpdef bint is_filter(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filter.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_347is_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_346is_filter, "\n    returns True if gen is a filter.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_347is_filter = {"is_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_347is_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_346is_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_347is_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3427, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_filter") < 0)) __PYX_ERR(0, 3427, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_filter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3427, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3427, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_346is_filter(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_346is_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_filter(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3427, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3437
 * 
 * # ---------------- fir-filter ---------------- #
 * cpdef mus_any make_fir_filter(cython.int order, xcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new fir filter, xcoeffs a list/ndarray.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_349make_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_fir_filter(int __pyx_v_order, PyObject *__pyx_v_xcoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_xcoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fir_filter", 0);
  __Pyx_INCREF(__pyx_v_xcoeffs);

  /* "pysndlib/clm.pyx":3446
 *     :rtype: mus_any
 *     """
 *     cdef double [:] xcoeffs_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(xcoeffs, list):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __pyx_v_xcoeffs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3448
 *     cdef double [:] xcoeffs_view = None
 * 
 *     if isinstance(xcoeffs, list):             # <<<<<<<<<<<<<<
 *         xcoeffs = np.array(xcoeffs, dtype=np.double)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_xcoeffs); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":3449
 * 
 *     if isinstance(xcoeffs, list):
 *         xcoeffs = np.array(xcoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     xcoeffs_view = xcoeffs
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_xcoeffs);
    __Pyx_GIVEREF(__pyx_v_xcoeffs);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xcoeffs)) __PYX_ERR(0, 3449, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_xcoeffs, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pysndlib/clm.pyx":3448
 *     cdef double [:] xcoeffs_view = None
 * 
 *     if isinstance(xcoeffs, list):             # <<<<<<<<<<<<<<
 *         xcoeffs = np.array(xcoeffs, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":3451
 *         xcoeffs = np.array(xcoeffs, dtype=np.double)
 * 
 *     xcoeffs_view = xcoeffs             # <<<<<<<<<<<<<<
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_fir_filter(order, &xcoeffs_view[0], NULL))
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_xcoeffs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3451, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
  __pyx_v_xcoeffs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3453
 *     xcoeffs_view = xcoeffs
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_fir_filter(order, &xcoeffs_view[0], NULL))             # <<<<<<<<<<<<<<
 *     gen.cache_append(xcoeffs)
 * 
 */
  __pyx_t_8 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_xcoeffs_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_xcoeffs_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 3453, __pyx_L1_error)
  }
  __pyx_t_7 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_fir_filter(__pyx_v_order, (&(*((double *) ( /* dim=0 */ (__pyx_v_xcoeffs_view.data + __pyx_t_8 * __pyx_v_xcoeffs_view.strides[0]) )))), NULL), NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":3454
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_fir_filter(order, &xcoeffs_view[0], NULL))
 *     gen.cache_append(xcoeffs)             # <<<<<<<<<<<<<<
 * 
 *     return gen
 */
  __pyx_t_7 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_xcoeffs, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":3456
 *     gen.cache_append(xcoeffs)
 * 
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double fir_filter(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3437
 * 
 * # ---------------- fir-filter ---------------- #
 * cpdef mus_any make_fir_filter(cython.int order, xcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new fir filter, xcoeffs a list/ndarray.
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_xcoeffs_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_xcoeffs);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_349make_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_348make_fir_filter, "\n    return a new fir filter, xcoeffs a list/ndarray.\n    \n    :param order: filter order\n    :param xcoeffs: x coeffs\n    :return: fir_filter gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_349make_fir_filter = {"make_fir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_349make_fir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_348make_fir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_349make_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_order;
  PyObject *__pyx_v_xcoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_order,&__pyx_n_s_xcoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_order)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3437, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xcoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3437, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_fir_filter", 1, 2, 2, 1); __PYX_ERR(0, 3437, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_fir_filter") < 0)) __PYX_ERR(0, 3437, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_order = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3437, __pyx_L3_error)
    __pyx_v_xcoeffs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_fir_filter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3437, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_348make_fir_filter(__pyx_self, __pyx_v_order, __pyx_v_xcoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_348make_fir_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_xcoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_fir_filter(__pyx_v_order, __pyx_v_xcoeffs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3458
 *     return gen
 * 
 * cpdef cython.double fir_filter(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from fir filter.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_351fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_fir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3466
 *     :rtype: float
 *     """
 *     return cclm.mus_fir_filter(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_fir_filter(mus_any gen):
 */
  __pyx_r = mus_fir_filter(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3458
 *     return gen
 * 
 * cpdef cython.double fir_filter(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from fir filter.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_351fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_350fir_filter, "\n    next sample from fir filter.\n    \n    :param gen: fir_filter gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_351fir_filter = {"fir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_351fir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_350fir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_351fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3458, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3458, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("fir_filter", 1, 2, 2, 1); __PYX_ERR(0, 3458, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fir_filter") < 0)) __PYX_ERR(0, 3458, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3458, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fir_filter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3458, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3458, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_350fir_filter(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_350fir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_fir_filter(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3458, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3468
 *     return cclm.mus_fir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_fir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a fir_filter.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_353is_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_fir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3475
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_fir_filter(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_fir_filter(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3468
 *     return cclm.mus_fir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_fir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a fir_filter.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_353is_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_352is_fir_filter, "\n    returns True if gen is a fir_filter.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_353is_fir_filter = {"is_fir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_353is_fir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_352is_fir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_353is_fir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_fir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3468, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_fir_filter") < 0)) __PYX_ERR(0, 3468, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_fir_filter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3468, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3468, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_352is_fir_filter(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_352is_fir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_fir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_fir_filter(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3468, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_fir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3479
 * 
 * # ---------------- iir-filter ---------------- #
 * cpdef mus_any make_iir_filter(cython.int order, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new iir filter, ycoeffs a list/ndarray.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_355make_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_iir_filter(int __pyx_v_order, PyObject *__pyx_v_ycoeffs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_ycoeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_iir_filter", 0);
  __Pyx_INCREF(__pyx_v_ycoeffs);

  /* "pysndlib/clm.pyx":3488
 *     :rtype: mus_any
 *     """
 *     cdef double [:] ycoeffs_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(ycoeffs, list):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3488, __pyx_L1_error)
  __pyx_v_ycoeffs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3490
 *     cdef double [:] ycoeffs_view = None
 * 
 *     if isinstance(ycoeffs, list):             # <<<<<<<<<<<<<<
 *         ycoeffs = np.array(ycoeffs, dtype=np.double)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_ycoeffs); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":3491
 * 
 *     if isinstance(ycoeffs, list):
 *         ycoeffs = np.array(ycoeffs, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     ycoeffs_view = ycoeffs
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_ycoeffs);
    __Pyx_GIVEREF(__pyx_v_ycoeffs);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ycoeffs)) __PYX_ERR(0, 3491, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_ycoeffs, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pysndlib/clm.pyx":3490
 *     cdef double [:] ycoeffs_view = None
 * 
 *     if isinstance(ycoeffs, list):             # <<<<<<<<<<<<<<
 *         ycoeffs = np.array(ycoeffs, dtype=np.double)
 * 
 */
  }

  /* "pysndlib/clm.pyx":3493
 *         ycoeffs = np.array(ycoeffs, dtype=np.double)
 * 
 *     ycoeffs_view = ycoeffs             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_ycoeffs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3493, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ycoeffs_view, 1);
  __pyx_v_ycoeffs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3496
 * 
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_iir_filter(order, &ycoeffs_view[0], NULL))             # <<<<<<<<<<<<<<
 *     gen.cache_append(ycoeffs)
 *     return gen
 */
  __pyx_t_8 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_ycoeffs_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_ycoeffs_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 3496, __pyx_L1_error)
  }
  __pyx_t_7 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_iir_filter(__pyx_v_order, (&(*((double *) ( /* dim=0 */ (__pyx_v_ycoeffs_view.data + __pyx_t_8 * __pyx_v_ycoeffs_view.strides[0]) )))), NULL), NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":3497
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_iir_filter(order, &ycoeffs_view[0], NULL))
 *     gen.cache_append(ycoeffs)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_7 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_ycoeffs, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":3498
 *     gen = mus_any.from_ptr(cclm.mus_make_iir_filter(order, &ycoeffs_view[0], NULL))
 *     gen.cache_append(ycoeffs)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double iir_filter(mus_any gen, cython.double insig ):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3479
 * 
 * # ---------------- iir-filter ---------------- #
 * cpdef mus_any make_iir_filter(cython.int order, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new iir filter, ycoeffs a list/ndarray.
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_ycoeffs_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_ycoeffs);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_355make_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_354make_iir_filter, "\n    return a new iir filter, ycoeffs a list/ndarray.\n    \n    :param order: filter order\n    :param ycoeffs: y coeffs\n    :return: iir_filter gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_355make_iir_filter = {"make_iir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_355make_iir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_354make_iir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_355make_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_order;
  PyObject *__pyx_v_ycoeffs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_iir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_order,&__pyx_n_s_ycoeffs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_order)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3479, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ycoeffs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3479, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_iir_filter", 1, 2, 2, 1); __PYX_ERR(0, 3479, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_iir_filter") < 0)) __PYX_ERR(0, 3479, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_order = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3479, __pyx_L3_error)
    __pyx_v_ycoeffs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_iir_filter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3479, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_354make_iir_filter(__pyx_self, __pyx_v_order, __pyx_v_ycoeffs);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_354make_iir_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_ycoeffs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_iir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_iir_filter(__pyx_v_order, __pyx_v_ycoeffs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3500
 *     return gen
 * 
 * cpdef cython.double iir_filter(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from iir filter.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_357iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_iir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3508
 *     :rtype: float
 *     """
 *     return cclm.mus_iir_filter(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_iir_filter(mus_any gen):
 */
  __pyx_r = mus_iir_filter(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3500
 *     return gen
 * 
 * cpdef cython.double iir_filter(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from iir filter.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_357iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_356iir_filter, "\n    next sample from iir filter.\n    \n    :param gen: iir_filter gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_357iir_filter = {"iir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_357iir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_356iir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_357iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("iir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("iir_filter", 1, 2, 2, 1); __PYX_ERR(0, 3500, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "iir_filter") < 0)) __PYX_ERR(0, 3500, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("iir_filter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3500, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3500, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_356iir_filter(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_356iir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_iir_filter(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3510
 *     return cclm.mus_iir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_iir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a iir_filter
 */

static PyObject *__pyx_pw_8pysndlib_3clm_359is_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_iir_filter(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3516
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_iir_filter(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray make_fir_coeffs(cython.int order, envelope):
 */
  __pyx_r = mus_is_iir_filter(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3510
 *     return cclm.mus_iir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_iir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a iir_filter
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_359is_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_358is_iir_filter, "\n    returns True if gen is a iir_filter\n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_359is_iir_filter = {"is_iir_filter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_359is_iir_filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_358is_iir_filter};
static PyObject *__pyx_pw_8pysndlib_3clm_359is_iir_filter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_iir_filter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3510, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_iir_filter") < 0)) __PYX_ERR(0, 3510, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_iir_filter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3510, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3510, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_358is_iir_filter(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_358is_iir_filter(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_iir_filter", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_iir_filter(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3510, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_iir_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3518
 *     return cclm.mus_is_iir_filter(gen._ptr)
 * 
 * cpdef np.ndarray make_fir_coeffs(cython.int order, envelope):             # <<<<<<<<<<<<<<
 *     """
 *     translates a frequency response envelope (actually, evenly spaced points \in a float-vector) into
 */

static PyObject *__pyx_pw_8pysndlib_3clm_361make_fir_coeffs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_make_fir_coeffs(int __pyx_v_order, PyObject *__pyx_v_envelope, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_envelope_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_coeffs = NULL;
  __Pyx_memviewslice __pyx_v_coeffs_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fir_coeffs", 0);
  __Pyx_INCREF(__pyx_v_envelope);

  /* "pysndlib/clm.pyx":3527
 *     :param envelope: response envelope
 *     """
 *     cdef double [:] envelope_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(envelope, list):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __pyx_v_envelope_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3529
 *     cdef double [:] envelope_view = None
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.ndarray(envelope)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_envelope); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":3530
 * 
 *     if isinstance(envelope, list):
 *         envelope = np.ndarray(envelope)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(envelope)
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_v_envelope); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_envelope, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":3529
 *     cdef double [:] envelope_view = None
 * 
 *     if isinstance(envelope, list):             # <<<<<<<<<<<<<<
 *         envelope = np.ndarray(envelope)
 * 
 */
  }

  /* "pysndlib/clm.pyx":3532
 *         envelope = np.ndarray(envelope)
 * 
 *     check_ndim(envelope)             # <<<<<<<<<<<<<<
 * 
 *     envelope_view = envelope
 */
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_envelope, 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":3534
 *     check_ndim(envelope)
 * 
 *     envelope_view = envelope             # <<<<<<<<<<<<<<
 * 
 *     coeffs = np.zeros(order+1, dtype=np.double)
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_envelope, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_envelope_view, 1);
  __pyx_v_envelope_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3536
 *     envelope_view = envelope
 * 
 *     coeffs = np.zeros(order+1, dtype=np.double)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] coeffs_view = coeffs
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_v_order + 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 3536, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_coeffs = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pysndlib/clm.pyx":3538
 *     coeffs = np.zeros(order+1, dtype=np.double)
 * 
 *     cdef double [:] coeffs_view = coeffs             # <<<<<<<<<<<<<<
 * 
 *     cclm.mus_make_fir_coeffs(order, &envelope_view[0], &coeffs_view[0])
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_coeffs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 3538, __pyx_L1_error)
  __pyx_v_coeffs_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":3540
 *     cdef double [:] coeffs_view = coeffs
 * 
 *     cclm.mus_make_fir_coeffs(order, &envelope_view[0], &coeffs_view[0])             # <<<<<<<<<<<<<<
 *     return coeffs
 * 
 */
  __pyx_t_8 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_v_envelope_view.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_v_envelope_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 3540, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_coeffs_view.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_coeffs_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 3540, __pyx_L1_error)
  }
  (void)(mus_make_fir_coeffs(__pyx_v_order, (&(*((double *) ( /* dim=0 */ (__pyx_v_envelope_view.data + __pyx_t_8 * __pyx_v_envelope_view.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_coeffs_view.data + __pyx_t_10 * __pyx_v_coeffs_view.strides[0]) ))))));

  /* "pysndlib/clm.pyx":3541
 * 
 *     cclm.mus_make_fir_coeffs(order, &envelope_view[0], &coeffs_view[0])
 *     return coeffs             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (!(likely(((__pyx_v_coeffs) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_coeffs, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3541, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_coeffs);
  __pyx_r = ((PyArrayObject *)__pyx_v_coeffs);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3518
 *     return cclm.mus_is_iir_filter(gen._ptr)
 * 
 * cpdef np.ndarray make_fir_coeffs(cython.int order, envelope):             # <<<<<<<<<<<<<<
 *     """
 *     translates a frequency response envelope (actually, evenly spaced points \in a float-vector) into
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_fir_coeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_envelope_view, 1);
  __Pyx_XDECREF(__pyx_v_coeffs);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_coeffs_view, 1);
  __Pyx_XDECREF(__pyx_v_envelope);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_361make_fir_coeffs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_360make_fir_coeffs, "\n    translates a frequency response envelope (actually, evenly spaced points \\in a float-vector) into\n    the corresponding FIR filter coefficients. The order of the filter determines how close you get to the\n    envelope.\n    \n    :param order: order of the filter\n    :param envelope: response envelope\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_361make_fir_coeffs = {"make_fir_coeffs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_361make_fir_coeffs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_360make_fir_coeffs};
static PyObject *__pyx_pw_8pysndlib_3clm_361make_fir_coeffs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_order;
  PyObject *__pyx_v_envelope = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fir_coeffs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_order,&__pyx_n_s_envelope,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_order)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3518, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_envelope)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3518, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_fir_coeffs", 1, 2, 2, 1); __PYX_ERR(0, 3518, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_fir_coeffs") < 0)) __PYX_ERR(0, 3518, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_order = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3518, __pyx_L3_error)
    __pyx_v_envelope = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_fir_coeffs", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3518, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_fir_coeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_360make_fir_coeffs(__pyx_self, __pyx_v_order, __pyx_v_envelope);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_360make_fir_coeffs(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_order, PyObject *__pyx_v_envelope) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_fir_coeffs", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_fir_coeffs(__pyx_v_order, __pyx_v_envelope, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_fir_coeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3545
 * 
 * # ---------------- delay ---------------- #
 * cpdef mus_any make_delay(cython.long size, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new delay line of size elements. if the delay length will be changing at run-time,
 */

static PyObject *__pyx_pw_8pysndlib_3clm_363make_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_delay(long __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_delay *__pyx_optional_args) {
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  PyObject *__pyx_v_initial_element = ((PyObject *)Py_None);
  PyObject *__pyx_v_max_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__43;
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_delay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_element = __pyx_optional_args->initial_element;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_max_size = __pyx_optional_args->max_size;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_interp_type = __pyx_optional_args->interp_type;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);
  __Pyx_INCREF(__pyx_v_max_size);

  /* "pysndlib/clm.pyx":3559
 *     """
 * 
 *     check_range('size', size, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3561
 *     check_range('size', size, 0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if not max_size:
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":3563
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_size); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3563, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3564
 * 
 *     if not max_size:
 *         max_size = size             # <<<<<<<<<<<<<<
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_max_size, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":3563
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  }

  /* "pysndlib/clm.pyx":3566
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.LAGRANGE #think this is correct from clm2xen.c
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_size, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_6 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_interp_type == __pyx_e_8pysndlib_3clm_NONE);
  __pyx_t_6 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3567
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 *         interp_type = Interp.LAGRANGE #think this is correct from clm2xen.c             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents is not None:
 */
    __pyx_v_interp_type = __pyx_e_8pysndlib_3clm_LAGRANGE;

    /* "pysndlib/clm.pyx":3566
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.LAGRANGE #think this is correct from clm2xen.c
 * 
 */
  }

  /* "pysndlib/clm.pyx":3569
 *         interp_type = Interp.LAGRANGE #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_6 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3570
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_6 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_6) {

      /* "pysndlib/clm.pyx":3571
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_initial_contents};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":3570
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":3572
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3573
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3573, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":3569
 *         interp_type = Interp.LAGRANGE #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":3575
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_initial_element); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3576
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_max_size);
    __Pyx_GIVEREF(__pyx_v_max_size);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_max_size)) __PYX_ERR(0, 3576, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3577
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3578
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_initial_element};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3579
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3579, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":3575
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":3581
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
  __pyx_t_6 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3582
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, NULL, max_size, <cclm.mus_interp_t>interp_type))
 */
    __pyx_t_11 = 0;
    __pyx_t_8 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      __PYX_ERR(0, 3582, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3582, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_delay(__pyx_v_size, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_11 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3581
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":3584
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, NULL, max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 * 
 *     gen.cache_append(initial_contents)
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3584, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_delay(__pyx_v_size, NULL, __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":3586
 *         gen = mus_any.from_ptr(cclm.mus_make_delay(size, NULL, max_size, <cclm.mus_interp_t>interp_type))
 * 
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_10 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pysndlib/clm.pyx":3587
 * 
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3545
 * 
 * # ---------------- delay ---------------- #
 * cpdef mus_any make_delay(cython.long size, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new delay line of size elements. if the delay length will be changing at run-time,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysndlib.clm.make_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XDECREF(__pyx_v_max_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_363make_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_362make_delay, "\n    return a new delay line of size elements. if the delay length will be changing at run-time,\n    max-size sets its maximum length.\n    \n    :param size: delay length \\in samples\n    :param initial_contents: delay line's initial values\n    :param initial_element: delay line's initial element\n    :param max_size: maximum delay size \\in case the delay changes\n    :param type: interpolation type\n    :return: delay gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_363make_delay = {"make_delay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_363make_delay, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_362make_delay};
static PyObject *__pyx_pw_8pysndlib_3clm_363make_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_size;
  PyObject *__pyx_v_initial_contents = 0;
  PyObject *__pyx_v_initial_element = 0;
  PyObject *__pyx_v_max_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_delay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,&__pyx_n_s_max_size,&__pyx_n_s_interp_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_delay") < 0)) __PYX_ERR(0, 3545, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
    __pyx_v_initial_contents = values[1];
    __pyx_v_initial_element = values[2];
    __pyx_v_max_size = values[3];
    if (values[4]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[4])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__43;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_delay", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3545, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_362make_delay(__pyx_self, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element, __pyx_v_max_size, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_362make_delay(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, PyObject *__pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_delay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_delay", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_2.max_size = __pyx_v_max_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_delay(__pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3589
 *     return gen
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */

static PyObject *__pyx_pw_8pysndlib_3clm_365delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_delay *__pyx_optional_args) {
  double __pyx_v_pm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pm = __pyx_optional_args->pm;
    }
  }

  /* "pysndlib/clm.pyx":3601
 * 
 *     """
 *     return cclm.mus_delay(gen._ptr, insig, pm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_delay(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_pm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3589
 *     return gen
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_365delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_364delay, "\n    delay val according to the delay line's length and pm ('phase-modulation').\n    if pm is greater than 0.0, the max-size argument used to create gen should have accommodated \n    its maximum value. \n    \n    :param gen: delay gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_365delay = {"delay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_365delay, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_364delay};
static PyObject *__pyx_pw_8pysndlib_3clm_365delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_pm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_pm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("delay", 0, 2, 3, 1); __PYX_ERR(0, 3589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delay") < 0)) __PYX_ERR(0, 3589, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_pm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L3_error)
    } else {
      __pyx_v_pm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("delay", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3589, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3589, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_364delay(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_364delay(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_delay __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delay", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_delay(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3589, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3604
 * 
 * 
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */

static PyObject *__pyx_pw_8pysndlib_3clm_367delay_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3615
 * 
 *     """
 *     return cclm.mus_delay_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_delay(mus_any gen):
 */
  __pyx_r = mus_delay_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3604
 * 
 * 
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_367delay_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_366delay_unmodulated, "\n    delay val according to the delay line's length and pm ('phase-modulation').\n    if pm is greater than 0.0, the max-size argument used to create gen should have accommodated \n    its maximum value. \n    \n    :param gen: delay gen\n    :param insig: input value\n    :rtype: float\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_367delay_unmodulated = {"delay_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_367delay_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_366delay_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_367delay_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delay_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("delay_unmodulated", 1, 2, 2, 1); __PYX_ERR(0, 3604, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delay_unmodulated") < 0)) __PYX_ERR(0, 3604, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("delay_unmodulated", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3604, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.delay_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3604, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_366delay_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_366delay_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delay_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_delay_unmodulated(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.delay_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3617
 *     return cclm.mus_delay_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_delay(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a delay.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_369is_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_delay(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3624
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_delay(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double tap(mus_any gen, offset=0.):
 */
  __pyx_r = mus_is_delay(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3617
 *     return cclm.mus_delay_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_delay(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a delay.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_369is_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_368is_delay, "\n    returns True if gen is a delay.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_369is_delay = {"is_delay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_369is_delay, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_368is_delay};
static PyObject *__pyx_pw_8pysndlib_3clm_369is_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_delay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3617, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_delay") < 0)) __PYX_ERR(0, 3617, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_delay", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3617, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3617, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_368is_delay(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_368is_delay(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_delay", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_delay(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3617, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3626
 *     return cclm.mus_is_delay(gen._ptr)
 * 
 * cpdef cython.double tap(mus_any gen, offset=0.):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */

static PyObject *__pyx_pw_8pysndlib_3clm_371tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_tap(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_tap *__pyx_optional_args) {
  PyObject *__pyx_v_offset = ((PyObject *)__pyx_float_0_);
  double __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "pysndlib/clm.pyx":3636
 *     """
 * 
 *     return cclm.mus_tap(gen._ptr, offset)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double tap_unmodulated(mus_any gen):
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_offset); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3636, __pyx_L1_error)
  __pyx_r = mus_tap(__pyx_v_gen->_ptr, __pyx_t_1);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3626
 *     return cclm.mus_is_delay(gen._ptr)
 * 
 * cpdef cython.double tap(mus_any gen, offset=0.):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.tap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_371tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_370tap, "\n    tap the delay mus_any offset by pm\n    \n    :param gen: delay gen\n    :param offset: offset in samples from output point\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_371tap = {"tap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_371tap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_370tap};
static PyObject *__pyx_pw_8pysndlib_3clm_371tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  PyObject *__pyx_v_offset = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_offset,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_0_));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3626, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_offset);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3626, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tap") < 0)) __PYX_ERR(0, 3626, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_offset = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tap", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3626, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.tap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3626, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_370tap(__pyx_self, __pyx_v_gen, __pyx_v_offset);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_370tap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, PyObject *__pyx_v_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_tap __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tap", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.offset = __pyx_v_offset;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_tap(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3626, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.tap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3638
 *     return cclm.mus_tap(gen._ptr, offset)
 * 
 * cpdef cython.double tap_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */

static PyObject *__pyx_pw_8pysndlib_3clm_373tap_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_tap_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3647
 * 
 *     """
 *     return cclm.mus_tap_unmodulated(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_tap(mus_any gen):
 */
  __pyx_r = mus_tap_unmodulated(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3638
 *     return cclm.mus_tap(gen._ptr, offset)
 * 
 * cpdef cython.double tap_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_373tap_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_372tap_unmodulated, "\n    tap the delay mus_any offset by pm\n    \n    :param gen: delay gen\n    :param offset: offset in samples from output point\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_373tap_unmodulated = {"tap_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_373tap_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_372tap_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_373tap_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tap_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3638, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tap_unmodulated") < 0)) __PYX_ERR(0, 3638, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tap_unmodulated", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3638, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.tap_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3638, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_372tap_unmodulated(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_372tap_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tap_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_tap_unmodulated(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3638, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.tap_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3649
 *     return cclm.mus_tap_unmodulated(gen._ptr)
 * 
 * cpdef bint is_tap(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a tap.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_375is_tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_tap(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3656
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_tap(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig ):
 */
  __pyx_r = mus_is_tap(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3649
 *     return cclm.mus_tap_unmodulated(gen._ptr)
 * 
 * cpdef bint is_tap(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a tap.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_375is_tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_374is_tap, "\n    returns True if gen is a tap.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_375is_tap = {"is_tap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_375is_tap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_374is_tap};
static PyObject *__pyx_pw_8pysndlib_3clm_375is_tap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_tap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3649, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_tap") < 0)) __PYX_ERR(0, 3649, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_tap", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3649, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_tap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3649, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_374is_tap(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_374is_tap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_tap", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_tap(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3649, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_tap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3658
 *     return cclm.mus_is_tap(gen._ptr)
 * 
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length. this merely 'ticks' the delay line forward.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_377delay_tick(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_delay_tick(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3666
 *     :rtype: float
 *     """
 *     return cclm.mus_delay_tick(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_delay_tick(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3658
 *     return cclm.mus_is_tap(gen._ptr)
 * 
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length. this merely 'ticks' the delay line forward.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_377delay_tick(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_376delay_tick, "\n    delay val according to the delay line's length. this merely 'ticks' the delay line forward.\n    the argument 'insi' is returned.\n    \n    :param gen: delay gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_377delay_tick = {"delay_tick", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_377delay_tick, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_376delay_tick};
static PyObject *__pyx_pw_8pysndlib_3clm_377delay_tick(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delay_tick (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("delay_tick", 1, 2, 2, 1); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delay_tick") < 0)) __PYX_ERR(0, 3658, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("delay_tick", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3658, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.delay_tick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3658, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_376delay_tick(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_376delay_tick(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delay_tick", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_delay_tick(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.delay_tick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3670
 * 
 * # ---------------- comb ---------------- #
 * cpdef mus_any make_comb(cython.double feedback=1.0,size=None, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb
 */

static PyObject *__pyx_pw_8pysndlib_3clm_379make_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_comb(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_comb *__pyx_optional_args) {
  double __pyx_v_feedback = ((double)1.0);
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  PyObject *__pyx_v_initial_element = ((PyObject *)Py_None);
  PyObject *__pyx_v_max_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__44;
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_2;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_comb", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_feedback = __pyx_optional_args->feedback;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_size = __pyx_optional_args->size;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_initial_element = __pyx_optional_args->initial_element;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_max_size = __pyx_optional_args->max_size;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_interp_type = __pyx_optional_args->interp_type;
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);
  __Pyx_INCREF(__pyx_v_max_size);

  /* "pysndlib/clm.pyx":3686
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.low = __pyx_float_0_0;
  __pyx_t_2.high = Py_None;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_v_size, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3688
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if not max_size:
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3688, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":3690
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_max_size); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3690, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3691
 * 
 *     if not max_size:
 *         max_size = size             # <<<<<<<<<<<<<<
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 */
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_DECREF_SET(__pyx_v_max_size, __pyx_v_size);

    /* "pysndlib/clm.pyx":3690
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  }

  /* "pysndlib/clm.pyx":3693
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_size, __pyx_v_size, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_5 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_interp_type == __pyx_e_8pysndlib_3clm_NONE);
  __pyx_t_5 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3694
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents is not None:
 */
    __pyx_v_interp_type = __pyx_e_8pysndlib_3clm_BEZIER;

    /* "pysndlib/clm.pyx":3693
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  }

  /* "pysndlib/clm.pyx":3696
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3697
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_5 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":3698
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_initial_contents};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":3697
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":3699
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3700
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3700, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_3;
    __pyx_t_3.memview = NULL;
    __pyx_t_3.data = NULL;

    /* "pysndlib/clm.pyx":3696
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":3702
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_initial_element); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3702, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3703
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_max_size};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3704
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3705
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_initial_element};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3706
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3706, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_3;
    __pyx_t_3.memview = NULL;
    __pyx_t_3.data = NULL;

    /* "pysndlib/clm.pyx":3702
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":3708
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
  __pyx_t_5 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3709
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, NULL, max_size,  <cclm.mus_interp_t>interp_type))
 */
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3709, __pyx_L1_error)
    __pyx_t_9 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      __PYX_ERR(0, 3709, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3709, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_comb(__pyx_v_feedback, __pyx_t_8, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_9 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_t_10, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3708
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":3711
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, NULL, max_size,  <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     gen.cache_append(initial_contents)
 *     return gen
 */
  /*else*/ {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3711, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3711, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_comb(__pyx_v_feedback, __pyx_t_10, NULL, __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":3712
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, NULL, max_size,  <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3713
 *         gen = mus_any.from_ptr(cclm.mus_make_comb(feedback, size, NULL, max_size,  <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=None):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3670
 * 
 * # ---------------- comb ---------------- #
 * cpdef mus_any make_comb(cython.double feedback=1.0,size=None, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XDECREF(__pyx_v_max_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_379make_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_378make_comb, "\n    return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb\n    length will be changing at run-time, max-size sets its maximum length.       \n    \n    :param feedback: scaler on feedback\n    :param size: delay length \\in samples\n    :param initial_contents: delay line's initial values\n    :param initial_element: delay line's initial element\n    :param max_size: maximum delay size \\in case the delay changes\n    :param type: interpolation type\n    :return: comb gen\n    :rtype: mus_any\n        \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_379make_comb = {"make_comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_379make_comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_378make_comb};
static PyObject *__pyx_pw_8pysndlib_3clm_379make_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_feedback;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_initial_contents = 0;
  PyObject *__pyx_v_initial_element = 0;
  PyObject *__pyx_v_max_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_feedback,&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,&__pyx_n_s_max_size,&__pyx_n_s_interp_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_feedback);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_comb") < 0)) __PYX_ERR(0, 3670, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_feedback = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_feedback == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
    } else {
      __pyx_v_feedback = ((double)1.0);
    }
    __pyx_v_size = values[1];
    __pyx_v_initial_contents = values[2];
    __pyx_v_initial_element = values[3];
    __pyx_v_max_size = values[4];
    if (values[5]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[5])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__44;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_comb", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 3670, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_378make_comb(__pyx_self, __pyx_v_feedback, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element, __pyx_v_max_size, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_378make_comb(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, PyObject *__pyx_v_size, PyObject *__pyx_v_initial_contents, PyObject *__pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_comb __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 6;
  __pyx_t_2.feedback = __pyx_v_feedback;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_2.max_size = __pyx_v_max_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_comb(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3715
 *     return gen
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     comb filter val, pm changes the delay length.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_381comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_comb *__pyx_optional_args) {
  PyObject *__pyx_v_pm = ((PyObject *)Py_None);
  double __pyx_r;
  int __pyx_t_1;
  mus_float_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pm = __pyx_optional_args->pm;
    }
  }

  /* "pysndlib/clm.pyx":3724
 *     :rtype: float
 *     """
 *     if pm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_comb(gen._ptr, insig, pm)
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pm); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3724, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":3725
 *     """
 *     if pm:
 *         return cclm.mus_comb(gen._ptr, insig, pm)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)
 */
    __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_pm); if (unlikely((__pyx_t_2 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3725, __pyx_L1_error)
    __pyx_r = mus_comb(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_t_2);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":3724
 *     :rtype: float
 *     """
 *     if pm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_comb(gen._ptr, insig, pm)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":3727
 *         return cclm.mus_comb(gen._ptr, insig, pm)
 *     else:
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_comb(mus_any gen):
 */
  /*else*/ {
    __pyx_r = mus_comb_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":3715
 *     return gen
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     comb filter val, pm changes the delay length.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_381comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_380comb, "\n    comb filter val, pm changes the delay length.\n    \n    :param gen: comb gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_381comb = {"comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_381comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_380comb};
static PyObject *__pyx_pw_8pysndlib_3clm_381comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  PyObject *__pyx_v_pm = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_pm,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("comb", 0, 2, 3, 1); __PYX_ERR(0, 3715, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "comb") < 0)) __PYX_ERR(0, 3715, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L3_error)
    __pyx_v_pm = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("comb", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3715, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3715, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_380comb(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_380comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, PyObject *__pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_comb __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_comb(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3729
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_383is_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3736
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_comb(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- comb-bank ---------------- #
 */
  __pyx_r = mus_is_comb(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3729
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_383is_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_382is_comb, "\n    returns True if gen is a comb.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_383is_comb = {"is_comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_383is_comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_382is_comb};
static PyObject *__pyx_pw_8pysndlib_3clm_383is_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3729, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_comb") < 0)) __PYX_ERR(0, 3729, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_comb", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3729, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3729, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_382is_comb(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_382is_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_comb(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3729, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3739
 * 
 * # ---------------- comb-bank ---------------- #
 * cpdef mus_any make_comb_bank(list combs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb-bank generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_385make_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_comb_bank(PyObject *__pyx_v_combs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_comb_array = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_comb_bank", 1);

  /* "pysndlib/clm.pyx":3749
 *     """
 * 
 *     p = list(map(is_comb, combs))             # <<<<<<<<<<<<<<
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_comb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_combs);
  __Pyx_GIVEREF(__pyx_v_combs);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_combs)) __PYX_ERR(0, 3749, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_p = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3750
 * 
 *     p = list(map(is_comb, combs))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":3751
 *     p = list(map(is_comb, combs))
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')             # <<<<<<<<<<<<<<
 * 
 *     comb_array = mus_any_array.from_pylist(combs)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3751, __pyx_L1_error)

    /* "pysndlib/clm.pyx":3750
 * 
 *     p = list(map(is_comb, combs))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":3753
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')
 * 
 *     comb_array = mus_any_array.from_pylist(combs)             # <<<<<<<<<<<<<<
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_comb_bank(len(combs), comb_array.data))
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(__pyx_v_combs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_comb_array = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3755
 *     comb_array = mus_any_array.from_pylist(combs)
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_comb_bank(len(combs), comb_array.data))             # <<<<<<<<<<<<<<
 *     gen.cache_extend([comb_array, combs])
 *     return gen
 */
  if (unlikely(__pyx_v_combs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3755, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyList_GET_SIZE(__pyx_v_combs); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3755, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_comb_bank(__pyx_t_5, __pyx_v_comb_array->data), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3756
 * 
 *     gen = mus_any.from_ptr(cclm.mus_make_comb_bank(len(combs), comb_array.data))
 *     gen.cache_extend([comb_array, combs])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_comb_array);
  __Pyx_GIVEREF((PyObject *)__pyx_v_comb_array);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_comb_array))) __PYX_ERR(0, 3756, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_combs);
  __Pyx_GIVEREF(__pyx_v_combs);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_combs)) __PYX_ERR(0, 3756, __pyx_L1_error);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3757
 *     gen = mus_any.from_ptr(cclm.mus_make_comb_bank(len(combs), comb_array.data))
 *     gen.cache_extend([comb_array, combs])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double comb_bank(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3739
 * 
 * # ---------------- comb-bank ---------------- #
 * cpdef mus_any make_comb_bank(list combs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb-bank generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF((PyObject *)__pyx_v_comb_array);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_385make_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_384make_comb_bank, "\n    return a new comb-bank generator.\n    \n    :param combs: list of comb gens\n    :return: comb_bank gen\n    :rtype: mus_any\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_385make_comb_bank = {"make_comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_385make_comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_384make_comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_385make_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_combs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_combs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_combs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3739, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_comb_bank") < 0)) __PYX_ERR(0, 3739, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_combs = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_comb_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3739, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_combs), (&PyList_Type), 1, "combs", 1))) __PYX_ERR(0, 3739, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_384make_comb_bank(__pyx_self, __pyx_v_combs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_384make_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_combs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_comb_bank(__pyx_v_combs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3759
 *     return gen
 * 
 * cpdef cython.double comb_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of comb filters.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_387comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3767
 *     :rtype: float
 *     """
 *     return cclm.mus_comb_bank(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_comb_bank(mus_any gen):
 */
  __pyx_r = mus_comb_bank(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3759
 *     return gen
 * 
 * cpdef cython.double comb_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of comb filters.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_387comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_386comb_bank, "\n    sum an array of comb filters.\n    \n    :param gen: comb_bank gen\n    :param inputs: can be a list/array of inputs or a single input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_387comb_bank = {"comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_387comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_386comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_387comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3759, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3759, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("comb_bank", 1, 2, 2, 1); __PYX_ERR(0, 3759, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "comb_bank") < 0)) __PYX_ERR(0, 3759, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3759, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("comb_bank", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3759, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3759, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_386comb_bank(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_386comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_comb_bank(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3759, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3769
 *     return cclm.mus_comb_bank(gen._ptr, insig)
 * 
 * cpdef bint is_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb_bank
 */

static PyObject *__pyx_pw_8pysndlib_3clm_389is_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3776
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_comb_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_comb_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3769
 *     return cclm.mus_comb_bank(gen._ptr, insig)
 * 
 * cpdef bint is_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb_bank
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_389is_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_388is_comb_bank, "\n    returns True if gen is a comb_bank\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_389is_comb_bank = {"is_comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_389is_comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_388is_comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_389is_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3769, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_comb_bank") < 0)) __PYX_ERR(0, 3769, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_comb_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3769, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3769, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_388is_comb_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_388is_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_comb_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3769, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3780
 * 
 * # ---------------- filtered-comb ---------------- #
 * cpdef mus_any make_filtered_comb(cython.double feedback,cython.long size, mus_any filter, initial_contents=None,  cython.double initial_element=0.0, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

static PyObject *__pyx_pw_8pysndlib_3clm_391make_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filtered_comb(double __pyx_v_feedback, long __pyx_v_size, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_filter, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_filtered_comb *__pyx_optional_args) {
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_initial_element = ((double)0.0);
  PyObject *__pyx_v_max_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__45;
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filtered_comb", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_element = __pyx_optional_args->initial_element;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_max_size = __pyx_optional_args->max_size;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_interp_type = __pyx_optional_args->interp_type;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);
  __Pyx_INCREF(__pyx_v_max_size);

  /* "pysndlib/clm.pyx":3796
 *     :rtype: mus_any
 *     """
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3798
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if not max_size:
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":3800
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_size); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3800, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3801
 * 
 *     if not max_size:
 *         max_size = size             # <<<<<<<<<<<<<<
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_max_size, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":3800
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  }

  /* "pysndlib/clm.pyx":3803
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_size, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_6 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_interp_type == __pyx_e_8pysndlib_3clm_NONE);
  __pyx_t_6 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3804
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents is not None:
 */
    __pyx_v_interp_type = __pyx_e_8pysndlib_3clm_BEZIER;

    /* "pysndlib/clm.pyx":3803
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  }

  /* "pysndlib/clm.pyx":3806
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_6 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3807
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_6 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_6) {

      /* "pysndlib/clm.pyx":3808
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_initial_contents};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3808, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":3807
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         initial_contents_view = initial_contents
 */
    }

    /* "pysndlib/clm.pyx":3809
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3809, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":3806
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":3811
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 */
  __pyx_t_6 = (__pyx_v_initial_element != 0);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3812
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_max_size};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3813
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3814
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_initial_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3815
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3815, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":3811
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":3817
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), &initial_contents_view[0], int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 *     else:
 */
  __pyx_t_6 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":3818
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), &initial_contents_view[0], int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), NULL, int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 */
    __pyx_t_10 = 0;
    __pyx_t_8 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      __PYX_ERR(0, 3818, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_max_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3818, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_filtered_comb(__pyx_v_feedback, ((int)__pyx_v_size), (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_10 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type), __pyx_v_filter->_ptr), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3817
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), &initial_contents_view[0], int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 *     else:
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":3820
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), &initial_contents_view[0], int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), NULL, int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))             # <<<<<<<<<<<<<<
 *     gen.cache_append(initial_contents)
 *     return gen
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_max_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3820, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_filtered_comb(__pyx_v_feedback, ((int)__pyx_v_size), NULL, __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type), __pyx_v_filter->_ptr), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":3821
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), NULL, int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3822
 *         gen = mus_any.from_ptr(cclm.mus_make_filtered_comb(feedback, int(size), NULL, int(max_size), <cclm.mus_interp_t>interp_type, filter._ptr))
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3780
 * 
 * # ---------------- filtered-comb ---------------- #
 * cpdef mus_any make_filtered_comb(cython.double feedback,cython.long size, mus_any filter, initial_contents=None,  cython.double initial_element=0.0, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XDECREF(__pyx_v_max_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_391make_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_390make_filtered_comb, "\n    return a new filtered comb filter (a delay line with a scaler and a filter on the feedback) of size\n    elements. if the comb length will be changing at run-time, max-size sets its maximum length.     \n    \n    :param feedback: scaler on feedback\n    :param size: delay length \\in samples\n    :param filter: filter to apply \n    :param initial_contents: delay line's initial values\n    :param initial_element: delay line's initial element\n    :param max_size: maximum delay size \\in case the delay changes\n    :param type: interpolation type\n    :return: filtered_comb gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_391make_filtered_comb = {"make_filtered_comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_391make_filtered_comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_390make_filtered_comb};
static PyObject *__pyx_pw_8pysndlib_3clm_391make_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_feedback;
  long __pyx_v_size;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_filter = 0;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_initial_element;
  PyObject *__pyx_v_max_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_filtered_comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_feedback,&__pyx_n_s_size,&__pyx_n_s_filter,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,&__pyx_n_s_max_size,&__pyx_n_s_interp_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_feedback)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_filtered_comb", 0, 3, 7, 1); __PYX_ERR(0, 3780, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_filtered_comb", 0, 3, 7, 2); __PYX_ERR(0, 3780, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_filtered_comb") < 0)) __PYX_ERR(0, 3780, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_feedback = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_feedback == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
    __pyx_v_size = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
    __pyx_v_filter = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[2]);
    __pyx_v_initial_contents = values[3];
    if (values[4]) {
      __pyx_v_initial_element = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_initial_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
    } else {
      __pyx_v_initial_element = ((double)0.0);
    }
    __pyx_v_max_size = values[5];
    if (values[6]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[6])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__45;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_filtered_comb", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 3780, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filter), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "filter", 0))) __PYX_ERR(0, 3780, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_390make_filtered_comb(__pyx_self, __pyx_v_feedback, __pyx_v_size, __pyx_v_filter, __pyx_v_initial_contents, __pyx_v_initial_element, __pyx_v_max_size, __pyx_v_interp_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_390make_filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, long __pyx_v_size, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_filter, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_filtered_comb __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filtered_comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_2.max_size = __pyx_v_max_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_filtered_comb(__pyx_v_feedback, __pyx_v_size, __pyx_v_filter, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3824
 *     return gen
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_393filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_filtered_comb *__pyx_optional_args) {
  double __pyx_v_pm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pm = __pyx_optional_args->pm;
    }
  }

  /* "pysndlib/clm.pyx":3833
 *     :rtype: float
 *     """
 *     return cclm.mus_filtered_comb(gen._ptr, insig, pm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_filtered_comb(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_pm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3824
 *     return gen
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_393filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_392filtered_comb, "\n    filtered comb filter val, pm changes the delay length.\n    \n    :param gen: filtered_comb gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_393filtered_comb = {"filtered_comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_393filtered_comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_392filtered_comb};
static PyObject *__pyx_pw_8pysndlib_3clm_393filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_pm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("filtered_comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_pm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("filtered_comb", 0, 2, 3, 1); __PYX_ERR(0, 3824, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "filtered_comb") < 0)) __PYX_ERR(0, 3824, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_pm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L3_error)
    } else {
      __pyx_v_pm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filtered_comb", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3824, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3824, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_392filtered_comb(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_392filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_filtered_comb __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filtered_comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filtered_comb(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3824, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3836
 * 
 * 
 * cpdef cython.double filtered_comb_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_395filtered_comb_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3845
 *     :rtype: float
 *     """
 *     return cclm.mus_filtered_comb_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_filtered_comb(mus_any gen):
 */
  __pyx_r = mus_filtered_comb_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3836
 * 
 * 
 * cpdef cython.double filtered_comb_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_395filtered_comb_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_394filtered_comb_unmodulated, "\n    filtered comb filter val, pm changes the delay length. unmodulated\n    \n    :param gen: filtered_comb gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_395filtered_comb_unmodulated = {"filtered_comb_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_395filtered_comb_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_394filtered_comb_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_395filtered_comb_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("filtered_comb_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("filtered_comb_unmodulated", 1, 2, 2, 1); __PYX_ERR(0, 3836, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "filtered_comb_unmodulated") < 0)) __PYX_ERR(0, 3836, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filtered_comb_unmodulated", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3836, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3836, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_394filtered_comb_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_394filtered_comb_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filtered_comb_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filtered_comb_unmodulated(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3847
 *     return cclm.mus_filtered_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_filtered_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_397is_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filtered_comb(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3854
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_filtered_comb(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- filtered-comb-bank ---------------- #
 */
  __pyx_r = mus_is_filtered_comb(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3847
 *     return cclm.mus_filtered_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_filtered_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_397is_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_396is_filtered_comb, "\n    returns True if gen is a filtered_comb.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_397is_filtered_comb = {"is_filtered_comb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_397is_filtered_comb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_396is_filtered_comb};
static PyObject *__pyx_pw_8pysndlib_3clm_397is_filtered_comb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_filtered_comb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3847, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_filtered_comb") < 0)) __PYX_ERR(0, 3847, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_filtered_comb", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3847, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3847, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_396is_filtered_comb(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_396is_filtered_comb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_filtered_comb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_filtered_comb(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3847, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_filtered_comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3857
 * 
 * # ---------------- filtered-comb-bank ---------------- #
 * cpdef mus_any make_filtered_comb_bank(list fcombs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new filtered_comb-bank generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_399make_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_filtered_comb_bank(PyObject *__pyx_v_fcombs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_fcomb_array = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filtered_comb_bank", 1);

  /* "pysndlib/clm.pyx":3865
 *     :rtype: mus_any
 *     """
 *     p = list(map(is_formant, fcombs))             # <<<<<<<<<<<<<<
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_formant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3865, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_fcombs);
  __Pyx_GIVEREF(__pyx_v_fcombs);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_fcombs)) __PYX_ERR(0, 3865, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_p = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3866
 *     """
 *     p = list(map(is_formant, fcombs))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":3867
 *     p = list(map(is_formant, fcombs))
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')             # <<<<<<<<<<<<<<
 * 
 *     fcomb_array = mus_any_array.from_pylist(fcombs)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3867, __pyx_L1_error)

    /* "pysndlib/clm.pyx":3866
 *     """
 *     p = list(map(is_formant, fcombs))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":3869
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')
 * 
 *     fcomb_array = mus_any_array.from_pylist(fcombs)             # <<<<<<<<<<<<<<
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_filtered_comb_bank(len(fcombs), fcomb_array.data))
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(__pyx_v_fcombs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_fcomb_array = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3871
 *     fcomb_array = mus_any_array.from_pylist(fcombs)
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_filtered_comb_bank(len(fcombs), fcomb_array.data))             # <<<<<<<<<<<<<<
 *     gen.cache_extend([fcomb_array, fcombs])
 *     return gen
 */
  if (unlikely(__pyx_v_fcombs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3871, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyList_GET_SIZE(__pyx_v_fcombs); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3871, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_filtered_comb_bank(__pyx_t_5, __pyx_v_fcomb_array->data), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3872
 * 
 *     gen =  mus_any.from_ptr(cclm.mus_make_filtered_comb_bank(len(fcombs), fcomb_array.data))
 *     gen.cache_extend([fcomb_array, fcombs])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_fcomb_array);
  __Pyx_GIVEREF((PyObject *)__pyx_v_fcomb_array);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_fcomb_array))) __PYX_ERR(0, 3872, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_fcombs);
  __Pyx_GIVEREF(__pyx_v_fcombs);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_fcombs)) __PYX_ERR(0, 3872, __pyx_L1_error);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3873
 *     gen =  mus_any.from_ptr(cclm.mus_make_filtered_comb_bank(len(fcombs), fcomb_array.data))
 *     gen.cache_extend([fcomb_array, fcombs])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double filtered_comb_bank(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3857
 * 
 * # ---------------- filtered-comb-bank ---------------- #
 * cpdef mus_any make_filtered_comb_bank(list fcombs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new filtered_comb-bank generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF((PyObject *)__pyx_v_fcomb_array);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_399make_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_398make_filtered_comb_bank, "\n    return a new filtered_comb-bank generator.\n    \n    :param fcombs: list of filtered_comb gens\n    :return: filtered_comb_bank gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_399make_filtered_comb_bank = {"make_filtered_comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_399make_filtered_comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_398make_filtered_comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_399make_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_fcombs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_filtered_comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fcombs,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fcombs)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3857, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_filtered_comb_bank") < 0)) __PYX_ERR(0, 3857, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_fcombs = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_filtered_comb_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3857, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fcombs), (&PyList_Type), 1, "fcombs", 1))) __PYX_ERR(0, 3857, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_398make_filtered_comb_bank(__pyx_self, __pyx_v_fcombs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_398make_filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fcombs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_filtered_comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_filtered_comb_bank(__pyx_v_fcombs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3875
 *     return gen
 * 
 * cpdef cython.double filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of filtered_comb filters.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_401filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_filtered_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  mus_float_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":3883
 *     :rtype: float
 *     """
 *     return cclm.mus_filtered_comb_bank(gen._ptr, input)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_filtered_comb_bank(mus_any gen):
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_builtin_input); if (unlikely((__pyx_t_1 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3883, __pyx_L1_error)
  __pyx_r = mus_filtered_comb_bank(__pyx_v_gen->_ptr, __pyx_t_1);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3875
 *     return gen
 * 
 * cpdef cython.double filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of filtered_comb filters.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_401filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_400filtered_comb_bank, "\n    sum an array of filtered_comb filters.\n    \n    :param gen: filtered_comb gen\n    :param inputs: can be a list/array of inputs or a single input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_401filtered_comb_bank = {"filtered_comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_401filtered_comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_400filtered_comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_401filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("filtered_comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3875, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "filtered_comb_bank") < 0)) __PYX_ERR(0, 3875, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filtered_comb_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3875, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3875, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_400filtered_comb_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_400filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filtered_comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filtered_comb_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3875, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3885
 *     return cclm.mus_filtered_comb_bank(gen._ptr, input)
 * 
 * cpdef bint is_filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb_bank.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_403is_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_filtered_comb_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3892
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_filtered_comb_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- notch ---------------- #
 */
  __pyx_r = mus_is_filtered_comb_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3885
 *     return cclm.mus_filtered_comb_bank(gen._ptr, input)
 * 
 * cpdef bint is_filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb_bank.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_403is_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_402is_filtered_comb_bank, "\n    returns True if gen is a filtered_comb_bank.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_403is_filtered_comb_bank = {"is_filtered_comb_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_403is_filtered_comb_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_402is_filtered_comb_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_403is_filtered_comb_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_filtered_comb_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3885, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_filtered_comb_bank") < 0)) __PYX_ERR(0, 3885, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_filtered_comb_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3885, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3885, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_402is_filtered_comb_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_402is_filtered_comb_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_filtered_comb_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_filtered_comb_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3885, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_filtered_comb_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */

static PyObject *__pyx_pw_8pysndlib_3clm_405make_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_notch(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_notch *__pyx_optional_args) {
  double __pyx_v_feedforward = ((double)1.0);
  PyObject *__pyx_v_size = ((PyObject *)Py_None);

  /* "pysndlib/clm.pyx":3896
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,
 *                 initial_contents=None,             # <<<<<<<<<<<<<<
 *                 cython.double initial_element=0.0,
 *                 max_size=None,
 */
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_initial_element = ((double)0.0);

  /* "pysndlib/clm.pyx":3898
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 *                 max_size=None,             # <<<<<<<<<<<<<<
 *                 Interp interp_type=Interp.NONE):
 * 
 */
  PyObject *__pyx_v_max_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__47;
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_2;
  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_notch", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_feedforward = __pyx_optional_args->feedforward;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_size = __pyx_optional_args->size;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_initial_element = __pyx_optional_args->initial_element;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_max_size = __pyx_optional_args->max_size;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_interp_type = __pyx_optional_args->interp_type;
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);
  __Pyx_INCREF(__pyx_v_max_size);

  /* "pysndlib/clm.pyx":3915
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.low = __pyx_float_0_0;
  __pyx_t_2.high = Py_None;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_v_size, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":3917
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if not max_size:
 */
  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3917, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_3;
  __pyx_t_3.memview = NULL;
  __pyx_t_3.data = NULL;

  /* "pysndlib/clm.pyx":3919
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_max_size); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3919, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3920
 * 
 *     if not max_size:
 *         max_size = size             # <<<<<<<<<<<<<<
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 */
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_DECREF_SET(__pyx_v_max_size, __pyx_v_size);

    /* "pysndlib/clm.pyx":3919
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  }

  /* "pysndlib/clm.pyx":3922
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_size, __pyx_v_size, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_5 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_interp_type == __pyx_e_8pysndlib_3clm_NONE);
  __pyx_t_5 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3923
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_interp_type = __pyx_e_8pysndlib_3clm_BEZIER;

    /* "pysndlib/clm.pyx":3922
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.BEZIER #think this is correct from clm2xen.c
 * 
 */
  }

  /* "pysndlib/clm.pyx":3926
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3927
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_5 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":3928
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_initial_contents};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":3927
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":3929
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":3930
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3930, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_3;
    __pyx_t_3.memview = NULL;
    __pyx_t_3.data = NULL;

    /* "pysndlib/clm.pyx":3926
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":3932
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_element != 0);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3933
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_max_size);
    __Pyx_GIVEREF(__pyx_v_max_size);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_max_size)) __PYX_ERR(0, 3933, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3934
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3935
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_initial_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3935, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3936
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3936, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_3;
    __pyx_t_3.memview = NULL;
    __pyx_t_3.data = NULL;

    /* "pysndlib/clm.pyx":3932
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":3938
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
  __pyx_t_5 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":3939
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, NULL, max_size, <cclm.mus_interp_t>interp_type))
 */
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L1_error)
    __pyx_t_11 = 0;
    __pyx_t_12 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 3939, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_notch(__pyx_v_feedforward, __pyx_t_8, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_11 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_t_12, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":3938
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":3941
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, NULL, max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     gen.cache_append(initial_contents)
 *     return gen
 */
  /*else*/ {
    __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3941, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3941, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_notch(__pyx_v_feedforward, __pyx_t_12, NULL, __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":3942
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, NULL, max_size, <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_10 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pysndlib/clm.pyx":3943
 *         gen = mus_any.from_ptr(cclm.mus_make_notch(feedforward, size, NULL, max_size, <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysndlib.clm.make_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XDECREF(__pyx_v_max_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_405make_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_404make_notch, "\n    return a new notch filter (a delay line with a scaler on the feedforward) of size elements.\n    if the notch length will be changing at run-time, max-size sets its maximum length.\n    \n    :param feedforward: scaler on input\n    :param size: delay length \\in samples\n    :param initial_contents: delay line's initial values\n    :param initial_element: delay line's initial element\n    :param max_size: maximum delay size \\in case the delay changes\n    :param type: interpolation type\n    :return: comb gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_405make_notch = {"make_notch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_405make_notch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_404make_notch};
static PyObject *__pyx_pw_8pysndlib_3clm_405make_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_feedforward;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_initial_element;
  PyObject *__pyx_v_max_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_notch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_feedforward,&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,&__pyx_n_s_max_size,&__pyx_n_s_interp_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":3896
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,
 *                 initial_contents=None,             # <<<<<<<<<<<<<<
 *                 cython.double initial_element=0.0,
 *                 max_size=None,
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":3898
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 *                 max_size=None,             # <<<<<<<<<<<<<<
 *                 Interp interp_type=Interp.NONE):
 * 
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_feedforward);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_notch") < 0)) __PYX_ERR(0, 3895, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_feedforward = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_feedforward == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
    } else {
      __pyx_v_feedforward = ((double)1.0);
    }
    __pyx_v_size = values[1];
    __pyx_v_initial_contents = values[2];
    if (values[3]) {
      __pyx_v_initial_element = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_initial_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3897, __pyx_L3_error)
    } else {
      __pyx_v_initial_element = ((double)0.0);
    }
    __pyx_v_max_size = values[4];
    if (values[5]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[5])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3899, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__47;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_notch", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 3895, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_404make_notch(__pyx_self, __pyx_v_feedforward, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element, __pyx_v_max_size, __pyx_v_interp_type);

  /* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_404make_notch(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedforward, PyObject *__pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_notch __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_notch", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 6;
  __pyx_t_2.feedforward = __pyx_v_feedforward;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_2.max_size = __pyx_v_max_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_notch(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3945
 *     return gen
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_407notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_notch(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_notch *__pyx_optional_args) {
  double __pyx_v_pm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pm = __pyx_optional_args->pm;
    }
  }

  /* "pysndlib/clm.pyx":3954
 *     :rtype: float
 *     """
 *     return cclm.mus_notch(gen._ptr, insig, pm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_notch(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_v_pm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3945
 *     return gen
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_407notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_406notch, "\n    notch filter val, pm changes the delay length.\n        \n    :param gen: notch gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_407notch = {"notch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_407notch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_406notch};
static PyObject *__pyx_pw_8pysndlib_3clm_407notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  double __pyx_v_pm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("notch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_pm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("notch", 0, 2, 3, 1); __PYX_ERR(0, 3945, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "notch") < 0)) __PYX_ERR(0, 3945, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_pm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L3_error)
    } else {
      __pyx_v_pm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("notch", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3945, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3945, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_406notch(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_406notch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, double __pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_notch __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("notch", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_notch(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3957
 * 
 * 
 * cpdef cython.double notch_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length. unmodulated
 */

static PyObject *__pyx_pw_8pysndlib_3clm_409notch_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_notch_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":3965
 *     :rtype: float
 *     """
 *     return cclm.mus_notch_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_notch_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3957
 * 
 * 
 * cpdef cython.double notch_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length. unmodulated
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_409notch_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_408notch_unmodulated, "\n    notch filter val, pm changes the delay length. unmodulated\n        \n    :param gen: notch gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_409notch_unmodulated = {"notch_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_409notch_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_408notch_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_409notch_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("notch_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("notch_unmodulated", 1, 2, 2, 1); __PYX_ERR(0, 3957, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "notch_unmodulated") < 0)) __PYX_ERR(0, 3957, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("notch_unmodulated", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3957, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.notch_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3957, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_408notch_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_408notch_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("notch_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_notch_unmodulated(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.notch_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3968
 * 
 * 
 * cpdef bint is_notch(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a notch.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_411is_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_notch(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":3975
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_notch(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- all-pass ---------------- #
 */
  __pyx_r = mus_is_notch(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3968
 * 
 * 
 * cpdef bint is_notch(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a notch.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_411is_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_410is_notch, "\n    returns True if gen is a notch.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_411is_notch = {"is_notch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_411is_notch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_410is_notch};
static PyObject *__pyx_pw_8pysndlib_3clm_411is_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_notch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3968, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_notch") < 0)) __PYX_ERR(0, 3968, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_notch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3968, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 3968, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_410is_notch(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_410is_notch(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_notch", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_notch(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3968, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":3978
 * 
 * # ---------------- all-pass ---------------- #
 * cpdef mus_any make_all_pass(cython.double feedback, cython.double  feedforward, cython.long  size, initial_contents= None, cython.double  initial_element = 0.0,  max_size= None, Interp interp_type = Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

static PyObject *__pyx_pw_8pysndlib_3clm_413make_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_all_pass(double __pyx_v_feedback, double __pyx_v_feedforward, long __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_all_pass *__pyx_optional_args) {
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_initial_element = ((double)0.0);
  PyObject *__pyx_v_max_size = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__48;
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_all_pass", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_element = __pyx_optional_args->initial_element;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_max_size = __pyx_optional_args->max_size;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_interp_type = __pyx_optional_args->interp_type;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);
  __Pyx_INCREF(__pyx_v_max_size);

  /* "pysndlib/clm.pyx":3996
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":3998
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if not max_size:
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 3998, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":4000
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_size); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4000, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4001
 * 
 *     if not max_size:
 *         max_size = size             # <<<<<<<<<<<<<<
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_max_size, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4000
 *     cdef double [:] initial_contents_view = None
 * 
 *     if not max_size:             # <<<<<<<<<<<<<<
 *         max_size = size
 * 
 */
  }

  /* "pysndlib/clm.pyx":4003
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.HERMITE #think this is correct from clm2xen.c
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_size, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_6 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_interp_type == __pyx_e_8pysndlib_3clm_NONE);
  __pyx_t_6 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4004
 * 
 *     if max_size != size and interp_type == Interp.NONE:
 *         interp_type = Interp.HERMITE #think this is correct from clm2xen.c             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_interp_type = __pyx_e_8pysndlib_3clm_HERMITE;

    /* "pysndlib/clm.pyx":4003
 *         max_size = size
 * 
 *     if max_size != size and interp_type == Interp.NONE:             # <<<<<<<<<<<<<<
 *         interp_type = Interp.HERMITE #think this is correct from clm2xen.c
 * 
 */
  }

  /* "pysndlib/clm.pyx":4007
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_6 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4008
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_6 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_6) {

      /* "pysndlib/clm.pyx":4009
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_initial_contents};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysndlib/clm.pyx":4008
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":4010
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4011
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4011, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4007
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":4013
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  __pyx_t_6 = (__pyx_v_initial_element != 0);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4014
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_max_size);
    __Pyx_GIVEREF(__pyx_v_max_size);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_max_size)) __PYX_ERR(0, 4014, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":4015
 *     elif initial_element:
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":4016
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_initial_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":4017
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4017, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4013
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(max_size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":4019
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
  __pyx_t_6 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4020
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size,NULL, max_size,  <cclm.mus_interp_t>interp_type))
 */
    __pyx_t_11 = 0;
    __pyx_t_8 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      __PYX_ERR(0, 4020, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4020, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_all_pass(__pyx_v_feedback, __pyx_v_feedforward, __pyx_v_size, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_11 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pysndlib/clm.pyx":4019
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 */
    goto __pyx_L9;
  }

  /* "pysndlib/clm.pyx":4022
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size, &initial_contents_view[0], max_size, <cclm.mus_interp_t>interp_type))
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size,NULL, max_size,  <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *     gen.cache_append(initial_contents)
 *     return gen
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4022, __pyx_L1_error)
    __pyx_t_10 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_all_pass(__pyx_v_feedback, __pyx_v_feedforward, __pyx_v_size, NULL, __pyx_t_8, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_10);
    __pyx_t_10 = 0;
  }
  __pyx_L9:;

  /* "pysndlib/clm.pyx":4023
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size,NULL, max_size,  <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_10 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pysndlib/clm.pyx":4024
 *         gen = mus_any.from_ptr(cclm.mus_make_all_pass(feedback,feedforward, size,NULL, max_size,  <cclm.mus_interp_t>interp_type))
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=None):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":3978
 * 
 * # ---------------- all-pass ---------------- #
 * cpdef mus_any make_all_pass(cython.double feedback, cython.double  feedforward, cython.long  size, initial_contents= None, cython.double  initial_element = 0.0,  max_size= None, Interp interp_type = Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XDECREF(__pyx_v_max_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_413make_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_412make_all_pass, "\n    return a new allpass filter (a delay line with a scalers on both the feedback and the feedforward).\n    if length will be changing at run-time, max-size sets its maximum length.\n    \n    :param feedback: scaler on feedback\n    :param feedforward: scaler on input\n    :param size: length \\in samples of the delay line\n    :param initial_contents: delay line's initial values\n    :param initial_element: delay line's initial element\n    :param max_size: maximum delay size \\in case the delay changes\n    :param interp_type: interpolation type\n    :return: a new allpass filter\n    :rtype: mus_any\n     \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_413make_all_pass = {"make_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_413make_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_412make_all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_413make_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_feedback;
  double __pyx_v_feedforward;
  long __pyx_v_size;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_initial_element;
  PyObject *__pyx_v_max_size = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_feedback,&__pyx_n_s_feedforward,&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,&__pyx_n_s_max_size,&__pyx_n_s_interp_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_feedback)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_feedforward)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_all_pass", 0, 3, 7, 1); __PYX_ERR(0, 3978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_all_pass", 0, 3, 7, 2); __PYX_ERR(0, 3978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_all_pass") < 0)) __PYX_ERR(0, 3978, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_feedback = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_feedback == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
    __pyx_v_feedforward = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_feedforward == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
    __pyx_v_size = __Pyx_PyInt_As_long(values[2]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
    __pyx_v_initial_contents = values[3];
    if (values[4]) {
      __pyx_v_initial_element = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_initial_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
    } else {
      __pyx_v_initial_element = ((double)0.0);
    }
    __pyx_v_max_size = values[5];
    if (values[6]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[6])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__48;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_all_pass", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 3978, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_412make_all_pass(__pyx_self, __pyx_v_feedback, __pyx_v_feedforward, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element, __pyx_v_max_size, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_412make_all_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_feedback, double __pyx_v_feedforward, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element, PyObject *__pyx_v_max_size, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_all_pass __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_2.max_size = __pyx_v_max_size;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_all_pass(__pyx_v_feedback, __pyx_v_feedforward, __pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4026
 *     return gen
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     all-pass filter insig value, pm changes the delay length.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_415all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_all_pass *__pyx_optional_args) {
  PyObject *__pyx_v_pm = ((PyObject *)Py_None);
  double __pyx_r;
  int __pyx_t_1;
  mus_float_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pm = __pyx_optional_args->pm;
    }
  }

  /* "pysndlib/clm.pyx":4035
 *     :rtype: float
 *     """
 *     if pm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_all_pass(gen._ptr, insig, pm)
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pm); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4035, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4036
 *     """
 *     if pm:
 *         return cclm.mus_all_pass(gen._ptr, insig, pm)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)
 */
    __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_pm); if (unlikely((__pyx_t_2 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4036, __pyx_L1_error)
    __pyx_r = mus_all_pass(__pyx_v_gen->_ptr, __pyx_v_insig, __pyx_t_2);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4035
 *     :rtype: float
 *     """
 *     if pm:             # <<<<<<<<<<<<<<
 *         return cclm.mus_all_pass(gen._ptr, insig, pm)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4038
 *         return cclm.mus_all_pass(gen._ptr, insig, pm)
 *     else:
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef is_all_pass(mus_any gen):
 */
  /*else*/ {
    __pyx_r = mus_all_pass_unmodulated(__pyx_v_gen->_ptr, __pyx_v_insig);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4026
 *     return gen
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     all-pass filter insig value, pm changes the delay length.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_415all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_414all_pass, "\n    all-pass filter insig value, pm changes the delay length.\n    \n    :param gen: all_pass gen\n    :param insig: input value\n    :param pm: change \\in delay length size. can be + or -\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_415all_pass = {"all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_415all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_414all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_415all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  PyObject *__pyx_v_pm = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,&__pyx_n_s_pm,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4026, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4026, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("all_pass", 0, 2, 3, 1); __PYX_ERR(0, 4026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4026, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "all_pass") < 0)) __PYX_ERR(0, 4026, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4026, __pyx_L3_error)
    __pyx_v_pm = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("all_pass", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4026, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4026, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_414all_pass(__pyx_self, __pyx_v_gen, __pyx_v_insig, __pyx_v_pm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_414all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, PyObject *__pyx_v_pm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_all_pass __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pm = __pyx_v_pm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_all_pass(__pyx_v_gen, __pyx_v_insig, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4026, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4040
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)
 * 
 * cpdef is_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_417is_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_all_pass", 1);

  /* "pysndlib/clm.pyx":4047
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_all_pass(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(mus_is_all_pass(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4040
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)
 * 
 * cpdef is_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_417is_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_416is_all_pass, "\n    returns True if gen is a all_pass.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_417is_all_pass = {"is_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_417is_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_416is_all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_417is_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4040, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_all_pass") < 0)) __PYX_ERR(0, 4040, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_all_pass", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4040, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4040, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_416is_all_pass(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_416is_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_all_pass(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4051
 * 
 * # ---------------- all-pass-bank ---------------- #
 * cpdef mus_any make_all_pass_bank(all_passes: list):             # <<<<<<<<<<<<<<
 *     """
 *     return a new all_pass-bank generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_419make_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_all_pass_bank(PyObject *__pyx_v_all_passes, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *__pyx_v_all_passes_array = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_all_pass_bank", 1);

  /* "pysndlib/clm.pyx":4059
 *     :rtype: mus_any
 *     """
 *     p = list(map(is_all_pass, all_passes))             # <<<<<<<<<<<<<<
 *     if not all(p):
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_all_pass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 4059, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_all_passes);
  __Pyx_GIVEREF(__pyx_v_all_passes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_all_passes)) __PYX_ERR(0, 4059, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_p = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4060
 *     """
 *     p = list(map(is_all_pass, all_passes))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":4061
 *     p = list(map(is_all_pass, all_passes))
 *     if not all(p):
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')             # <<<<<<<<<<<<<<
 * 
 *     all_passes_array = mus_any_array.from_pylist(all_passes)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 4061, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4060
 *     """
 *     p = list(map(is_all_pass, all_passes))
 *     if not all(p):             # <<<<<<<<<<<<<<
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4063
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')
 * 
 *     all_passes_array = mus_any_array.from_pylist(all_passes)             # <<<<<<<<<<<<<<
 *     gen =  mus_any.from_ptr(cclm.mus_make_all_pass_bank(len(all_passes), all_passes_array.data))
 *     gen.cache_extend([all_passes_array, all_passes])
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist(__pyx_v_all_passes)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_all_passes_array = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4064
 * 
 *     all_passes_array = mus_any_array.from_pylist(all_passes)
 *     gen =  mus_any.from_ptr(cclm.mus_make_all_pass_bank(len(all_passes), all_passes_array.data))             # <<<<<<<<<<<<<<
 *     gen.cache_extend([all_passes_array, all_passes])
 *     return gen
 */
  __pyx_t_5 = __Pyx_PyList_GET_SIZE(__pyx_v_all_passes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4064, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_all_pass_bank(__pyx_t_5, __pyx_v_all_passes_array->data), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4065
 *     all_passes_array = mus_any_array.from_pylist(all_passes)
 *     gen =  mus_any.from_ptr(cclm.mus_make_all_pass_bank(len(all_passes), all_passes_array.data))
 *     gen.cache_extend([all_passes_array, all_passes])             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_all_passes_array);
  __Pyx_GIVEREF((PyObject *)__pyx_v_all_passes_array);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_all_passes_array))) __PYX_ERR(0, 4065, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_all_passes);
  __Pyx_GIVEREF(__pyx_v_all_passes);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_all_passes)) __PYX_ERR(0, 4065, __pyx_L1_error);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_extend(__pyx_v_gen, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4066
 *     gen =  mus_any.from_ptr(cclm.mus_make_all_pass_bank(len(all_passes), all_passes_array.data))
 *     gen.cache_extend([all_passes_array, all_passes])
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double all_pass_bank(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4051
 * 
 * # ---------------- all-pass-bank ---------------- #
 * cpdef mus_any make_all_pass_bank(all_passes: list):             # <<<<<<<<<<<<<<
 *     """
 *     return a new all_pass-bank generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF((PyObject *)__pyx_v_all_passes_array);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_419make_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_418make_all_pass_bank, "\n    return a new all_pass-bank generator.\n    \n    :param all_passes: list of all_pass gens\n    :return: all_pass_bank gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_419make_all_pass_bank = {"make_all_pass_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_419make_all_pass_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_418make_all_pass_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_419make_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_all_passes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_all_pass_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_all_passes,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_all_passes)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4051, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_all_pass_bank") < 0)) __PYX_ERR(0, 4051, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_all_passes = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_all_pass_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4051, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_all_passes), (&PyList_Type), 0, "all_passes", 1))) __PYX_ERR(0, 4051, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_418make_all_pass_bank(__pyx_self, __pyx_v_all_passes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_418make_all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_all_passes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_all_pass_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_all_pass_bank(__pyx_v_all_passes, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4068
 *     return gen
 * 
 * cpdef cython.double all_pass_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of all_pass filters.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_421all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_all_pass_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4076
 *     :rtype: float
 *     """
 *     return cclm.mus_all_pass_bank(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_all_pass_bank(mus_any gen):
 */
  __pyx_r = mus_all_pass_bank(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4068
 *     return gen
 * 
 * cpdef cython.double all_pass_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of all_pass filters.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_421all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_420all_pass_bank, "\n    sum an array of all_pass filters.\n    \n    :param gen: all_pass_bank gen\n    :param inputs: can be a list/array of inputs or a single input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_421all_pass_bank = {"all_pass_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_421all_pass_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_420all_pass_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_421all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("all_pass_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4068, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4068, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("all_pass_bank", 1, 2, 2, 1); __PYX_ERR(0, 4068, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "all_pass_bank") < 0)) __PYX_ERR(0, 4068, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4068, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("all_pass_bank", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4068, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4068, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_420all_pass_bank(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_420all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("all_pass_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_all_pass_bank(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4068, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4078
 *     return cclm.mus_all_pass_bank(gen._ptr, insig)
 * 
 * cpdef bint is_all_pass_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass_bank.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_423is_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_all_pass_bank(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4086
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_all_pass_bank(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_all_pass_bank(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4078
 *     return cclm.mus_all_pass_bank(gen._ptr, insig)
 * 
 * cpdef bint is_all_pass_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass_bank.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_423is_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_422is_all_pass_bank, "\n    returns True if gen is a all_pass_bank.\n    \n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_423is_all_pass_bank = {"is_all_pass_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_423is_all_pass_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_422is_all_pass_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_423is_all_pass_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_all_pass_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4078, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_all_pass_bank") < 0)) __PYX_ERR(0, 4078, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_all_pass_bank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4078, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4078, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_422is_all_pass_bank(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_422is_all_pass_bank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_all_pass_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_all_pass_bank(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4078, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_all_pass_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4090
 * 
 * # ---------------- one_pole_all_pass ---------------- #
 * cpdef mus_any make_one_pole_all_pass(cython.long size, cython.double coeff):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole all_pass filter size, coeff.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_425make_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_one_pole_all_pass(long __pyx_v_size, double __pyx_v_coeff, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_pole_all_pass", 1);

  /* "pysndlib/clm.pyx":4100
 *     :rtype: mus_any
 *     """
 *     return mus_any.from_ptr(cclm.mus_make_one_pole_all_pass(size, coeff))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double one_pole_all_pass(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_one_pole_all_pass(__pyx_v_size, __pyx_v_coeff), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4090
 * 
 * # ---------------- one_pole_all_pass ---------------- #
 * cpdef mus_any make_one_pole_all_pass(cython.long size, cython.double coeff):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole all_pass filter size, coeff.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_425make_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_424make_one_pole_all_pass, "\n    return a new one_pole all_pass filter size, coeff.\n    \n    \n    :param size: length \\in samples of the delay line\n    :param coeff: coeff of one pole filter\n    :return: one_pole_all_pass gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_425make_one_pole_all_pass = {"make_one_pole_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_425make_one_pole_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_424make_one_pole_all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_425make_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_size;
  double __pyx_v_coeff;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_one_pole_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_coeff,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4090, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_coeff)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4090, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_one_pole_all_pass", 1, 2, 2, 1); __PYX_ERR(0, 4090, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_one_pole_all_pass") < 0)) __PYX_ERR(0, 4090, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_size = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4090, __pyx_L3_error)
    __pyx_v_coeff = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_coeff == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4090, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_one_pole_all_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4090, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_424make_one_pole_all_pass(__pyx_self, __pyx_v_size, __pyx_v_coeff);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_424make_one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, double __pyx_v_coeff) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_one_pole_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_one_pole_all_pass(__pyx_v_size, __pyx_v_coeff, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4102
 *     return mus_any.from_ptr(cclm.mus_make_one_pole_all_pass(size, coeff))
 * 
 * cpdef cython.double one_pole_all_pass(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole all pass filter of input.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_427one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_one_pole_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4110
 *     :rtype: float
 *     """
 *     return cclm.mus_one_pole_all_pass(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_one_pole_all_pass(mus_any gen):
 */
  __pyx_r = mus_one_pole_all_pass(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4102
 *     return mus_any.from_ptr(cclm.mus_make_one_pole_all_pass(size, coeff))
 * 
 * cpdef cython.double one_pole_all_pass(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole all pass filter of input.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_427one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_426one_pole_all_pass, "\n    one pole all pass filter of input.\n    \n    :param gen: one_pole_all_pass gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_427one_pole_all_pass = {"one_pole_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_427one_pole_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_426one_pole_all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_427one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("one_pole_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4102, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4102, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("one_pole_all_pass", 1, 2, 2, 1); __PYX_ERR(0, 4102, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "one_pole_all_pass") < 0)) __PYX_ERR(0, 4102, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4102, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("one_pole_all_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4102, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4102, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_426one_pole_all_pass(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_426one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("one_pole_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_one_pole_all_pass(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4102, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4112
 *     return cclm.mus_one_pole_all_pass(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole_all_pass.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_429is_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_one_pole_all_pass(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4119
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_one_pole_all_pass(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- moving-average ---------------- #
 */
  __pyx_r = mus_is_one_pole_all_pass(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4112
 *     return cclm.mus_one_pole_all_pass(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole_all_pass.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_429is_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_428is_one_pole_all_pass, "\n    returns True if gen is a one_pole_all_pass.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_429is_one_pole_all_pass = {"is_one_pole_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_429is_one_pole_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_428is_one_pole_all_pass};
static PyObject *__pyx_pw_8pysndlib_3clm_429is_one_pole_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_one_pole_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4112, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_one_pole_all_pass") < 0)) __PYX_ERR(0, 4112, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_one_pole_all_pass", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4112, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4112, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_428is_one_pole_all_pass(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_428is_one_pole_all_pass(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_one_pole_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_one_pole_all_pass(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4112, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_one_pole_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4122
 * 
 * # ---------------- moving-average ---------------- #
 * cpdef mus_any make_moving_average(cython.long size, initial_contents=None, cython.double initial_element=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving_average generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_431make_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_average(long __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_average *__pyx_optional_args) {
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_initial_element = ((double)0.0);
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_average", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_element = __pyx_optional_args->initial_element;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);

  /* "pysndlib/clm.pyx":4133
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4135
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":4137
 *     cdef double [:] initial_contents_view = None
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4138
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_5 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":4139
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_initial_contents};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysndlib/clm.pyx":4138
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":4140
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 *     else:
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4141
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 *     else:
 *         initial_contents = np.zeros(size, dtype=np.double)
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4141, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4137
 *     cdef double [:] initial_contents_view = None
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":4143
 *         initial_contents_view = initial_contents
 *     else:
 *         initial_contents = np.zeros(size, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 4143, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4144
 *     else:
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_9 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4145
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_initial_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4146
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4146, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":4148
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_average(size, &initial_contents_view[0]))
 * 
 */
  __pyx_t_5 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4149
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_average(size, &initial_contents_view[0]))             # <<<<<<<<<<<<<<
 * 
 *     gen.cache_append(initial_contents)
 */
    __pyx_t_10 = 0;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      __PYX_ERR(0, 4149, __pyx_L1_error)
    }
    __pyx_t_9 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_moving_average(__pyx_v_size, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_10 * __pyx_v_initial_contents_view.strides[0]) ))))), NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4148
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_average(size, &initial_contents_view[0]))
 * 
 */
  }

  /* "pysndlib/clm.pyx":4151
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_average(size, &initial_contents_view[0]))
 * 
 *     gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  if (unlikely(!__pyx_v_gen)) { __Pyx_RaiseUnboundLocalError("gen"); __PYX_ERR(0, 4151, __pyx_L1_error) }
  __pyx_t_9 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysndlib/clm.pyx":4152
 * 
 *     gen.cache_append(initial_contents)
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (unlikely(!__pyx_v_gen)) { __Pyx_RaiseUnboundLocalError("gen"); __PYX_ERR(0, 4152, __pyx_L1_error) }
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4122
 * 
 * # ---------------- moving-average ---------------- #
 * cpdef mus_any make_moving_average(cython.long size, initial_contents=None, cython.double initial_element=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving_average generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_431make_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_430make_moving_average, "\n    return a new moving_average generator. \n    \n    :param size: averaging length \\in samples\n    :param initial_contents: initial values\n    :param initial_element: initial element\n    :return: moving_average gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_431make_moving_average = {"make_moving_average", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_431make_moving_average, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_430make_moving_average};
static PyObject *__pyx_pw_8pysndlib_3clm_431make_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_size;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_initial_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_moving_average (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_moving_average") < 0)) __PYX_ERR(0, 4122, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L3_error)
    __pyx_v_initial_contents = values[1];
    if (values[2]) {
      __pyx_v_initial_element = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_initial_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L3_error)
    } else {
      __pyx_v_initial_element = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_moving_average", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4122, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_430make_moving_average(__pyx_self, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_430make_moving_average(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_moving_average __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_average", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_moving_average(__pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4155
 * 
 * 
 * cpdef cython.double moving_average(mus_any gen, cython.double  insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window average.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_433moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_average(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4163
 *     :rtype: float
 *     """
 *     return cclm.mus_moving_average(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_moving_average(mus_any gen):
 */
  __pyx_r = mus_moving_average(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4155
 * 
 * 
 * cpdef cython.double moving_average(mus_any gen, cython.double  insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window average.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_433moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_432moving_average, "\n    moving window average.\n    \n    :param gen: moving_average gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_433moving_average = {"moving_average", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_433moving_average, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_432moving_average};
static PyObject *__pyx_pw_8pysndlib_3clm_433moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("moving_average (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("moving_average", 1, 2, 2, 1); __PYX_ERR(0, 4155, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "moving_average") < 0)) __PYX_ERR(0, 4155, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("moving_average", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4155, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4155, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_432moving_average(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_432moving_average(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("moving_average", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_moving_average(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4165
 *     return cclm.mus_moving_average(gen._ptr, insig)
 * 
 * cpdef bint is_moving_average(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_average.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_435is_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_moving_average(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4172
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_moving_average(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- moving-max ---------------- #
 */
  __pyx_r = mus_is_moving_average(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4165
 *     return cclm.mus_moving_average(gen._ptr, insig)
 * 
 * cpdef bint is_moving_average(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_average.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_435is_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_434is_moving_average, "\n    returns True if gen is a moving_average.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_435is_moving_average = {"is_moving_average", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_435is_moving_average, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_434is_moving_average};
static PyObject *__pyx_pw_8pysndlib_3clm_435is_moving_average(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_moving_average (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4165, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_moving_average") < 0)) __PYX_ERR(0, 4165, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_moving_average", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4165, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4165, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_434is_moving_average(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_434is_moving_average(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_moving_average", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_moving_average(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4165, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_moving_average", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */

static PyObject *__pyx_pw_8pysndlib_3clm_437make_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_max(long __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_max *__pyx_optional_args) {

  /* "pysndlib/clm.pyx":4176
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,
 *                 initial_contents=None,             # <<<<<<<<<<<<<<
 *                 cython.double initial_element=0.0):
 * 
 */
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_initial_element = ((double)0.0);
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_max", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_initial_element = __pyx_optional_args->initial_element;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);

  /* "pysndlib/clm.pyx":4189
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4191
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4191, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":4193
 *     cdef double [:] initial_contents_view = None
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4194
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_5 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":4195
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_initial_contents};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysndlib/clm.pyx":4194
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":4196
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4197
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     elif initial_element:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4197, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4193
 *     cdef double [:] initial_contents_view = None
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":4199
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_element != 0);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4200
 * 
 *     elif initial_element:
 *         initial_contents = np.zeros(size, dtype=np.double)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 4200, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4201
 *     elif initial_element:
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 */
    __pyx_t_9 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4202
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 *     if initial_contents_view is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initial_contents, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_initial_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4203
 *         check_ndim(initial_contents)
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, &initial_contents_view[0]))
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4203, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4199
 *         initial_contents_view = initial_contents
 * 
 *     elif initial_element:             # <<<<<<<<<<<<<<
 *         initial_contents = np.zeros(size, dtype=np.double)
 *         check_ndim(initial_contents)
 */
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":4204
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, &initial_contents_view[0]))
 *         gen.cache_append(initial_contents)
 */
  __pyx_t_5 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4205
 *         initial_contents_view = initial_contents
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, &initial_contents_view[0]))             # <<<<<<<<<<<<<<
 *         gen.cache_append(initial_contents)
 *     else:
 */
    __pyx_t_10 = 0;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      __PYX_ERR(0, 4205, __pyx_L1_error)
    }
    __pyx_t_9 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_moving_max(__pyx_v_size, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_10 * __pyx_v_initial_contents_view.strides[0]) ))))), NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4206
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, &initial_contents_view[0]))
 *         gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, NULL))
 */
    __pyx_t_9 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pysndlib/clm.pyx":4204
 *         initial_contents.fill(initial_element)
 *         initial_contents_view = initial_contents
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, &initial_contents_view[0]))
 *         gen.cache_append(initial_contents)
 */
    goto __pyx_L5;
  }

  /* "pysndlib/clm.pyx":4208
 *         gen.cache_append(initial_contents)
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, NULL))             # <<<<<<<<<<<<<<
 *     return gen
 * 
 */
  /*else*/ {
    __pyx_t_9 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_moving_max(__pyx_v_size, NULL), NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
    __pyx_t_9 = 0;
  }
  __pyx_L5:;

  /* "pysndlib/clm.pyx":4209
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_max(size, NULL))
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double moving_max(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_437make_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_436make_moving_max, "\n    return a new moving-max generator.\n    \n    :param size: max window length \\in samples\n    :param initial_contents: initial values\n    :param initial_element: initial element\n    :return: moving_max gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_437make_moving_max = {"make_moving_max", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_437make_moving_max, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_436make_moving_max};
static PyObject *__pyx_pw_8pysndlib_3clm_437make_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_size;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_initial_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_moving_max (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_initial_element,0};

    /* "pysndlib/clm.pyx":4176
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,
 *                 initial_contents=None,             # <<<<<<<<<<<<<<
 *                 cython.double initial_element=0.0):
 * 
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_element);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_moving_max") < 0)) __PYX_ERR(0, 4175, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error)
    __pyx_v_initial_contents = values[1];
    if (values[2]) {
      __pyx_v_initial_element = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_initial_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4177, __pyx_L3_error)
    } else {
      __pyx_v_initial_element = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_moving_max", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4175, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_436make_moving_max(__pyx_self, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_initial_element);

  /* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_436make_moving_max(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_initial_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_moving_max __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_max", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.initial_element = __pyx_v_initial_element;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_moving_max(__pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4211
 *     return gen
 * 
 * cpdef cython.double moving_max(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window max.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_439moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_max(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4219
 *     :rtype: float
 *     """
 *     return cclm.mus_moving_max(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_moving_max(mus_any gen):
 */
  __pyx_r = mus_moving_max(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4211
 *     return gen
 * 
 * cpdef cython.double moving_max(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window max.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_439moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_438moving_max, "\n    moving window max.\n    \n    :param gen: moving_max gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_439moving_max = {"moving_max", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_439moving_max, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_438moving_max};
static PyObject *__pyx_pw_8pysndlib_3clm_439moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("moving_max (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4211, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4211, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("moving_max", 1, 2, 2, 1); __PYX_ERR(0, 4211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "moving_max") < 0)) __PYX_ERR(0, 4211, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4211, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("moving_max", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4211, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4211, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_438moving_max(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_438moving_max(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("moving_max", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_moving_max(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4211, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4221
 *     return cclm.mus_moving_max(gen._ptr, insig)
 * 
 * cpdef bint is_moving_max(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_max.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_441is_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_moving_max(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4228
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_moving_max(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- moving-norm ---------------- #
 */
  __pyx_r = mus_is_moving_max(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4221
 *     return cclm.mus_moving_max(gen._ptr, insig)
 * 
 * cpdef bint is_moving_max(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_max.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_441is_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_440is_moving_max, "\n    returns True if gen is a moving_max.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_441is_moving_max = {"is_moving_max", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_441is_moving_max, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_440is_moving_max};
static PyObject *__pyx_pw_8pysndlib_3clm_441is_moving_max(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_moving_max (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4221, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_moving_max") < 0)) __PYX_ERR(0, 4221, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_moving_max", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4221, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4221, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_440is_moving_max(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_440is_moving_max(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_moving_max", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_moving_max(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4221, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_moving_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4231
 * 
 * # ---------------- moving-norm ---------------- #
 * cpdef mus_any make_moving_norm(cython.long size, initial_contents=None, cython.double scaler=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving-norm generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_443make_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_moving_norm(long __pyx_v_size, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_moving_norm *__pyx_optional_args) {
  PyObject *__pyx_v_initial_contents = ((PyObject *)Py_None);
  double __pyx_v_scaler = ((double)1.);
  __Pyx_memviewslice __pyx_v_initial_contents_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_norm", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_contents = __pyx_optional_args->initial_contents;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_scaler = __pyx_optional_args->scaler;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_initial_contents);

  /* "pysndlib/clm.pyx":4242
 *     """
 * 
 *     check_range('size', size, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] initial_contents_view = None
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_size, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4244
 *     check_range('size', size, 0.0, None)
 * 
 *     cdef double [:] initial_contents_view = None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __pyx_v_initial_contents_view = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;

  /* "pysndlib/clm.pyx":4247
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  __pyx_t_5 = (__pyx_v_initial_contents != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4248
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    __pyx_t_5 = PyList_Check(__pyx_v_initial_contents); 
    if (__pyx_t_5) {

      /* "pysndlib/clm.pyx":4249
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)             # <<<<<<<<<<<<<<
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_initial_contents};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_initial_contents, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysndlib/clm.pyx":4248
 * 
 *     if initial_contents is not None:
 *         if isinstance(initial_contents, list):             # <<<<<<<<<<<<<<
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 */
    }

    /* "pysndlib/clm.pyx":4250
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)             # <<<<<<<<<<<<<<
 *         initial_contents_view = initial_contents
 * 
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_initial_contents, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4251
 *             initial_contents = np.array(initial_contents)
 *         check_ndim(initial_contents)
 *         initial_contents_view = initial_contents             # <<<<<<<<<<<<<<
 * 
 *     if initial_contents_view is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_initial_contents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 4251, __pyx_L1_error)
    __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
    __pyx_v_initial_contents_view = __pyx_t_4;
    __pyx_t_4.memview = NULL;
    __pyx_t_4.data = NULL;

    /* "pysndlib/clm.pyx":4247
 * 
 * 
 *     if initial_contents is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(initial_contents, list):
 *             initial_contents = np.array(initial_contents)
 */
  }

  /* "pysndlib/clm.pyx":4253
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, &initial_contents_view[0], scaler))
 *         gen.cache_append(initial_contents)
 */
  __pyx_t_5 = (((PyObject *) __pyx_v_initial_contents_view.memview) != Py_None);
  if (__pyx_t_5) {

    /* "pysndlib/clm.pyx":4254
 * 
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, &initial_contents_view[0], scaler))             # <<<<<<<<<<<<<<
 *         gen.cache_append(initial_contents)
 *     else:
 */
    __pyx_t_8 = 0;
    __pyx_t_7 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_v_initial_contents_view.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_v_initial_contents_view.shape[0])) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      __PYX_ERR(0, 4254, __pyx_L1_error)
    }
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_moving_norm(__pyx_v_size, (&(*((double *) ( /* dim=0 */ (__pyx_v_initial_contents_view.data + __pyx_t_8 * __pyx_v_initial_contents_view.strides[0]) )))), __pyx_v_scaler), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4255
 *     if initial_contents_view is not None:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, &initial_contents_view[0], scaler))
 *         gen.cache_append(initial_contents)             # <<<<<<<<<<<<<<
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, NULL, scaler))
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_gen->__pyx_vtab)->cache_append(__pyx_v_gen, __pyx_v_initial_contents, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4253
 *         initial_contents_view = initial_contents
 * 
 *     if initial_contents_view is not None:             # <<<<<<<<<<<<<<
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, &initial_contents_view[0], scaler))
 *         gen.cache_append(initial_contents)
 */
    goto __pyx_L5;
  }

  /* "pysndlib/clm.pyx":4257
 *         gen.cache_append(initial_contents)
 *     else:
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, NULL, scaler))             # <<<<<<<<<<<<<<
 * 
 *     return gen
 */
  /*else*/ {
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_moving_norm(__pyx_v_size, NULL, __pyx_v_scaler), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "pysndlib/clm.pyx":4259
 *         gen = mus_any.from_ptr(cclm.mus_make_moving_norm(size, NULL, scaler))
 * 
 *     return gen             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double moving_norm(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4231
 * 
 * # ---------------- moving-norm ---------------- #
 * cpdef mus_any make_moving_norm(cython.long size, initial_contents=None, cython.double scaler=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving-norm generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_initial_contents_view, 1);
  __Pyx_XDECREF((PyObject *)__pyx_v_gen);
  __Pyx_XDECREF(__pyx_v_initial_contents);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_443make_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_442make_moving_norm, "\n    return a new moving-norm generator.\n    \n    :param size: averaging length \\in samples\n    :param initial_contents: initial values\n    :param scaler: normalzing value\n    :return: moving_norm gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_443make_moving_norm = {"make_moving_norm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_443make_moving_norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_442make_moving_norm};
static PyObject *__pyx_pw_8pysndlib_3clm_443make_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_size;
  PyObject *__pyx_v_initial_contents = 0;
  double __pyx_v_scaler;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_moving_norm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_initial_contents,&__pyx_n_s_scaler,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4231, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_contents);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4231, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scaler);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4231, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_moving_norm") < 0)) __PYX_ERR(0, 4231, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4231, __pyx_L3_error)
    __pyx_v_initial_contents = values[1];
    if (values[2]) {
      __pyx_v_scaler = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_scaler == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4231, __pyx_L3_error)
    } else {
      __pyx_v_scaler = ((double)1.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_moving_norm", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4231, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_442make_moving_norm(__pyx_self, __pyx_v_size, __pyx_v_initial_contents, __pyx_v_scaler);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_442make_moving_norm(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_size, PyObject *__pyx_v_initial_contents, double __pyx_v_scaler) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_moving_norm __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_moving_norm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.initial_contents = __pyx_v_initial_contents;
  __pyx_t_2.scaler = __pyx_v_scaler;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_moving_norm(__pyx_v_size, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4261
 *     return gen
 * 
 * cpdef cython.double moving_norm(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window norm.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_445moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_moving_norm(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4269
 *     :rtype: float
 *     """
 *     return cclm.mus_moving_norm(gen._ptr, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef is_moving_norm(mus_any gen ):
 */
  __pyx_r = mus_moving_norm(__pyx_v_gen->_ptr, __pyx_v_insig);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4261
 *     return gen
 * 
 * cpdef cython.double moving_norm(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window norm.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_445moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_444moving_norm, "\n    moving window norm.\n    \n    :param gen: moving_norm gen\n    :param insig: input value\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_445moving_norm = {"moving_norm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_445moving_norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_444moving_norm};
static PyObject *__pyx_pw_8pysndlib_3clm_445moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("moving_norm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4261, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4261, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("moving_norm", 1, 2, 2, 1); __PYX_ERR(0, 4261, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "moving_norm") < 0)) __PYX_ERR(0, 4261, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4261, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("moving_norm", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4261, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4261, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_444moving_norm(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_444moving_norm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("moving_norm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_moving_norm(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4261, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4271
 *     return cclm.mus_moving_norm(gen._ptr, insig)
 * 
 * cpdef is_moving_norm(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_norm.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_447is_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_moving_norm(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_moving_norm", 1);

  /* "pysndlib/clm.pyx":4278
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_moving_norm(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(mus_is_moving_norm(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4271
 *     return cclm.mus_moving_norm(gen._ptr, insig)
 * 
 * cpdef is_moving_norm(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_norm.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_447is_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_446is_moving_norm, "\n    returns True if gen is a moving_norm.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_447is_moving_norm = {"is_moving_norm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_447is_moving_norm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_446is_moving_norm};
static PyObject *__pyx_pw_8pysndlib_3clm_447is_moving_norm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_moving_norm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4271, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_moving_norm") < 0)) __PYX_ERR(0, 4271, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_moving_norm", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4271, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4271, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_446is_moving_norm(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_446is_moving_norm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_moving_norm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_moving_norm(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_moving_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4282
 * 
 * # ---------------- asymmetric-fm ---------------- #
 * cpdef mus_any make_asymmetric_fm(cython.double frequency, cython.double initial_phase=0.0, cython.double r=1.0, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new asymmetric_fm generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_449make_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_asymmetric_fm(double __pyx_v_frequency, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_asymmetric_fm *__pyx_optional_args) {
  double __pyx_v_initial_phase = ((double)0.0);
  double __pyx_v_r = ((double)1.0);
  double __pyx_v_ratio = ((double)1.);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_asymmetric_fm", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_initial_phase = __pyx_optional_args->initial_phase;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_r = __pyx_optional_args->r;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_ratio = __pyx_optional_args->ratio;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":4294
 *     """
 * 
 *     check_range('frequency', frequency, 0.0, None)             # <<<<<<<<<<<<<<
 * 
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_float_0_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_frequency, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4296
 *     check_range('frequency', frequency, 0.0, None)
 * 
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=0.0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_asymmetric_fm(__pyx_v_frequency, __pyx_v_initial_phase, __pyx_v_r, __pyx_v_ratio), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4282
 * 
 * # ---------------- asymmetric-fm ---------------- #
 * cpdef mus_any make_asymmetric_fm(cython.double frequency, cython.double initial_phase=0.0, cython.double r=1.0, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new asymmetric_fm generator.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_449make_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_448make_asymmetric_fm, "\n    return a new asymmetric_fm generator.\n    \n    :param frequency: frequency of gen\n    :param initial_phase: starting phase of gen, \\in radians\n    :param r: amplitude ratio between successive sidebands\n    :param ratio: ratio between carrier and sideband spacing\n    :return: asymmetric_fm gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_449make_asymmetric_fm = {"make_asymmetric_fm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_449make_asymmetric_fm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_448make_asymmetric_fm};
static PyObject *__pyx_pw_8pysndlib_3clm_449make_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_frequency;
  double __pyx_v_initial_phase;
  double __pyx_v_r;
  double __pyx_v_ratio;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_asymmetric_fm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frequency,&__pyx_n_s_initial_phase,&__pyx_n_s_r,&__pyx_n_s_ratio,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_initial_phase);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_r);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_asymmetric_fm") < 0)) __PYX_ERR(0, 4282, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frequency = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_frequency == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_initial_phase = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_initial_phase == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
    } else {
      __pyx_v_initial_phase = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_r = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
    } else {
      __pyx_v_r = ((double)1.0);
    }
    if (values[3]) {
      __pyx_v_ratio = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_ratio == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L3_error)
    } else {
      __pyx_v_ratio = ((double)1.);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_asymmetric_fm", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 4282, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_448make_asymmetric_fm(__pyx_self, __pyx_v_frequency, __pyx_v_initial_phase, __pyx_v_r, __pyx_v_ratio);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_448make_asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_frequency, double __pyx_v_initial_phase, double __pyx_v_r, double __pyx_v_ratio) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_asymmetric_fm __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_asymmetric_fm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.initial_phase = __pyx_v_initial_phase;
  __pyx_t_2.r = __pyx_v_r;
  __pyx_t_2.ratio = __pyx_v_ratio;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_asymmetric_fm(__pyx_v_frequency, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4298
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_451asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_asymmetric_fm(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm *__pyx_optional_args) {
  double __pyx_v_fm = ((double)0.0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fm = __pyx_optional_args->fm;
    }
  }

  /* "pysndlib/clm.pyx":4307
 *     :rtype: float
 *     """
 *     return cclm.mus_asymmetric_fm(gen._ptr, index, fm)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_asymmetric_fm(__pyx_v_gen->_ptr, __pyx_v_index, __pyx_v_fm);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4298
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_451asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_450asymmetric_fm, "\n    next sample from asymmetric fm generator.  \n       \n    :param gen: asymmetric_fm gen\n    :param index: fm index\n    :param fm: fm input\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_451asymmetric_fm = {"asymmetric_fm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_451asymmetric_fm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_450asymmetric_fm};
static PyObject *__pyx_pw_8pysndlib_3clm_451asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_index;
  double __pyx_v_fm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("asymmetric_fm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_index,&__pyx_n_s_fm,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("asymmetric_fm", 0, 2, 3, 1); __PYX_ERR(0, 4298, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fm);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "asymmetric_fm") < 0)) __PYX_ERR(0, 4298, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_index = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_index == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_fm = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_fm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
    } else {
      __pyx_v_fm = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("asymmetric_fm", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4298, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_450asymmetric_fm(__pyx_self, __pyx_v_gen, __pyx_v_index, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_450asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, double __pyx_v_fm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("asymmetric_fm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.fm = __pyx_v_fm;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_asymmetric_fm(__pyx_v_gen, __pyx_v_index, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4310
 * 
 * 
 * cpdef cython.double asymmetric_fm_unmodulated(mus_any gen, cython.double index):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_453asymmetric_fm_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_asymmetric_fm_unmodulated(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4318
 *     :rtype: float
 *     """
 *     return cclm.mus_asymmetric_fm_unmodulated(gen._ptr, index)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_asymmetric_fm(mus_any gen):
 */
  __pyx_r = mus_asymmetric_fm_unmodulated(__pyx_v_gen->_ptr, __pyx_v_index);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4310
 * 
 * 
 * cpdef cython.double asymmetric_fm_unmodulated(mus_any gen, cython.double index):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_453asymmetric_fm_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_452asymmetric_fm_unmodulated, "\n    next sample from asymmetric fm generator.  \n       \n    :param gen: asymmetric_fm gen\n    :param index: fm index\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_453asymmetric_fm_unmodulated = {"asymmetric_fm_unmodulated", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_453asymmetric_fm_unmodulated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_452asymmetric_fm_unmodulated};
static PyObject *__pyx_pw_8pysndlib_3clm_453asymmetric_fm_unmodulated(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("asymmetric_fm_unmodulated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_index,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("asymmetric_fm_unmodulated", 1, 2, 2, 1); __PYX_ERR(0, 4310, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "asymmetric_fm_unmodulated") < 0)) __PYX_ERR(0, 4310, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_index = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_index == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("asymmetric_fm_unmodulated", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4310, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.asymmetric_fm_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4310, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_452asymmetric_fm_unmodulated(__pyx_self, __pyx_v_gen, __pyx_v_index);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_452asymmetric_fm_unmodulated(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("asymmetric_fm_unmodulated", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_asymmetric_fm_unmodulated(__pyx_v_gen, __pyx_v_index, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.asymmetric_fm_unmodulated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4320
 *     return cclm.mus_asymmetric_fm_unmodulated(gen._ptr, index)
 * 
 * cpdef bint is_asymmetric_fm(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a asymmetric_fm.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_455is_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_asymmetric_fm(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4327
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_asymmetric_fm(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- file-to-sample ---------------- #
 */
  __pyx_r = mus_is_asymmetric_fm(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4320
 *     return cclm.mus_asymmetric_fm_unmodulated(gen._ptr, index)
 * 
 * cpdef bint is_asymmetric_fm(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a asymmetric_fm.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_455is_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_454is_asymmetric_fm, "\n    returns True if gen is a asymmetric_fm.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_455is_asymmetric_fm = {"is_asymmetric_fm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_455is_asymmetric_fm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_454is_asymmetric_fm};
static PyObject *__pyx_pw_8pysndlib_3clm_455is_asymmetric_fm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_asymmetric_fm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4320, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_asymmetric_fm") < 0)) __PYX_ERR(0, 4320, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_asymmetric_fm", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4320, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4320, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_454is_asymmetric_fm(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_454is_asymmetric_fm(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_asymmetric_fm", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_asymmetric_fm(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4320, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_asymmetric_fm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4330
 * 
 * # ---------------- file-to-sample ---------------- #
 * cpdef mus_any make_file2sample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading 'filename' (a sound file).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_457make_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_file2sample(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_file2sample *__pyx_optional_args) {
  PyObject *__pyx_v_buffer_size = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  char const *__pyx_t_9;
  mus_long_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_file2sample", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_buffer_size = __pyx_optional_args->buffer_size;
    }
  }
  __Pyx_INCREF(__pyx_v_buffer_size);

  /* "pysndlib/clm.pyx":4339
 *     :rtype: mus_any
 *     """
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2sample: {filename} does not exist.')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "pysndlib/clm.pyx":4340
 *     """
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'file2sample: {filename} does not exist.')             # <<<<<<<<<<<<<<
 * 
 *     buffer_size = buffer_size or default.buffer_size
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_file2sample);
    __pyx_t_7 += 13;
    __Pyx_GIVEREF(__pyx_kp_u_file2sample);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_file2sample);
    __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_does_not_exist);
    __pyx_t_7 += 16;
    __Pyx_GIVEREF(__pyx_kp_u_does_not_exist);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_exist);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 4340, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4339
 *     :rtype: mus_any
 *     """
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2sample: {filename} does not exist.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4342
 *         raise FileNotFoundError(f'file2sample: {filename} does not exist.')
 * 
 *     buffer_size = buffer_size or default.buffer_size             # <<<<<<<<<<<<<<
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4342, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __Pyx_INCREF(__pyx_v_buffer_size);
    __pyx_t_2 = __pyx_v_buffer_size;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4343
 * 
 *     buffer_size = buffer_size or default.buffer_size
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=0):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 4343, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_10 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4343, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_file_to_sample_with_buffer_size(__pyx_t_9, __pyx_t_10), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4330
 * 
 * # ---------------- file-to-sample ---------------- #
 * cpdef mus_any make_file2sample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading 'filename' (a sound file).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buffer_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_457make_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_456make_file2sample, "\n    return an input generator reading 'filename' (a sound file).\n    \n    :param filename: name of file to read\n    :param buffer_size: io buffer size\n    :return: file2sample gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_457make_file2sample = {"make_file2sample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_457make_file2sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_456make_file2sample};
static PyObject *__pyx_pw_8pysndlib_3clm_457make_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_buffer_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_file2sample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_buffer_size,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4330, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4330, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_file2sample") < 0)) __PYX_ERR(0, 4330, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    __pyx_v_buffer_size = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_file2sample", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4330, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 4330, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_456make_file2sample(__pyx_self, __pyx_v_filename, __pyx_v_buffer_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_456make_file2sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_buffer_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_file2sample __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_file2sample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.buffer_size = __pyx_v_buffer_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_file2sample(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4345
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=0):             # <<<<<<<<<<<<<<
 *     """
 *     sample value \in sound file read by 'obj' \in channel chan at sample.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_459file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_file2sample(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2sample *__pyx_optional_args) {
  int __pyx_v_chan = ((int)0);
  double __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_chan = __pyx_optional_args->chan;
    }
  }

  /* "pysndlib/clm.pyx":4354
 *     :rtype: float
 *     """
 *     return cclm.mus_file_to_sample(gen._ptr, loc, chan)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_file2sample(mus_any gen):
 */
  __pyx_r = mus_file_to_sample(__pyx_v_gen->_ptr, __pyx_v_loc, __pyx_v_chan);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4345
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=0):             # <<<<<<<<<<<<<<
 *     """
 *     sample value \in sound file read by 'obj' \in channel chan at sample.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_459file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_458file2sample, "\n    sample value \\in sound file read by 'obj' \\in channel chan at sample.\n    \n    :param gen: file2sample gen\n    :param loc: location \\in file to read\n    :param chan: channel to read\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_459file2sample = {"file2sample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_459file2sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_458file2sample};
static PyObject *__pyx_pw_8pysndlib_3clm_459file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  long __pyx_v_loc;
  int __pyx_v_chan;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("file2sample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_loc,&__pyx_n_s_chan,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("file2sample", 0, 2, 3, 1); __PYX_ERR(0, 4345, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "file2sample") < 0)) __PYX_ERR(0, 4345, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_loc = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_chan = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L3_error)
    } else {
      __pyx_v_chan = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("file2sample", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4345, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4345, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_458file2sample(__pyx_self, __pyx_v_gen, __pyx_v_loc, __pyx_v_chan);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_458file2sample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, int __pyx_v_chan) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_file2sample __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file2sample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.chan = __pyx_v_chan;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_file2sample(__pyx_v_gen, __pyx_v_loc, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4356
 *     return cclm.mus_file_to_sample(gen._ptr, loc, chan)
 * 
 * cpdef bint is_file2sample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2sample.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_461is_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_file2sample(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4363
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_file_to_sample(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * # ---------------- sample-to-file ---------------- #
 */
  __pyx_r = mus_is_file_to_sample(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4356
 *     return cclm.mus_file_to_sample(gen._ptr, loc, chan)
 * 
 * cpdef bint is_file2sample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2sample.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_461is_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_460is_file2sample, "\n    returns True if gen is a file2sample.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_461is_file2sample = {"is_file2sample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_461is_file2sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_460is_file2sample};
static PyObject *__pyx_pw_8pysndlib_3clm_461is_file2sample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_file2sample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4356, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_file2sample") < 0)) __PYX_ERR(0, 4356, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_file2sample", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4356, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4356, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_460is_file2sample(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_460is_file2sample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_file2sample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_file2sample(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4356, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_file2sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4366
 * 
 * # ---------------- sample-to-file ---------------- #
 * cpdef mus_any make_sample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have chans'
 */

static PyObject *__pyx_pw_8pysndlib_3clm_463make_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_sample2file(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_sample2file *__pyx_optional_args) {
  int __pyx_v_chans = ((int)1);
  PyObject *__pyx_v_sample_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_header_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_comment = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  mus_sample_t __pyx_t_6;
  mus_header_t __pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_sample2file", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_chans = __pyx_optional_args->chans;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_sample_type = __pyx_optional_args->sample_type;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_header_type = __pyx_optional_args->header_type;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_comment = __pyx_optional_args->comment;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_sample_type);
  __Pyx_INCREF(__pyx_v_header_type);

  /* "pysndlib/clm.pyx":4379
 *     :rtype: mus_any
 *     """
 *     sample_type = sample_type or default.sample_type             # <<<<<<<<<<<<<<
 *     header_type = header_type or default.header_type
 *     if comment is None:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sample_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4379, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_sample_type);
    __pyx_t_1 = __pyx_v_sample_type;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_sample_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4380
 *     """
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type             # <<<<<<<<<<<<<<
 *     if comment is None:
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_header_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4380, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_header_type);
    __pyx_t_1 = __pyx_v_header_type;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_header_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_header_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4381
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type
 *     if comment is None:             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 *     else:
 */
  __pyx_t_2 = (__pyx_v_comment == Py_None);
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":4382
 *     header_type = header_type or default.header_type
 *     if comment is None:
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))             # <<<<<<<<<<<<<<
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 4382, __pyx_L1_error)
    __pyx_t_6 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4382, __pyx_L1_error)
    __pyx_t_7 = ((mus_header_t)__Pyx_PyInt_As_mus_header_t(__pyx_v_header_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4382, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_sample_to_file_with_comment(__pyx_t_5, __pyx_v_chans, ((mus_sample_t)((mus_sample_t)__pyx_t_6)), ((mus_header_t)__pyx_t_7), NULL), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4381
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type
 *     if comment is None:             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4384
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double sample2file(mus_any gen, cython.long samp, cython.int chan ,  cython.double val):
 */
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 4384, __pyx_L1_error)
    __pyx_t_6 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4384, __pyx_L1_error)
    __pyx_t_7 = ((mus_header_t)__Pyx_PyInt_As_mus_header_t(__pyx_v_header_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4384, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_comment); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 4384, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_sample_to_file_with_comment(__pyx_t_5, __pyx_v_chans, ((mus_sample_t)((mus_sample_t)__pyx_t_6)), ((mus_header_t)__pyx_t_7), __pyx_t_8), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4366
 * 
 * # ---------------- sample-to-file ---------------- #
 * cpdef mus_any make_sample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have chans'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sample_type);
  __Pyx_XDECREF(__pyx_v_header_type);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_463make_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_462make_sample2file, "\n    return an output generator writing the sound file 'filename' which is set up to have chans'\n    channels of 'sample_type' samples with a header of 'header_type'.  the latter should be sndlib\n    identifiers.\n    \n    :param filename: name of file to write\n    :param chans: number of channels\n    :param sample_type: sample type of file\n    :param header_type: header type of file\n    :return: sample2file gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_463make_sample2file = {"make_sample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_463make_sample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_462make_sample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_463make_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  int __pyx_v_chans;
  PyObject *__pyx_v_sample_type = 0;
  PyObject *__pyx_v_header_type = 0;
  PyObject *__pyx_v_comment = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_sample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_chans,&__pyx_n_s_sample_type,&__pyx_n_s_header_type,&__pyx_n_s_comment,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chans);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_sample2file") < 0)) __PYX_ERR(0, 4366, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_chans = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chans == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
    } else {
      __pyx_v_chans = ((int)1);
    }
    __pyx_v_sample_type = values[2];
    __pyx_v_header_type = values[3];
    __pyx_v_comment = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_sample2file", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4366, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 4366, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_462make_sample2file(__pyx_self, __pyx_v_filename, __pyx_v_chans, __pyx_v_sample_type, __pyx_v_header_type, __pyx_v_comment);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_462make_sample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chans, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_sample2file __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_sample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.chans = __pyx_v_chans;
  __pyx_t_2.sample_type = __pyx_v_sample_type;
  __pyx_t_2.header_type = __pyx_v_header_type;
  __pyx_t_2.comment = __pyx_v_comment;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_sample2file(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4386
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 * 
 * cpdef cython.double sample2file(mus_any gen, cython.long samp, cython.int chan ,  cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     add val to the output stream handled by the output generator 'obj', \in channel 'chan' at frample 'samp'.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_465sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_sample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, int __pyx_v_chan, double __pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4396
 *     :rtype: float
 *     """
 *     return cclm.mus_sample_to_file(gen._ptr, samp, chan, val)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_sample2file(mus_any gen):
 */
  __pyx_r = mus_sample_to_file(__pyx_v_gen->_ptr, __pyx_v_samp, __pyx_v_chan, __pyx_v_val);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4386
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 * 
 * cpdef cython.double sample2file(mus_any gen, cython.long samp, cython.int chan ,  cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     add val to the output stream handled by the output generator 'obj', \in channel 'chan' at frample 'samp'.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_465sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_464sample2file, "\n    add val to the output stream handled by the output generator 'obj', \\in channel 'chan' at frample 'samp'.\n    \n    :param gen: sample2file gem\n    :param samp: location \\in file to write\n    :param chan: channel to write\n    :param val: sample value to write\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_465sample2file = {"sample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_465sample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_464sample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_465sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  long __pyx_v_samp;
  int __pyx_v_chan;
  double __pyx_v_val;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_samp,&__pyx_n_s_chan,&__pyx_n_s_val,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_samp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("sample2file", 1, 4, 4, 1); __PYX_ERR(0, 4386, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("sample2file", 1, 4, 4, 2); __PYX_ERR(0, 4386, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("sample2file", 1, 4, 4, 3); __PYX_ERR(0, 4386, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sample2file") < 0)) __PYX_ERR(0, 4386, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_samp = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_samp == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
    __pyx_v_chan = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
    __pyx_v_val = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sample2file", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4386, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4386, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_464sample2file(__pyx_self, __pyx_v_gen, __pyx_v_samp, __pyx_v_chan, __pyx_v_val);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_464sample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, int __pyx_v_chan, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_sample2file(__pyx_v_gen, __pyx_v_samp, __pyx_v_chan, __pyx_v_val, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4398
 *     return cclm.mus_sample_to_file(gen._ptr, samp, chan, val)
 * 
 * cpdef bint is_sample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sample2file.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_467is_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_sample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4405
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_sample_to_file(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any continue_sample2file(name: str):
 */
  __pyx_r = mus_is_sample_to_file(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4398
 *     return cclm.mus_sample_to_file(gen._ptr, samp, chan, val)
 * 
 * cpdef bint is_sample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sample2file.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_467is_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_466is_sample2file, "\n    returns True if gen is a sample2file.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_467is_sample2file = {"is_sample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_467is_sample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_466is_sample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_467is_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_sample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4398, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_sample2file") < 0)) __PYX_ERR(0, 4398, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_sample2file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4398, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4398, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_466is_sample2file(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_466is_sample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_sample2file(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4398, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4407
 *     return cclm.mus_is_sample_to_file(gen._ptr)
 * 
 * cpdef mus_any continue_sample2file(name: str):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_469continue_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_continue_sample2file(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("continue_sample2file", 1);

  /* "pysndlib/clm.pyx":4415
 *     :rtype: mus_any
 *     """
 *     return mus_any.from_ptr(cclm.mus_continue_sample_to_file(name))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4415, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_continue_sample_to_file(__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4407
 *     return cclm.mus_is_sample_to_file(gen._ptr)
 * 
 * cpdef mus_any continue_sample2file(name: str):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.continue_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_469continue_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_468continue_sample2file, "\n    reopen an existing file to continue adding sound data to it.\n    \n    :param filename: name of file to write\n    :return: file2sample gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_469continue_sample2file = {"continue_sample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_469continue_sample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_468continue_sample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_469continue_sample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("continue_sample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4407, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "continue_sample2file") < 0)) __PYX_ERR(0, 4407, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("continue_sample2file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4407, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.continue_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 0, "name", 1))) __PYX_ERR(0, 4407, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_468continue_sample2file(__pyx_self, __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_468continue_sample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("continue_sample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_continue_sample2file(__pyx_v_name, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.continue_sample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4419
 * 
 * # ---------------- file-to-frample ---------------- #
 * cpdef mus_any make_file2frample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading all channels of 'filename' (a sound file).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_471make_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_file2frample(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_file2frample *__pyx_optional_args) {
  PyObject *__pyx_v_buffer_size = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  char const *__pyx_t_9;
  mus_long_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_file2frample", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_buffer_size = __pyx_optional_args->buffer_size;
    }
  }
  __Pyx_INCREF(__pyx_v_buffer_size);

  /* "pysndlib/clm.pyx":4428
 *     :rtype: mus_any
 *     """
 *     buffer_size = buffer_size or default.buffer_size             # <<<<<<<<<<<<<<
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'file2frample: {filename} does not exist.')
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4428, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_buffer_size);
    __pyx_t_1 = __pyx_v_buffer_size;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_buffer_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4429
 *     """
 *     buffer_size = buffer_size or default.buffer_size
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2frample: {filename} does not exist.')
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_2);
  if (unlikely(__pyx_t_6)) {

    /* "pysndlib/clm.pyx":4430
 *     buffer_size = buffer_size or default.buffer_size
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'file2frample: {filename} does not exist.')             # <<<<<<<<<<<<<<
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_file2frample);
    __pyx_t_7 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_file2frample);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_file2frample);
    __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_does_not_exist);
    __pyx_t_7 += 16;
    __Pyx_GIVEREF(__pyx_kp_u_does_not_exist);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_does_not_exist);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 4430, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4429
 *     """
 *     buffer_size = buffer_size or default.buffer_size
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'file2frample: {filename} does not exist.')
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 */
  }

  /* "pysndlib/clm.pyx":4431
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'file2frample: {filename} does not exist.')
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))             # <<<<<<<<<<<<<<
 * 
 * cpdef file2frample(mus_any gen, cython.long loc):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 4431, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_10 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4431, __pyx_L1_error)
  __pyx_t_4 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_file_to_frample_with_buffer_size(__pyx_t_9, __pyx_t_10), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4419
 * 
 * # ---------------- file-to-frample ---------------- #
 * cpdef mus_any make_file2frample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading all channels of 'filename' (a sound file).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buffer_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_471make_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_470make_file2frample, "\n    return an input generator reading all channels of 'filename' (a sound file).\n    \n    :param filename: name of file to read\n    :param buffer_size: io buffer size\n    :return: file2frample gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_471make_file2frample = {"make_file2frample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_471make_file2frample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_470make_file2frample};
static PyObject *__pyx_pw_8pysndlib_3clm_471make_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_buffer_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_file2frample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_buffer_size,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4419, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4419, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_file2frample") < 0)) __PYX_ERR(0, 4419, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    __pyx_v_buffer_size = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_file2frample", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4419, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 4419, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_470make_file2frample(__pyx_self, __pyx_v_filename, __pyx_v_buffer_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_470make_file2frample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_buffer_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_file2frample __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_file2frample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.buffer_size = __pyx_v_buffer_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_file2frample(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4433
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef file2frample(mus_any gen, cython.long loc):             # <<<<<<<<<<<<<<
 *     """
 *     frample of samples at frample 'samp' \in sound file read by 'obj'.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_473file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_file2frample(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_outf = NULL;
  __Pyx_memviewslice __pyx_v_outf_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file2frample", 1);

  /* "pysndlib/clm.pyx":4441
 *     :rtype: np.ndarray
 *     """
 *     outf = np.zeros(cclm.mus_channels(gen._ptr), dtype=np.double)             # <<<<<<<<<<<<<<
 *     cdef double [:] outf_view = outf
 *     cclm.mus_file_to_frample(gen._ptr, loc, &outf_view[0])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(mus_channels(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_outf = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":4442
 *     """
 *     outf = np.zeros(cclm.mus_channels(gen._ptr), dtype=np.double)
 *     cdef double [:] outf_view = outf             # <<<<<<<<<<<<<<
 *     cclm.mus_file_to_frample(gen._ptr, loc, &outf_view[0])
 *     return outf
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_outf, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 4442, __pyx_L1_error)
  __pyx_v_outf_view = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "pysndlib/clm.pyx":4443
 *     outf = np.zeros(cclm.mus_channels(gen._ptr), dtype=np.double)
 *     cdef double [:] outf_view = outf
 *     cclm.mus_file_to_frample(gen._ptr, loc, &outf_view[0])             # <<<<<<<<<<<<<<
 *     return outf
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_outf_view.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_outf_view.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 4443, __pyx_L1_error)
  }
  (void)(mus_file_to_frample(__pyx_v_gen->_ptr, __pyx_v_loc, (&(*((double *) ( /* dim=0 */ (__pyx_v_outf_view.data + __pyx_t_7 * __pyx_v_outf_view.strides[0]) ))))));

  /* "pysndlib/clm.pyx":4444
 *     cdef double [:] outf_view = outf
 *     cclm.mus_file_to_frample(gen._ptr, loc, &outf_view[0])
 *     return outf             # <<<<<<<<<<<<<<
 * 
 * cpdef is_file2frample(mus_any gen):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_outf);
  __pyx_r = __pyx_v_outf;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4433
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef file2frample(mus_any gen, cython.long loc):             # <<<<<<<<<<<<<<
 *     """
 *     frample of samples at frample 'samp' \in sound file read by 'obj'.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_AddTraceback("pysndlib.clm.file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outf);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_outf_view, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_473file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_472file2frample, "\n    frample of samples at frample 'samp' \\in sound file read by 'obj'.\n    \n    :param gen: file2frample gen\n    :param loc: location \\in file to read\n    :rtype: np.ndarray\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_473file2frample = {"file2frample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_473file2frample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_472file2frample};
static PyObject *__pyx_pw_8pysndlib_3clm_473file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  long __pyx_v_loc;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("file2frample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_loc,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4433, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4433, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("file2frample", 1, 2, 2, 1); __PYX_ERR(0, 4433, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "file2frample") < 0)) __PYX_ERR(0, 4433, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_loc = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4433, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("file2frample", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4433, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4433, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_472file2frample(__pyx_self, __pyx_v_gen, __pyx_v_loc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_472file2frample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file2frample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_file2frample(__pyx_v_gen, __pyx_v_loc, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4446
 *     return outf
 * 
 * cpdef is_file2frample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2frample.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_475is_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_file2frample(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_file2frample", 1);

  /* "pysndlib/clm.pyx":4453
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_file_to_frample(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(mus_is_file_to_frample(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4446
 *     return outf
 * 
 * cpdef is_file2frample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2frample.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_475is_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_474is_file2frample, "\n    returns True if gen is a file2frample.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_475is_file2frample = {"is_file2frample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_475is_file2frample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_474is_file2frample};
static PyObject *__pyx_pw_8pysndlib_3clm_475is_file2frample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_file2frample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4446, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_file2frample") < 0)) __PYX_ERR(0, 4446, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_file2frample", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4446, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4446, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_474is_file2frample(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_474is_file2frample(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_file2frample", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_file2frample(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_file2frample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4457
 * 
 * # ---------------- frample-to-file ---------------- #
 * cpdef mus_any make_frample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have 'chans'
 */

static PyObject *__pyx_pw_8pysndlib_3clm_477make_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_frample2file(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_frample2file *__pyx_optional_args) {
  int __pyx_v_chans = ((int)1);
  PyObject *__pyx_v_sample_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_header_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_comment = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  mus_sample_t __pyx_t_6;
  mus_header_t __pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_frample2file", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_chans = __pyx_optional_args->chans;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_sample_type = __pyx_optional_args->sample_type;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_header_type = __pyx_optional_args->header_type;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_comment = __pyx_optional_args->comment;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_sample_type);
  __Pyx_INCREF(__pyx_v_header_type);

  /* "pysndlib/clm.pyx":4470
 *     :rtype: mus_any
 *     """
 *     sample_type = sample_type or default.sample_type             # <<<<<<<<<<<<<<
 *     header_type = header_type or default.header_type
 *     if comment:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sample_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4470, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_sample_type);
    __pyx_t_1 = __pyx_v_sample_type;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_sample_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4471
 *     """
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type             # <<<<<<<<<<<<<<
 *     if comment:
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_header_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4471, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_header_type);
    __pyx_t_1 = __pyx_v_header_type;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_header_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_header_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4472
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type
 *     if comment:             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 *     else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_comment); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4472, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":4473
 *     header_type = header_type or default.header_type
 *     if comment:
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))             # <<<<<<<<<<<<<<
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 4473, __pyx_L1_error)
    __pyx_t_6 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4473, __pyx_L1_error)
    __pyx_t_7 = ((mus_header_t)__Pyx_PyInt_As_mus_header_t(__pyx_v_header_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4473, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_comment); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 4473, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_frample_to_file_with_comment(__pyx_t_5, __pyx_v_chans, ((mus_sample_t)((mus_sample_t)__pyx_t_6)), ((mus_header_t)__pyx_t_7), __pyx_t_8), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4472
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type
 *     if comment:             # <<<<<<<<<<<<<<
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4475
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 *     else:
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double frample2file(mus_any gen, cython.long samp, vals):
 */
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 4475, __pyx_L1_error)
    __pyx_t_6 = ((mus_sample_t)__Pyx_PyInt_As_mus_sample_t(__pyx_v_sample_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4475, __pyx_L1_error)
    __pyx_t_7 = ((mus_header_t)__Pyx_PyInt_As_mus_header_t(__pyx_v_header_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4475, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_frample_to_file_with_comment(__pyx_t_5, __pyx_v_chans, ((mus_sample_t)((mus_sample_t)__pyx_t_6)), ((mus_header_t)__pyx_t_7), NULL), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4457
 * 
 * # ---------------- frample-to-file ---------------- #
 * cpdef mus_any make_frample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have 'chans'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sample_type);
  __Pyx_XDECREF(__pyx_v_header_type);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_477make_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_476make_frample2file, "\n    return an output generator writing the sound file 'filename' which is set up to have 'chans'\n    channels of 'sample_type' samples with a header of 'header_type'.  the latter should be sndlib\n    identifiers.    \n    \n    :param filename: name of file to write\n    :param chans: number of channels\n    :param frample2file: sample type of file\n    :param header_type: header type of file\n    :return: sample2file gen\n    :rtype: mus_any    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_477make_frample2file = {"make_frample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_477make_frample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_476make_frample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_477make_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  int __pyx_v_chans;
  PyObject *__pyx_v_sample_type = 0;
  PyObject *__pyx_v_header_type = 0;
  PyObject *__pyx_v_comment = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_frample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_chans,&__pyx_n_s_sample_type,&__pyx_n_s_header_type,&__pyx_n_s_comment,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chans);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_frample2file") < 0)) __PYX_ERR(0, 4457, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_chans = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chans == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L3_error)
    } else {
      __pyx_v_chans = ((int)1);
    }
    __pyx_v_sample_type = values[2];
    __pyx_v_header_type = values[3];
    __pyx_v_comment = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_frample2file", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4457, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 4457, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_476make_frample2file(__pyx_self, __pyx_v_filename, __pyx_v_chans, __pyx_v_sample_type, __pyx_v_header_type, __pyx_v_comment);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_476make_frample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chans, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type, PyObject *__pyx_v_comment) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_frample2file __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_frample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.chans = __pyx_v_chans;
  __pyx_t_2.sample_type = __pyx_v_sample_type;
  __pyx_t_2.header_type = __pyx_v_header_type;
  __pyx_t_2.comment = __pyx_v_comment;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_frample2file(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4477
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 * 
 * cpdef cython.double frample2file(mus_any gen, cython.long samp, vals):             # <<<<<<<<<<<<<<
 *     """
 *     add frample 'val' to the output stream handled by the output generator 'obj' at frample 'samp'.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_479frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_frample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, PyObject *__pyx_v_vals, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_memviewslice __pyx_v_val_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_frample = { 0, 0, { 0 }, { 0 }, { 0 } };
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frample2file", 0);
  __Pyx_INCREF(__pyx_v_vals);

  /* "pysndlib/clm.pyx":4486
 *     :rtype: float
 *     """
 *     cdef double [:] val_view = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(vals, list):
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 4486, __pyx_L1_error)
  __pyx_v_val_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":4488
 *     cdef double [:] val_view = None
 * 
 *     if isinstance(vals, list):             # <<<<<<<<<<<<<<
 *         vals = np.array(vals)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_vals); 
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":4489
 * 
 *     if isinstance(vals, list):
 *         vals = np.array(vals)             # <<<<<<<<<<<<<<
 * 
 *     val_view = vals
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_vals};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4489, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_vals, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":4488
 *     cdef double [:] val_view = None
 * 
 *     if isinstance(vals, list):             # <<<<<<<<<<<<<<
 *         vals = np.array(vals)
 * 
 */
  }

  /* "pysndlib/clm.pyx":4491
 *         vals = np.array(vals)
 * 
 *     val_view = vals             # <<<<<<<<<<<<<<
 * 
 *     frample = val_view
 */
  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_vals, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 4491, __pyx_L1_error)
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_val_view, 1);
  __pyx_v_val_view = __pyx_t_1;
  __pyx_t_1.memview = NULL;
  __pyx_t_1.data = NULL;

  /* "pysndlib/clm.pyx":4493
 *     val_view = vals
 * 
 *     frample = val_view             # <<<<<<<<<<<<<<
 *     cclm.mus_frample_to_file(gen._ptr, samp, &frample[0])
 *     return vals
 */
  __PYX_INC_MEMVIEW(&__pyx_v_val_view, 1);
  __pyx_v_frample = __pyx_v_val_view;

  /* "pysndlib/clm.pyx":4494
 * 
 *     frample = val_view
 *     cclm.mus_frample_to_file(gen._ptr, samp, &frample[0])             # <<<<<<<<<<<<<<
 *     return vals
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_6 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_v_frample.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_6 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_v_frample.shape[0])) __pyx_t_6 = 0;
  if (unlikely(__pyx_t_6 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_6);
    __PYX_ERR(0, 4494, __pyx_L1_error)
  }
  (void)(mus_frample_to_file(__pyx_v_gen->_ptr, __pyx_v_samp, (&(*((double *) ( /* dim=0 */ (__pyx_v_frample.data + __pyx_t_7 * __pyx_v_frample.strides[0]) ))))));

  /* "pysndlib/clm.pyx":4495
 *     frample = val_view
 *     cclm.mus_frample_to_file(gen._ptr, samp, &frample[0])
 *     return vals             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_frample2file(mus_any gen):
 */
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_vals); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4495, __pyx_L1_error)
  __pyx_r = __pyx_t_8;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4477
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 * 
 * cpdef cython.double frample2file(mus_any gen, cython.long samp, vals):             # <<<<<<<<<<<<<<
 *     """
 *     add frample 'val' to the output stream handled by the output generator 'obj' at frample 'samp'.
 */

  /* function exit code */
  __pyx_L1_error:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_val_view, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_frample, 1);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_479frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_478frample2file, "\n    add frample 'val' to the output stream handled by the output generator 'obj' at frample 'samp'.\n    \n    :param gen: frample2file gem\n    :param samp: location \\in file to write\n    :param vals: sample value to write. list or np.ndarray\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_479frample2file = {"frample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_479frample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_478frample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_479frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  long __pyx_v_samp;
  PyObject *__pyx_v_vals = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_samp,&__pyx_n_s_vals,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_samp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("frample2file", 1, 3, 3, 1); __PYX_ERR(0, 4477, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vals)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("frample2file", 1, 3, 3, 2); __PYX_ERR(0, 4477, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "frample2file") < 0)) __PYX_ERR(0, 4477, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_samp = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_samp == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L3_error)
    __pyx_v_vals = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("frample2file", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4477, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4477, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_478frample2file(__pyx_self, __pyx_v_gen, __pyx_v_samp, __pyx_v_vals);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_478frample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_samp, PyObject *__pyx_v_vals) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_frample2file(__pyx_v_gen, __pyx_v_samp, __pyx_v_vals, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4497
 *     return vals
 * 
 * cpdef bint is_frample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a frample2file.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_481is_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_frample2file(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4504
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_frample_to_file(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_frample_to_file(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4497
 *     return vals
 * 
 * cpdef bint is_frample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a frample2file.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_481is_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_480is_frample2file, "\n    returns True if gen is a frample2file.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_481is_frample2file = {"is_frample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_481is_frample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_480is_frample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_481is_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_frample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4497, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_frample2file") < 0)) __PYX_ERR(0, 4497, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_frample2file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4497, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4497, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_480is_frample2file(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_480is_frample2file(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_frample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_frample2file(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4497, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4507
 * 
 * 
 * cpdef mus_any continue_frample2file(str name):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_483continue_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_continue_frample2file(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("continue_frample2file", 1);

  /* "pysndlib/clm.pyx":4515
 *     :rtype: mus_any
 *     """
 *     return mus_any.from_ptr(cclm.mus_continue_frample_to_file(name))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4515, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_continue_frample_to_file(__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4507
 * 
 * 
 * cpdef mus_any continue_frample2file(str name):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.continue_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_483continue_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_482continue_frample2file, "\n    reopen an existing file to continue adding sound data to it.\n    \n    :param filename: name of file to write\n    :return: frample2file gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_483continue_frample2file = {"continue_frample2file", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_483continue_frample2file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_482continue_frample2file};
static PyObject *__pyx_pw_8pysndlib_3clm_483continue_frample2file(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("continue_frample2file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4507, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "continue_frample2file") < 0)) __PYX_ERR(0, 4507, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("continue_frample2file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.continue_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 4507, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_482continue_frample2file(__pyx_self, __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_482continue_frample2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("continue_frample2file", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_continue_frample2file(__pyx_v_name, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.continue_frample2file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4519
 * 
 * # ---------------- readin ---------------- #
 * cpdef mus_any make_readin(str filename, cython.int chan=0, cython.long start=0, cython.int direction=1, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new readin (file input) generator reading the sound file 'file' starting at frample
 */

static PyObject *__pyx_pw_8pysndlib_3clm_485make_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_readin(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_readin *__pyx_optional_args) {
  int __pyx_v_chan = ((int)0);
  long __pyx_v_start = ((long)0);
  int __pyx_v_direction = ((int)1);
  PyObject *__pyx_v_buffer_size = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  char const *__pyx_t_10;
  mus_long_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_readin", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_chan = __pyx_optional_args->chan;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_start = __pyx_optional_args->start;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_direction = __pyx_optional_args->direction;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_buffer_size = __pyx_optional_args->buffer_size;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_buffer_size);

  /* "pysndlib/clm.pyx":4531
 * 
 *     """
 *     check_range('chan', chan, 0, None)             # <<<<<<<<<<<<<<
 *     check_range('start', start, 0, None)
 *     check_range('buffer_size', buffer_size, 0, None)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_chan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_chan, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4532
 *     """
 *     check_range('chan', chan, 0, None)
 *     check_range('start', start, 0, None)             # <<<<<<<<<<<<<<
 *     check_range('buffer_size', buffer_size, 0, None)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_start, __pyx_t_2, 0, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4533
 *     check_range('chan', chan, 0, None)
 *     check_range('start', start, 0, None)
 *     check_range('buffer_size', buffer_size, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     if not os.path.isfile(filename):
 */
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_buffer_size, __pyx_v_buffer_size, 0, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4535
 *     check_range('buffer_size', buffer_size, 0, None)
 * 
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'readin: {filename} does not exist.')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  if (unlikely(__pyx_t_7)) {

    /* "pysndlib/clm.pyx":4536
 * 
 *     if not os.path.isfile(filename):
 *         raise FileNotFoundError(f'readin: {filename} does not exist.')             # <<<<<<<<<<<<<<
 * 
 *     buffer_size = buffer_size or default.buffer_size
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FileNotFoundError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_readin);
    __pyx_t_8 += 8;
    __Pyx_GIVEREF(__pyx_kp_u_readin);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_readin);
    __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u_does_not_exist);
    __pyx_t_8 += 16;
    __Pyx_GIVEREF(__pyx_kp_u_does_not_exist);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_does_not_exist);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 4536, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4535
 *     check_range('buffer_size', buffer_size, 0, None)
 * 
 *     if not os.path.isfile(filename):             # <<<<<<<<<<<<<<
 *         raise FileNotFoundError(f'readin: {filename} does not exist.')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4538
 *         raise FileNotFoundError(f'readin: {filename} does not exist.')
 * 
 *     buffer_size = buffer_size or default.buffer_size             # <<<<<<<<<<<<<<
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4538, __pyx_L1_error)
  if (!__pyx_t_7) {
  } else {
    __Pyx_INCREF(__pyx_v_buffer_size);
    __pyx_t_2 = __pyx_v_buffer_size;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4539
 * 
 *     buffer_size = buffer_size or default.buffer_size
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double readin(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 4539, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_11 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4539, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_readin_with_buffer_size(__pyx_t_10, __pyx_v_chan, __pyx_v_start, __pyx_v_direction, __pyx_t_11), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4519
 * 
 * # ---------------- readin ---------------- #
 * cpdef mus_any make_readin(str filename, cython.int chan=0, cython.long start=0, cython.int direction=1, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new readin (file input) generator reading the sound file 'file' starting at frample
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.make_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buffer_size);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_485make_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_484make_readin, "\n    return a new readin (file input) generator reading the sound file 'file' starting at frample\n    'start' \\in channel 'channel' and reading forward if 'direction' is not -1.\n    \n    :param filename: name of file to read\n    :param chan: channel to read (0 based)\n    :param start: location \\in samples to start at\n    :param direction: forward (1) or backward (-1)\n    :param buffer_size: io buffer size\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_485make_readin = {"make_readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_485make_readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_484make_readin};
static PyObject *__pyx_pw_8pysndlib_3clm_485make_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  int __pyx_v_chan;
  long __pyx_v_start;
  int __pyx_v_direction;
  PyObject *__pyx_v_buffer_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_chan,&__pyx_n_s_start,&__pyx_n_s_direction,&__pyx_n_s_buffer_size,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_readin") < 0)) __PYX_ERR(0, 4519, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_chan = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
    } else {
      __pyx_v_chan = ((int)0);
    }
    if (values[2]) {
      __pyx_v_start = __Pyx_PyInt_As_long(values[2]); if (unlikely((__pyx_v_start == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
    } else {
      __pyx_v_start = ((long)0);
    }
    if (values[3]) {
      __pyx_v_direction = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
    } else {
      __pyx_v_direction = ((int)1);
    }
    __pyx_v_buffer_size = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_readin", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4519, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 4519, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_484make_readin(__pyx_self, __pyx_v_filename, __pyx_v_chan, __pyx_v_start, __pyx_v_direction, __pyx_v_buffer_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_484make_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, int __pyx_v_chan, long __pyx_v_start, int __pyx_v_direction, PyObject *__pyx_v_buffer_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_readin __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.chan = __pyx_v_chan;
  __pyx_t_2.start = __pyx_v_start;
  __pyx_t_2.direction = __pyx_v_direction;
  __pyx_t_2.buffer_size = __pyx_v_buffer_size;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_readin(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4541
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))
 * 
 * cpdef cython.double readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from readin generator (a sound file reader).
 */

static PyObject *__pyx_pw_8pysndlib_3clm_487readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_readin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4548
 *     :rtype: float
 *     """
 *     return cclm.mus_readin(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef is_readin(mus_any gen):
 */
  __pyx_r = mus_readin(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4541
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))
 * 
 * cpdef cython.double readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from readin generator (a sound file reader).
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_487readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_486readin, "\n    next sample from readin generator (a sound file reader).\n    \n    :param gen: readin gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_487readin = {"readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_487readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_486readin};
static PyObject *__pyx_pw_8pysndlib_3clm_487readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "readin") < 0)) __PYX_ERR(0, 4541, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("readin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4541, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_486readin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_486readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_readin(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4550
 *     return cclm.mus_readin(gen._ptr)
 * 
 * cpdef is_readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a readin.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_489is_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_readin(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_readin", 1);

  /* "pysndlib/clm.pyx":4557
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_readin(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(mus_is_readin(__pyx_v_gen->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4550
 *     return cclm.mus_readin(gen._ptr)
 * 
 * cpdef is_readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a readin.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_489is_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_488is_readin, "\n    returns True if gen is a readin.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_489is_readin = {"is_readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_489is_readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_488is_readin};
static PyObject *__pyx_pw_8pysndlib_3clm_489is_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4550, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_readin") < 0)) __PYX_ERR(0, 4550, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_readin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4550, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4550, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_488is_readin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_488is_readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_readin(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_491make_src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_490make_src, "\n    return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the\n    ratio between the new rate and the old. 'width' is the sine width (effectively the steepness of the\n    low-pass filter), normally between 10 and 100. 'input' if given is an open file stream.\n    \n    :param inp: gen or function to read from. if a callback, the function takes 1 input, the direction and should return read value\n    :param srate: ratio between the old sampling rate and the new\n    :param width: how many samples to convolve with sinc function\n    :return: src gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_491make_src = {"make_src", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_491make_src, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_490make_src};
static PyObject *__pyx_pw_8pysndlib_3clm_491make_src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  double __pyx_v_srate;
  int __pyx_v_width;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_src (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,&__pyx_n_s_srate,&__pyx_n_s_width,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_srate);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_width);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_src") < 0)) __PYX_ERR(0, 4561, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    if (values[1]) {
      __pyx_v_srate = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_srate == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
    } else {
      __pyx_v_srate = ((double)((double)1.0));
    }
    if (values[2]) {
      __pyx_v_width = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
    } else {
      __pyx_v_width = ((int)((int)10));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_src", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4561, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_490make_src(__pyx_self, __pyx_v_inp, __pyx_v_srate, __pyx_v_width);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4589
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_8make_src_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_8make_src_1inp_f = {"inp_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_8make_src_1inp_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_8make_src_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inp_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_d,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4589, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4589, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, 1); __PYX_ERR(0, 4589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inp_f") < 0)) __PYX_ERR(0, 4589, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4589, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_src.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_8make_src_inp_f(__pyx_self, __pyx_v_gen, __pyx_v_d);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_8make_src_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inp_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4591
 *     @_inputcallback
 *     def inp_f(gen, d):
 *         return inp(d)             # <<<<<<<<<<<<<<
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_inp)) { __Pyx_RaiseClosureNameError("inp"); __PYX_ERR(0, 4591, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4589
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_src.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */

static PyObject *__pyx_pf_8pysndlib_3clm_490make_src(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, double __pyx_v_srate, int __pyx_v_width) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *__pyx_cur_scope;
  input_cb __pyx_v_cy_inp_f_ptr;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_res = NULL;
  PyObject *__pyx_v_inp_f = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_range __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_src", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_1_make_src(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4561, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_inp = __pyx_v_inp;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inp);

  /* "pysndlib/clm.pyx":4574
 *     """
 * 
 *     check_range('srate', srate, 0, None)             # <<<<<<<<<<<<<<
 *     check_range('width', width, 0, None)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_srate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_srate, __pyx_t_1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4575
 * 
 *     check_range('srate', srate, 0, None)
 *     check_range('width', width, 0, None)             # <<<<<<<<<<<<<<
 * 
 *     cdef cclm.input_cb cy_inp_f_ptr
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.low = __pyx_int_0;
  __pyx_t_3.high = Py_None;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_range(__pyx_n_u_width, __pyx_t_2, 0, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":4579
 *     cdef cclm.input_cb cy_inp_f_ptr
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>input_callback_func, srate, width, <void*>((<mus_any>inp)._ptr)))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_1, __pyx_ptype_8pysndlib_3clm_mus_any); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pysndlib/clm.pyx":4580
 * 
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>input_callback_func, srate, width, <void*>((<mus_any>inp)._ptr)))             # <<<<<<<<<<<<<<
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)
 */
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_src(((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func), __pyx_v_srate, __pyx_v_width, ((void *)((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_inp)->_ptr)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4581
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>input_callback_func, srate, width, <void*>((<mus_any>inp)._ptr)))
 *         res._inputcallback = <cclm.input_cb>input_callback_func             # <<<<<<<<<<<<<<
 *         res.cache_append(inp)
 *         return res
 */
    __pyx_v_res->_inputcallback = ((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func);

    /* "pysndlib/clm.pyx":4582
 *         res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>input_callback_func, srate, width, <void*>((<mus_any>inp)._ptr)))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_inp;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_res->__pyx_vtab)->cache_append(__pyx_v_res, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4583
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)
 *         return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_res);
    __pyx_r = ((PyObject *)__pyx_v_res);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4579
 *     cdef cclm.input_cb cy_inp_f_ptr
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>input_callback_func, srate, width, <void*>((<mus_any>inp)._ptr)))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  }

  /* "pysndlib/clm.pyx":4586
 * 
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_4);
  if (unlikely(__pyx_t_5)) {

    /* "pysndlib/clm.pyx":4587
 * 
 *     if not callable(inp):
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")             # <<<<<<<<<<<<<<
 * 
 *     @_inputcallback
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_inp)), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 4587, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4586
 * 
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  }

  /* "pysndlib/clm.pyx":4589
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_inputcallback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_8make_src_1inp_f, 0, __pyx_n_s_make_src_locals_inp_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_inp_f = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4593
 *         return inp(d)
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]             # <<<<<<<<<<<<<<
 *     res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>cy_inp_f_ptr, srate, width, NULL))
 *     res._inputcallback = cy_inp_f_ptr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_addressof); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_inp_f};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_cy_inp_f_ptr = (((input_cb *)((size_t)__pyx_t_9))[0]);

  /* "pysndlib/clm.pyx":4594
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>cy_inp_f_ptr, srate, width, NULL))             # <<<<<<<<<<<<<<
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_src(((input_cb)__pyx_v_cy_inp_f_ptr), __pyx_v_srate, __pyx_v_width, NULL), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4595
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>cy_inp_f_ptr, srate, width, NULL))
 *     res._inputcallback = cy_inp_f_ptr             # <<<<<<<<<<<<<<
 *     res.cache_append(inp_f)
 * 
 */
  __pyx_v_res->_inputcallback = __pyx_v_cy_inp_f_ptr;

  /* "pysndlib/clm.pyx":4596
 *     res = mus_any.from_ptr(cclm.mus_make_src(<cclm.input_cb>cy_inp_f_ptr, srate, width, NULL))
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)             # <<<<<<<<<<<<<<
 * 
 *     return res
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_res->__pyx_vtab)->cache_append(__pyx_v_res, __pyx_v_inp_f, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":4598
 *     res.cache_append(inp_f)
 * 
 *     return res             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=0.0):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_res);
  __pyx_r = ((PyObject *)__pyx_v_res);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_inp_f);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4600
 *     return res
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sampling rate conversion sample. 'pm' can be used to change the sampling rate on a
 */

static PyObject *__pyx_pw_8pysndlib_3clm_493src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_src(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_src *__pyx_optional_args) {
  double __pyx_v_sr_change = ((double)0.0);
  double __pyx_r;
  int __pyx_t_1;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sr_change = __pyx_optional_args->sr_change;
    }
  }

  /* "pysndlib/clm.pyx":4611
 *     :rtype: float
 *     """
 *     if gen._inputcallback:             # <<<<<<<<<<<<<<
 *         return cclm.mus_src(gen._ptr, sr_change, <cclm.input_cb>gen._inputcallback)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_gen->_inputcallback != 0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4612
 *     """
 *     if gen._inputcallback:
 *         return cclm.mus_src(gen._ptr, sr_change, <cclm.input_cb>gen._inputcallback)             # <<<<<<<<<<<<<<
 *     else:
 *         return 0.0
 */
    __pyx_r = mus_src(__pyx_v_gen->_ptr, __pyx_v_sr_change, ((input_cb)__pyx_v_gen->_inputcallback));
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4611
 *     :rtype: float
 *     """
 *     if gen._inputcallback:             # <<<<<<<<<<<<<<
 *         return cclm.mus_src(gen._ptr, sr_change, <cclm.input_cb>gen._inputcallback)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4614
 *         return cclm.mus_src(gen._ptr, sr_change, <cclm.input_cb>gen._inputcallback)
 *     else:
 *         return 0.0             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_src(mus_any gen):
 */
  /*else*/ {
    __pyx_r = 0.0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4600
 *     return res
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sampling rate conversion sample. 'pm' can be used to change the sampling rate on a
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_493src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_492src, "\n    next sampling rate conversion sample. 'pm' can be used to change the sampling rate on a\n    sample-by-sample basis. 'input-function' is a function of one argument (the current input direction,\n    normally ignored) that is called internally whenever a new sample of input data is needed.  if the\n    associated make_src included an 'input' argument, input-function is ignored.\n    \n    :param gen: src gen\n    :param sr_change: change \\in ratio\n    :rtype: float  \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_493src = {"src", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_493src, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_492src};
static PyObject *__pyx_pw_8pysndlib_3clm_493src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_sr_change;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("src (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_sr_change,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4600, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sr_change);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4600, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "src") < 0)) __PYX_ERR(0, 4600, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    if (values[1]) {
      __pyx_v_sr_change = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sr_change == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4600, __pyx_L3_error)
    } else {
      __pyx_v_sr_change = ((double)0.0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("src", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4600, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4600, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_492src(__pyx_self, __pyx_v_gen, __pyx_v_sr_change);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_492src(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_sr_change) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_src __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("src", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.sr_change = __pyx_v_sr_change;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_src(__pyx_v_gen, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4600, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4616
 *         return 0.0
 * 
 * cpdef bint is_src(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a src.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_495is_src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_src(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4623
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_src(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_src(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4616
 *         return 0.0
 * 
 * cpdef bint is_src(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a src.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_495is_src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_494is_src, "\n    returns True if gen is a src.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_495is_src = {"is_src", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_495is_src, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_494is_src};
static PyObject *__pyx_pw_8pysndlib_3clm_495is_src(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_src (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4616, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_src") < 0)) __PYX_ERR(0, 4616, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_src", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4616, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4616, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_494is_src(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_494is_src(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_src", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_src(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4616, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_src", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_497make_convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_496make_convolve, "\n    return a new convolution generator which convolves its input with the impulse response 'filter'.\n    \n    :param inp: gen or function to read from\n    :param filt: np.array of filter \n    :param fft_size: fft size used \\in the convolution\n    :param filter_size: how much of filter to use. if None use whole filter\n    :return: convolve gen\n    :rtype: mus_any\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_497make_convolve = {"make_convolve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_497make_convolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_496make_convolve};
static PyObject *__pyx_pw_8pysndlib_3clm_497make_convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_filt = 0;
  long __pyx_v_fft_size;
  PyObject *__pyx_v_filter_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_convolve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,&__pyx_n_s_filt,&__pyx_n_s_fft_size,&__pyx_n_s_filter_size,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4628, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filt)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4628, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_convolve", 0, 2, 4, 1); __PYX_ERR(0, 4628, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4628, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_size);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4628, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_convolve") < 0)) __PYX_ERR(0, 4628, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_filt = values[1];
    if (values[2]) {
      __pyx_v_fft_size = __Pyx_PyInt_As_long(values[2]); if (unlikely((__pyx_v_fft_size == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4628, __pyx_L3_error)
    } else {
      __pyx_v_fft_size = ((long)((long)0x200));
    }
    __pyx_v_filter_size = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_convolve", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 4628, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_496make_convolve(__pyx_self, __pyx_v_inp, __pyx_v_filt, __pyx_v_fft_size, __pyx_v_filter_size);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4682
 * 
 *     #if isinstance(inp,types.FunctionType):
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_13make_convolve_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_13make_convolve_1inp_f = {"inp_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13make_convolve_1inp_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_13make_convolve_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inp_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_d,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4682, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4682, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, 1); __PYX_ERR(0, 4682, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inp_f") < 0)) __PYX_ERR(0, 4682, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4682, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_convolve.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_13make_convolve_inp_f(__pyx_self, __pyx_v_gen, __pyx_v_d);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_13make_convolve_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inp_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4684
 *     @_inputcallback
 *     def inp_f(gen, d):
 *         return inp(d)             # <<<<<<<<<<<<<<
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_inp)) { __Pyx_RaiseClosureNameError("inp"); __PYX_ERR(0, 4684, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4682
 * 
 *     #if isinstance(inp,types.FunctionType):
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_convolve.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */

static PyObject *__pyx_pf_8pysndlib_3clm_496make_convolve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_filt, long __pyx_v_fft_size, PyObject *__pyx_v_filter_size) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *__pyx_cur_scope;
  __Pyx_memviewslice __pyx_v_filt_view = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_fft_len = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_res = NULL;
  PyObject *__pyx_v_inp_f = 0;
  input_cb __pyx_v_cy_inp_f_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_11;
  mus_long_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  size_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_convolve", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4628, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_inp = __pyx_v_inp;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inp);
  __Pyx_INCREF(__pyx_v_filt);
  __Pyx_INCREF(__pyx_v_filter_size);

  /* "pysndlib/clm.pyx":4645
 * 
 * 
 *     if filter_size is None:             # <<<<<<<<<<<<<<
 *         filter_size = get_length(filt)
 * 
 */
  __pyx_t_1 = (__pyx_v_filter_size == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4646
 * 
 *     if filter_size is None:
 *         filter_size = get_length(filt)             # <<<<<<<<<<<<<<
 * 
 *     fft_len = 0
 */
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_length(__pyx_v_filt, 0); if (unlikely(__pyx_t_2 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4646, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_filter_size, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":4645
 * 
 * 
 *     if filter_size is None:             # <<<<<<<<<<<<<<
 *         filter_size = get_length(filt)
 * 
 */
  }

  /* "pysndlib/clm.pyx":4648
 *         filter_size = get_length(filt)
 * 
 *     fft_len = 0             # <<<<<<<<<<<<<<
 * 
 *     if fft_size < 0 or fft_size == 0:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_fft_len = __pyx_int_0;

  /* "pysndlib/clm.pyx":4650
 *     fft_len = 0
 * 
 *     if fft_size < 0 or fft_size == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be a positive number greater than 0 not {fft_size}')
 * 
 */
  __pyx_t_4 = (__pyx_v_fft_size < 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_fft_size == 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":4651
 * 
 *     if fft_size < 0 or fft_size == 0:
 *         raise ValueError(f'fft_size must be a positive number greater than 0 not {fft_size}')             # <<<<<<<<<<<<<<
 * 
 *     if fft_size > csndlib.mus_max_malloc():
 */
    __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_fft_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fft_size_must_be_a_positive_numb, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4651, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4650
 *     fft_len = 0
 * 
 *     if fft_size < 0 or fft_size == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be a positive number greater than 0 not {fft_size}')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4653
 *         raise ValueError(f'fft_size must be a positive number greater than 0 not {fft_size}')
 * 
 *     if fft_size > csndlib.mus_max_malloc():             # <<<<<<<<<<<<<<
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 */
  __pyx_t_1 = (__pyx_v_fft_size > mus_max_malloc());
  if (unlikely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":4654
 * 
 *     if fft_size > csndlib.mus_max_malloc():
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')             # <<<<<<<<<<<<<<
 * 
 *     if is_power_of_2(filter_size):
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_fft_size_too_large_cannot_alloca);
    __pyx_t_6 += 36;
    __Pyx_GIVEREF(__pyx_kp_u_fft_size_too_large_cannot_alloca);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_fft_size_too_large_cannot_alloca);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_fft_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_size_fft);
    __pyx_t_6 += 9;
    __Pyx_GIVEREF(__pyx_kp_u_size_fft);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_size_fft);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4654, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4653
 *         raise ValueError(f'fft_size must be a positive number greater than 0 not {fft_size}')
 * 
 *     if fft_size > csndlib.mus_max_malloc():             # <<<<<<<<<<<<<<
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4656
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 *     if is_power_of_2(filter_size):             # <<<<<<<<<<<<<<
 *         fft_len = filter_size * 2
 *     else :
 */
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_is_power_of_2(__pyx_v_filter_size, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4657
 * 
 *     if is_power_of_2(filter_size):
 *         fft_len = filter_size * 2             # <<<<<<<<<<<<<<
 *     else :
 *         fft_len = next_power_of_2(filter_size)
 */
    __pyx_t_3 = __Pyx_PyInt_MultiplyObjC(__pyx_v_filter_size, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_fft_len, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":4656
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 *     if is_power_of_2(filter_size):             # <<<<<<<<<<<<<<
 *         fft_len = filter_size * 2
 *     else :
 */
    goto __pyx_L8;
  }

  /* "pysndlib/clm.pyx":4659
 *         fft_len = filter_size * 2
 *     else :
 *         fft_len = next_power_of_2(filter_size)             # <<<<<<<<<<<<<<
 * 
 *     if fft_size < fft_len:
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_8pysndlib_3clm_next_power_of_2(__pyx_v_filter_size, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_fft_len, __pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L8:;

  /* "pysndlib/clm.pyx":4661
 *         fft_len = next_power_of_2(filter_size)
 * 
 *     if fft_size < fft_len:             # <<<<<<<<<<<<<<
 *         fft_size = fft_len
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_fft_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_fft_len, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4662
 * 
 *     if fft_size < fft_len:
 *         fft_size = fft_len             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(filt, list):
 */
    __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_v_fft_len); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4662, __pyx_L1_error)
    __pyx_v_fft_size = __pyx_t_2;

    /* "pysndlib/clm.pyx":4661
 *         fft_len = next_power_of_2(filter_size)
 * 
 *     if fft_size < fft_len:             # <<<<<<<<<<<<<<
 *         fft_size = fft_len
 * 
 */
  }

  /* "pysndlib/clm.pyx":4664
 *         fft_size = fft_len
 * 
 *     if isinstance(filt, list):             # <<<<<<<<<<<<<<
 *         filt = np.array(filt)
 * 
 */
  __pyx_t_1 = PyList_Check(__pyx_v_filt); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4665
 * 
 *     if isinstance(filt, list):
 *         filt = np.array(filt)             # <<<<<<<<<<<<<<
 * 
 *     check_ndim(filt)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filt};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_filt, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":4664
 *         fft_size = fft_len
 * 
 *     if isinstance(filt, list):             # <<<<<<<<<<<<<<
 *         filt = np.array(filt)
 * 
 */
  }

  /* "pysndlib/clm.pyx":4667
 *         filt = np.array(filt)
 * 
 *     check_ndim(filt)             # <<<<<<<<<<<<<<
 * 
 *     filt_view = filt
 */
  __pyx_t_5 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_filt, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":4669
 *     check_ndim(filt)
 * 
 *     filt_view = filt             # <<<<<<<<<<<<<<
 * 
 *     if(isinstance(inp, mus_any)):
 */
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_filt, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 4669, __pyx_L1_error)
  __pyx_v_filt_view = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;

  /* "pysndlib/clm.pyx":4671
 *     filt_view = filt
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_convolve(<cclm.input_cb>input_callback_func, &filt_view[0], fft_size, filter_size, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_5, __pyx_ptype_8pysndlib_3clm_mus_any); 
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4672
 * 
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_convolve(<cclm.input_cb>input_callback_func, &filt_view[0], fft_size, filter_size, <void*>(<mus_any>inp)._ptr))             # <<<<<<<<<<<<<<
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(filt)
 */
    __pyx_t_11 = 0;
    __pyx_t_9 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_v_filt_view.shape[0];
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_v_filt_view.shape[0])) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      __PYX_ERR(0, 4672, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_filter_size); if (unlikely((__pyx_t_12 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4672, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_convolve(((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func), (&(*((double *) ( /* dim=0 */ (__pyx_v_filt_view.data + __pyx_t_11 * __pyx_v_filt_view.strides[0]) )))), __pyx_v_fft_size, __pyx_t_12, ((void *)((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_inp)->_ptr)), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":4673
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_convolve(<cclm.input_cb>input_callback_func, &filt_view[0], fft_size, filter_size, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func             # <<<<<<<<<<<<<<
 *         res.cache_append(filt)
 *         res.cache_append(inp)
 */
    __pyx_v_res->_inputcallback = ((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func);

    /* "pysndlib/clm.pyx":4674
 *         res = mus_any.from_ptr(cclm.mus_make_convolve(<cclm.input_cb>input_callback_func, &filt_view[0], fft_size, filter_size, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(filt)             # <<<<<<<<<<<<<<
 *         res.cache_append(inp)
 *         return res
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_res->__pyx_vtab)->cache_append(__pyx_v_res, __pyx_v_filt, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pysndlib/clm.pyx":4675
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(filt)
 *         res.cache_append(inp)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_inp;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_8 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_res->__pyx_vtab)->cache_append(__pyx_v_res, __pyx_t_5, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":4676
 *         res.cache_append(filt)
 *         res.cache_append(inp)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     if not callable(inp):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_res);
    __pyx_r = ((PyObject *)__pyx_v_res);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4671
 *     filt_view = filt
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_convolve(<cclm.input_cb>input_callback_func, &filt_view[0], fft_size, filter_size, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  }

  /* "pysndlib/clm.pyx":4678
 *         return res
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  __pyx_t_8 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = (!__pyx_t_1);
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":4679
 * 
 *     if not callable(inp):
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")             # <<<<<<<<<<<<<<
 * 
 *     #if isinstance(inp,types.FunctionType):
 */
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_inp)), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(0, 4679, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4678
 *         return res
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  }

  /* "pysndlib/clm.pyx":4682
 * 
 *     #if isinstance(inp,types.FunctionType):
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inputcallback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_13make_convolve_1inp_f, 0, __pyx_n_s_make_convolve_locals_inp_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_3};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_inp_f = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":4686
 *         return inp(d)
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]             # <<<<<<<<<<<<<<
 *     res = mus_any.from_ptr(cclm.mus_make_convolve(cy_inp_f_ptr, &filt_view[0], fft_size, filter_size, NULL))
 *     res._inputcallback = cy_inp_f_ptr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_addressof); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_inp_f};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_cy_inp_f_ptr = (((input_cb *)((size_t)__pyx_t_14))[0]);

  /* "pysndlib/clm.pyx":4687
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_convolve(cy_inp_f_ptr, &filt_view[0], fft_size, filter_size, NULL))             # <<<<<<<<<<<<<<
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)
 */
  __pyx_t_11 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_11 < 0) {
    __pyx_t_11 += __pyx_v_filt_view.shape[0];
    if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_11 >= __pyx_v_filt_view.shape[0])) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    __PYX_ERR(0, 4687, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_filter_size); if (unlikely((__pyx_t_12 == ((mus_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4687, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_convolve(__pyx_v_cy_inp_f_ptr, (&(*((double *) ( /* dim=0 */ (__pyx_v_filt_view.data + __pyx_t_11 * __pyx_v_filt_view.strides[0]) )))), __pyx_v_fft_size, __pyx_t_12, NULL), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":4688
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_convolve(cy_inp_f_ptr, &filt_view[0], fft_size, filter_size, NULL))
 *     res._inputcallback = cy_inp_f_ptr             # <<<<<<<<<<<<<<
 *     res.cache_append(inp_f)
 * 
 */
  __pyx_v_res->_inputcallback = __pyx_v_cy_inp_f_ptr;

  /* "pysndlib/clm.pyx":4689
 *     res = mus_any.from_ptr(cclm.mus_make_convolve(cy_inp_f_ptr, &filt_view[0], fft_size, filter_size, NULL))
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)             # <<<<<<<<<<<<<<
 * 
 *     return res
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_v_res->__pyx_vtab)->cache_append(__pyx_v_res, __pyx_v_inp_f, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pysndlib/clm.pyx":4691
 *     res.cache_append(inp_f)
 * 
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_res);
  __pyx_r = ((PyObject *)__pyx_v_res);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pysndlib.clm.make_convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_filt_view, 1);
  __Pyx_XDECREF(__pyx_v_fft_len);
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_inp_f);
  __Pyx_XDECREF(__pyx_v_filt);
  __Pyx_XDECREF(__pyx_v_filter_size);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4694
 * 
 * 
 * cpdef cython.double convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from convolution generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_499convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_convolve(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":4701
 *     :rtype: float
 *     """
 *     return cclm.mus_convolve(gen._ptr, gen._inputcallback)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_convolve(mus_any gen):
 */
  __pyx_r = mus_convolve(__pyx_v_gen->_ptr, __pyx_v_gen->_inputcallback);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4694
 * 
 * 
 * cpdef cython.double convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from convolution generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_499convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_498convolve, "\n    next sample from convolution generator.\n    \n    :param gen: convolve gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_499convolve = {"convolve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_499convolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_498convolve};
static PyObject *__pyx_pw_8pysndlib_3clm_499convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convolve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4694, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convolve") < 0)) __PYX_ERR(0, 4694, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convolve", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4694, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4694, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_498convolve(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_498convolve(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convolve", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_convolve(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4694, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4703
 *     return cclm.mus_convolve(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a convolve.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_501is_convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_convolve(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4710
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_convolve(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_convolve(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4703
 *     return cclm.mus_convolve(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a convolve.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_501is_convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_500is_convolve, "\n    returns True if gen is a convolve.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_501is_convolve = {"is_convolve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_501is_convolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_500is_convolve};
static PyObject *__pyx_pw_8pysndlib_3clm_501is_convolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_convolve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4703, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_convolve") < 0)) __PYX_ERR(0, 4703, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_convolve", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4703, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4703, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_500is_convolve(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_500is_convolve(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_convolve", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_convolve(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4703, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_convolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_503make_granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_502make_granulate, "\n    return a new granular synthesis generator.  'length' is the grain length (seconds), 'expansion' is the\n    ratio \\in timing between the new and old (expansion > 1.0 slows things down), 'scaler' scales the grains\n    to avoid overflows, 'hop' is the spacing (seconds) between successive grains upon output. 'jitter'\n    controls the randomness \\in that spacing, 'input' can be a file pointer. 'edit' can be a function of one\n    arg, the current granulate generator.  it is called just before a grain is added into the output\n    buffer. the current grain is accessible via mus_data. the edit function, if any, should return the\n    length \\in samples of the grain, or 0.\n    \n    :param inp: gen or function to read from. if a callback, the function takes 1 input, the direction and should return read value\n    :param expansion: how much to lengthen or compress the file\n    :param length: length of file slices that are overlapped\n    :param scaler: amplitude scaler on slices (to avoid overflows)\n    :param hop: speed at which slices are repeated \\in output\n    :param ramp: amount of slice-time spent ramping up/down\n    :param jitter: affects spacing of successive grains\n    :param max_size: internal buffer size\n    :param edit: grain editing function. the function should take one argument, the granulate mus_any and return length of grain or 0\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_503make_granulate = {"make_granulate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_503make_granulate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_502make_granulate};
static PyObject *__pyx_pw_8pysndlib_3clm_503make_granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_expansion = 0;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_scaler = 0;
  PyObject *__pyx_v_hop = 0;
  PyObject *__pyx_v_ramp = 0;
  PyObject *__pyx_v_jitter = 0;
  PyObject *__pyx_v_max_size = 0;
  PyObject *__pyx_v_edit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_granulate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,&__pyx_n_s_expansion,&__pyx_n_s_length,&__pyx_n_s_scaler,&__pyx_n_s_hop,&__pyx_n_s_ramp,&__pyx_n_s_jitter,&__pyx_n_s_max_size,&__pyx_n_s_edit,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_1_0)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float__15)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float__6)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float__05)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float__4)));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_0_0)));
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0)));

    /* "pysndlib/clm.pyx":4722
 *                     jitter: Optional[float]=0.0,
 *                     max_size: Optional[int]=0,
 *                     edit=None):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
    values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_expansion);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scaler);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hop);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ramp);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_jitter);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_size);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_edit);
          if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4714, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_granulate") < 0)) __PYX_ERR(0, 4714, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_expansion = values[1];
    __pyx_v_length = values[2];
    __pyx_v_scaler = values[3];
    __pyx_v_hop = values[4];
    __pyx_v_ramp = values[5];
    __pyx_v_jitter = values[6];
    __pyx_v_max_size = values[7];
    __pyx_v_edit = values[8];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_granulate", 0, 1, 9, __pyx_nargs); __PYX_ERR(0, 4714, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_502make_granulate(__pyx_self, __pyx_v_inp, __pyx_v_expansion, __pyx_v_length, __pyx_v_scaler, __pyx_v_hop, __pyx_v_ramp, __pyx_v_jitter, __pyx_v_max_size, __pyx_v_edit);

  /* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4757
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_14make_granulate_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_14make_granulate_1inp_f = {"inp_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_14make_granulate_1inp_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_14make_granulate_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inp_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_d,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4757, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4757, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, 1); __PYX_ERR(0, 4757, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inp_f") < 0)) __PYX_ERR(0, 4757, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4757, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_granulate.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_14make_granulate_inp_f(__pyx_self, __pyx_v_gen, __pyx_v_d);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_14make_granulate_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inp_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4759
 *     @_inputcallback
 *     def inp_f(gen, d):
 *         return inp(d)             # <<<<<<<<<<<<<<
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_inp)) { __Pyx_RaiseClosureNameError("inp"); __PYX_ERR(0, 4759, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4757
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_granulate.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4769
 *         return res
 * 
 *     @_editcallback             # <<<<<<<<<<<<<<
 *     def edit_f(gen):
 *         return edit(res)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_14make_granulate_3edit_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_14make_granulate_3edit_f = {"edit_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_14make_granulate_3edit_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_14make_granulate_3edit_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("edit_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4769, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "edit_f") < 0)) __PYX_ERR(0, 4769, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("edit_f", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4769, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_granulate.edit_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_14make_granulate_2edit_f(__pyx_self, __pyx_v_gen);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_14make_granulate_2edit_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edit_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4771
 *     @_editcallback
 *     def edit_f(gen):
 *         return edit(res)             # <<<<<<<<<<<<<<
 * 
 *     cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_edit)) { __Pyx_RaiseClosureNameError("edit"); __PYX_ERR(0, 4771, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_res)) { __Pyx_RaiseClosureNameError("res"); __PYX_ERR(0, 4771, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_edit);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_edit; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_res)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4769
 *         return res
 * 
 *     @_editcallback             # <<<<<<<<<<<<<<
 *     def edit_f(gen):
 *         return edit(res)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_granulate.edit_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */

static PyObject *__pyx_pf_8pysndlib_3clm_502make_granulate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_expansion, PyObject *__pyx_v_length, PyObject *__pyx_v_scaler, PyObject *__pyx_v_hop, PyObject *__pyx_v_ramp, PyObject *__pyx_v_jitter, PyObject *__pyx_v_max_size, PyObject *__pyx_v_edit) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_cur_scope;
  edit_cb __pyx_v_cy_edit_f_ptr;
  PyObject *__pyx_v_inp_f = 0;
  input_cb __pyx_v_cy_inp_f_ptr;
  PyObject *__pyx_v_edit_f = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  mus_float_t __pyx_t_4;
  mus_float_t __pyx_t_5;
  mus_float_t __pyx_t_6;
  mus_float_t __pyx_t_7;
  mus_float_t __pyx_t_8;
  mus_float_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  size_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_granulate", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4714, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_inp = __pyx_v_inp;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_cur_scope->__pyx_v_edit = __pyx_v_edit;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_edit);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_edit);

  /* "pysndlib/clm.pyx":4748
 *     cdef cclm.edit_cb cy_edit_f_ptr
 * 
 *     if(isinstance(inp, mus_any) and edit is None):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>input_callback_func, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_ptype_8pysndlib_3clm_mus_any); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_cur_scope->__pyx_v_edit == Py_None);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4749
 * 
 *     if(isinstance(inp, mus_any) and edit is None):
 *         res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>input_callback_func, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))             # <<<<<<<<<<<<<<
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)
 */
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_expansion); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_length); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_scaler); if (unlikely((__pyx_t_6 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_hop); if (unlikely((__pyx_t_7 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_ramp); if (unlikely((__pyx_t_8 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_jitter); if (unlikely((__pyx_t_9 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_granulate(((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func), __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, NULL, ((void *)((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_inp)->_ptr)), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4750
 *     if(isinstance(inp, mus_any) and edit is None):
 *         res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>input_callback_func, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func             # <<<<<<<<<<<<<<
 *         res.cache_append(inp)
 *         return res
 */
    __pyx_cur_scope->__pyx_v_res->_inputcallback = ((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func);

    /* "pysndlib/clm.pyx":4751
 *         res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>input_callback_func, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_11 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_t_2, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "pysndlib/clm.pyx":4752
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     if not callable(inp):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_res);
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_res);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4748
 *     cdef cclm.edit_cb cy_edit_f_ptr
 * 
 *     if(isinstance(inp, mus_any) and edit is None):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>input_callback_func, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  }

  /* "pysndlib/clm.pyx":4754
 *         return res
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  __pyx_t_11 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_t_11); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_3 = (!__pyx_t_1);
  if (unlikely(__pyx_t_3)) {

    /* "pysndlib/clm.pyx":4755
 * 
 *     if not callable(inp):
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")             # <<<<<<<<<<<<<<
 * 
 *     @_inputcallback
 */
    __pyx_t_11 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_inp)), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_11, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __PYX_ERR(0, 4755, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4754
 *         return res
 * 
 *     if not callable(inp):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 */
  }

  /* "pysndlib/clm.pyx":4757
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inputcallback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_14make_granulate_1inp_f, 0, __pyx_n_s_make_granulate_locals_inp_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_inp_f = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "pysndlib/clm.pyx":4761
 *         return inp(d)
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]             # <<<<<<<<<<<<<<
 *     res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>cy_inp_f_ptr, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *     res._inputcallback = cy_inp_f_ptr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_addressof); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_inp_f};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_t_11); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_cy_inp_f_ptr = (((input_cb *)((size_t)__pyx_t_14))[0]);

  /* "pysndlib/clm.pyx":4762
 * 
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>cy_inp_f_ptr, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))             # <<<<<<<<<<<<<<
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)
 */
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_expansion); if (unlikely((__pyx_t_9 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_length); if (unlikely((__pyx_t_8 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_scaler); if (unlikely((__pyx_t_7 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_hop); if (unlikely((__pyx_t_6 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ramp); if (unlikely((__pyx_t_5 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_jitter); if (unlikely((__pyx_t_4 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_max_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_t_11 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_granulate(((input_cb)__pyx_v_cy_inp_f_ptr), __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_10, NULL, ((void *)((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_inp)->_ptr)), NULL)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_cur_scope->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pysndlib/clm.pyx":4763
 *     cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *     res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>cy_inp_f_ptr, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *     res._inputcallback = cy_inp_f_ptr             # <<<<<<<<<<<<<<
 *     res.cache_append(inp_f)
 * 
 */
  __pyx_cur_scope->__pyx_v_res->_inputcallback = __pyx_v_cy_inp_f_ptr;

  /* "pysndlib/clm.pyx":4764
 *     res = mus_any.from_ptr(cclm.mus_make_granulate(<cclm.input_cb>cy_inp_f_ptr, expansion, length, scaler, hop, ramp, jitter, max_size, NULL, <void*>(<mus_any>inp)._ptr))
 *     res._inputcallback = cy_inp_f_ptr
 *     res.cache_append(inp_f)             # <<<<<<<<<<<<<<
 * 
 *     if(edit is None):
 */
  __pyx_t_11 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_inp_f, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pysndlib/clm.pyx":4766
 *     res.cache_append(inp_f)
 * 
 *     if(edit is None):             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_t_3 = (__pyx_cur_scope->__pyx_v_edit == Py_None);
  if (__pyx_t_3) {

    /* "pysndlib/clm.pyx":4767
 * 
 *     if(edit is None):
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     @_editcallback
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_res);
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_res);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4766
 *     res.cache_append(inp_f)
 * 
 *     if(edit is None):             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  }

  /* "pysndlib/clm.pyx":4769
 *         return res
 * 
 *     @_editcallback             # <<<<<<<<<<<<<<
 *     def edit_f(gen):
 *         return edit(res)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_editcallback); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_14make_granulate_3edit_f, 0, __pyx_n_s_make_granulate_locals_edit_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_2};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_v_edit_f = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "pysndlib/clm.pyx":4773
 *         return edit(res)
 * 
 *     cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]             # <<<<<<<<<<<<<<
 *     cclm.mus_granulate_set_edit_function(res._ptr, cy_edit_f_ptr)
 *     res._editcallback  = cy_edit_f_ptr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_addressof); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_edit_f};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_t_11); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_cy_edit_f_ptr = (((edit_cb *)((size_t)__pyx_t_14))[0]);

  /* "pysndlib/clm.pyx":4774
 * 
 *     cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 *     cclm.mus_granulate_set_edit_function(res._ptr, cy_edit_f_ptr)             # <<<<<<<<<<<<<<
 *     res._editcallback  = cy_edit_f_ptr
 *     cclm.mus_set_environ(res._ptr, <void*>res)
 */
  mus_granulate_set_edit_function(__pyx_cur_scope->__pyx_v_res->_ptr, __pyx_v_cy_edit_f_ptr);

  /* "pysndlib/clm.pyx":4775
 *     cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 *     cclm.mus_granulate_set_edit_function(res._ptr, cy_edit_f_ptr)
 *     res._editcallback  = cy_edit_f_ptr             # <<<<<<<<<<<<<<
 *     cclm.mus_set_environ(res._ptr, <void*>res)
 *     res.cache_append(edit_f)
 */
  __pyx_cur_scope->__pyx_v_res->_editcallback = __pyx_v_cy_edit_f_ptr;

  /* "pysndlib/clm.pyx":4776
 *     cclm.mus_granulate_set_edit_function(res._ptr, cy_edit_f_ptr)
 *     res._editcallback  = cy_edit_f_ptr
 *     cclm.mus_set_environ(res._ptr, <void*>res)             # <<<<<<<<<<<<<<
 *     res.cache_append(edit_f)
 * 
 */
  (void)(mus_set_environ(__pyx_cur_scope->__pyx_v_res->_ptr, ((void *)__pyx_cur_scope->__pyx_v_res)));

  /* "pysndlib/clm.pyx":4777
 *     res._editcallback  = cy_edit_f_ptr
 *     cclm.mus_set_environ(res._ptr, <void*>res)
 *     res.cache_append(edit_f)             # <<<<<<<<<<<<<<
 * 
 *     return res
 */
  __pyx_t_11 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_edit_f, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pysndlib/clm.pyx":4779
 *     res.cache_append(edit_f)
 * 
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_res);
  __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_res);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pysndlib.clm.make_granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inp_f);
  __Pyx_XDECREF(__pyx_v_edit_f);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4784
 * 
 * #todo: mus_granulate_grain_max_length
 * cpdef cython.double granulate(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from granular synthesis generator.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_505granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_granulate(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  int __pyx_t_1;

  /* "pysndlib/clm.pyx":4792
 * 
 *     """
 *     if gen._editcallback:             # <<<<<<<<<<<<<<
 *         return cclm.mus_granulate_with_editor(gen._ptr, <cclm.input_cb>gen._inputcallback, <cclm.edit_cb>gen._editcallback)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_gen->_editcallback != 0);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4793
 *     """
 *     if gen._editcallback:
 *         return cclm.mus_granulate_with_editor(gen._ptr, <cclm.input_cb>gen._inputcallback, <cclm.edit_cb>gen._editcallback)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_granulate(gen._ptr, <cclm.input_cb>gen._inputcallback)
 */
    __pyx_r = mus_granulate_with_editor(__pyx_v_gen->_ptr, ((input_cb)__pyx_v_gen->_inputcallback), ((edit_cb)__pyx_v_gen->_editcallback));
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4792
 * 
 *     """
 *     if gen._editcallback:             # <<<<<<<<<<<<<<
 *         return cclm.mus_granulate_with_editor(gen._ptr, <cclm.input_cb>gen._inputcallback, <cclm.edit_cb>gen._editcallback)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4795
 *         return cclm.mus_granulate_with_editor(gen._ptr, <cclm.input_cb>gen._inputcallback, <cclm.edit_cb>gen._editcallback)
 *     else:
 *         return cclm.mus_granulate(gen._ptr, <cclm.input_cb>gen._inputcallback)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_r = mus_granulate(__pyx_v_gen->_ptr, ((input_cb)__pyx_v_gen->_inputcallback));
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4784
 * 
 * #todo: mus_granulate_grain_max_length
 * cpdef cython.double granulate(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from granular synthesis generator.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_505granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_504granulate, "\n    next sample from granular synthesis generator.\n    \n    :param gen: granulate gen\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_505granulate = {"granulate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_505granulate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_504granulate};
static PyObject *__pyx_pw_8pysndlib_3clm_505granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("granulate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4784, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "granulate") < 0)) __PYX_ERR(0, 4784, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("granulate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4784, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4784, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_504granulate(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_504granulate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("granulate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_granulate(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4784, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4798
 * 
 * 
 * cpdef bint is_granulate(mus_any e):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a granulate.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_507is_granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_granulate(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4805
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_granulate(e._ptr)             # <<<<<<<<<<<<<<
 * 
 * #--------------- phase-vocoder ----------------#
 */
  __pyx_r = mus_is_granulate(__pyx_v_e->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4798
 * 
 * 
 * cpdef bint is_granulate(mus_any e):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a granulate.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_507is_granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_506is_granulate, "\n    returns True if gen is a granulate.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_507is_granulate = {"is_granulate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_507is_granulate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_506is_granulate};
static PyObject *__pyx_pw_8pysndlib_3clm_507is_granulate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_granulate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_e,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_e)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4798, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_granulate") < 0)) __PYX_ERR(0, 4798, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_e = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_granulate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4798, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_e), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "e", 0))) __PYX_ERR(0, 4798, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_506is_granulate(__pyx_self, __pyx_v_e);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_506is_granulate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_granulate", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_granulate(__pyx_v_e, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4798, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_granulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_509make_phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_508make_phase_vocoder, "\n    return a new phase-vocoder generator; input is the input function (it can be set at run-time),\n    analyze, edit, and synthesize are either None or functions that replace the default innards of the\n    generator, fft_size, overlap and interp set the fft_size, the amount of overlap between ffts, and the\n    time between new analysis calls. 'analyze', if given, takes 2 args, the generator and the input\n    function; if it returns True, the default analysis code is also called.  'edit', if given, takes 1 arg,\n    the generator; if it returns True, the default edit code is run.  'synthesize' is a function of 1 arg,\n    the generator; it is called to get the current vocoder output.\n    \n    :param inp: gen or function to read from. if a callback, the function takes 1 input, the direction and should return read value\n    :param fft_size: fft size used\n    :param overlap: how many analysis stages overlap\n    :param interp: samples between fft\n    :param pitch: pitch scaling ratio\n    :param analyze: if used, overrides default. should be a function of two arguments, the generator and the input function. \n    :param edit: if used, overrides default. functions of one argument, the phase_vocoder mus_any. change amplitudes and phases\n    :param synthesize: if used, overrides default. unctions of one argument, the phase_vocoder mus_any.\n    :return: phase_vocoder gen\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_509make_phase_vocoder = {"make_phase_vocoder", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_509make_phase_vocoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_508make_phase_vocoder};
static PyObject *__pyx_pw_8pysndlib_3clm_509make_phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_fft_size = 0;
  PyObject *__pyx_v_overlap = 0;
  PyObject *__pyx_v_interp = 0;
  PyObject *__pyx_v_pitch = 0;
  PyObject *__pyx_v_analyze = 0;
  PyObject *__pyx_v_edit = 0;
  PyObject *__pyx_v_synthesize = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_phase_vocoder (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,&__pyx_n_s_fft_size,&__pyx_n_s_overlap,&__pyx_n_s_interp,&__pyx_n_s_pitch,&__pyx_n_s_analyze,&__pyx_n_s_edit,&__pyx_n_s_synthesize,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_512)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_4)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_128)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_1_0)));

    /* "pysndlib/clm.pyx":4813
 *                         interp: Optional[int]=128,
 *                         pitch: Optional[float]=1.0,
 *                         analyze=None,             # <<<<<<<<<<<<<<
 *                         edit=None,
 *                         synthesize=None):
 */
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":4814
 *                         pitch: Optional[float]=1.0,
 *                         analyze=None,
 *                         edit=None,             # <<<<<<<<<<<<<<
 *                         synthesize=None):
 * 
 */
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "pysndlib/clm.pyx":4815
 *                         analyze=None,
 *                         edit=None,
 *                         synthesize=None):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fft_size);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_overlap);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pitch);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_analyze);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_edit);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_synthesize);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4808, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_phase_vocoder") < 0)) __PYX_ERR(0, 4808, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_fft_size = values[1];
    __pyx_v_overlap = values[2];
    __pyx_v_interp = values[3];
    __pyx_v_pitch = values[4];
    __pyx_v_analyze = values[5];
    __pyx_v_edit = values[6];
    __pyx_v_synthesize = values[7];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_phase_vocoder", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 4808, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_508make_phase_vocoder(__pyx_self, __pyx_v_inp, __pyx_v_fft_size, __pyx_v_overlap, __pyx_v_interp, __pyx_v_pitch, __pyx_v_analyze, __pyx_v_edit, __pyx_v_synthesize);

  /* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4859
 * 
 *     elif callable(inp):
 *         @_inputcallback             # <<<<<<<<<<<<<<
 *         def inp_f(gen, d):
 *             return inp(d)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_1inp_f = {"inp_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_1inp_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_1inp_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inp_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_d,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4859, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4859, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, 1); __PYX_ERR(0, 4859, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inp_f") < 0)) __PYX_ERR(0, 4859, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inp_f", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4859, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_18make_phase_vocoder_inp_f(__pyx_self, __pyx_v_gen, __pyx_v_d);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_inp_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, PyObject *__pyx_v_d) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inp_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4861
 *         @_inputcallback
 *         def inp_f(gen, d):
 *             return inp(d)             # <<<<<<<<<<<<<<
 *         cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(cy_inp_f_ptr, fft_size, overlap, interp, pitch, NULL, NULL, NULL, NULL))
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_inp)) { __Pyx_RaiseClosureNameError("inp"); __PYX_ERR(0, 4861, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_inp; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4859
 * 
 *     elif callable(inp):
 *         @_inputcallback             # <<<<<<<<<<<<<<
 *         def inp_f(gen, d):
 *             return inp(d)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.inp_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4871
 * 
 *     if(edit is not None):
 *         @_editcallback             # <<<<<<<<<<<<<<
 *         def edit_f(gen):
 *             return edit(res)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_3edit_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_3edit_f = {"edit_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_3edit_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_3edit_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("edit_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4871, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "edit_f") < 0)) __PYX_ERR(0, 4871, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("edit_f", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4871, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.edit_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_18make_phase_vocoder_2edit_f(__pyx_self, __pyx_v_gen);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_2edit_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edit_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4873
 *         @_editcallback
 *         def edit_f(gen):
 *             return edit(res)             # <<<<<<<<<<<<<<
 *         cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 *         res._editcallback  = cy_edit_f_ptr
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_edit)) { __Pyx_RaiseClosureNameError("edit"); __PYX_ERR(0, 4873, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_res)) { __Pyx_RaiseClosureNameError("res"); __PYX_ERR(0, 4873, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_edit);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_edit; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_res)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4871
 * 
 *     if(edit is not None):
 *         @_editcallback             # <<<<<<<<<<<<<<
 *         def edit_f(gen):
 *             return edit(res)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.edit_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4879
 * 
 *     if (analyze is not None):
 *         @_analyzecallback             # <<<<<<<<<<<<<<
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_5analyze_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_5analyze_f = {"analyze_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_5analyze_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_5analyze_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  CYTHON_UNUSED PyObject *__pyx_v_func = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("analyze_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_func,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4879, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4879, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("analyze_f", 1, 2, 2, 1); __PYX_ERR(0, 4879, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "analyze_f") < 0)) __PYX_ERR(0, 4879, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_func = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("analyze_f", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4879, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.analyze_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_18make_phase_vocoder_4analyze_f(__pyx_self, __pyx_v_gen, __pyx_v_func);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_4analyze_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen, CYTHON_UNUSED PyObject *__pyx_v_func) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("analyze_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4881
 *         @_analyzecallback
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)             # <<<<<<<<<<<<<<
 *         cy_analyze_f_ptr = (<cclm.analyze_cb*><size_t>ctypes.addressof(analyze_f))[0]
 *         res._analyzecallback  = cy_analyze_f_ptr
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_analyze)) { __Pyx_RaiseClosureNameError("analyze"); __PYX_ERR(0, 4881, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_res)) { __Pyx_RaiseClosureNameError("res"); __PYX_ERR(0, 4881, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_inp)) { __Pyx_RaiseClosureNameError("inp"); __PYX_ERR(0, 4881, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_analyze);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_analyze; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_res), __pyx_cur_scope->__pyx_v_inp};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4879
 * 
 *     if (analyze is not None):
 *         @_analyzecallback             # <<<<<<<<<<<<<<
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.analyze_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4887
 * 
 *     if (synthesize is not None):
 *         @_synthesizecallback             # <<<<<<<<<<<<<<
 *         def synthesize_f(gen):
 *             return synthesize(res)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_7synthesize_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_7synthesize_f = {"synthesize_f", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_7synthesize_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_18make_phase_vocoder_7synthesize_f(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("synthesize_f (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4887, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "synthesize_f") < 0)) __PYX_ERR(0, 4887, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("synthesize_f", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4887, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.synthesize_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_18make_phase_vocoder_6synthesize_f(__pyx_self, __pyx_v_gen);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_18make_phase_vocoder_6synthesize_f(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_gen) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("synthesize_f", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":4889
 *         @_synthesizecallback
 *         def synthesize_f(gen):
 *             return synthesize(res)             # <<<<<<<<<<<<<<
 *         cy_synthesize_f_ptr = (<cclm.synthesize_cb*><size_t>ctypes.addressof(synthesize_f))[0]
 *         res._synthesizecallback = cy_synthesize_f_ptr
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_synthesize)) { __Pyx_RaiseClosureNameError("synthesize"); __PYX_ERR(0, 4889, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_res)) { __Pyx_RaiseClosureNameError("res"); __PYX_ERR(0, 4889, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_synthesize);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_synthesize; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_res)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4887
 * 
 *     if (synthesize is not None):
 *         @_synthesizecallback             # <<<<<<<<<<<<<<
 *         def synthesize_f(gen):
 *             return synthesize(res)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder.synthesize_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */

static PyObject *__pyx_pf_8pysndlib_3clm_508make_phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_fft_size, PyObject *__pyx_v_overlap, PyObject *__pyx_v_interp, PyObject *__pyx_v_pitch, PyObject *__pyx_v_analyze, PyObject *__pyx_v_edit, PyObject *__pyx_v_synthesize) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_cur_scope;
  input_cb __pyx_v_cy_inp_f_ptr;
  edit_cb __pyx_v_cy_edit_f_ptr;
  analyze_cb __pyx_v_cy_analyze_f_ptr;
  synthesize_cb __pyx_v_cy_synthesize_f_ptr;
  PyObject *__pyx_v_inp_f = 0;
  PyObject *__pyx_v_edit_f = 0;
  PyObject *__pyx_v_analyze_f = 0;
  PyObject *__pyx_v_synthesize_f = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  mus_float_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_phase_vocoder", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4808, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_inp = __pyx_v_inp;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inp);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inp);
  __pyx_cur_scope->__pyx_v_analyze = __pyx_v_analyze;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_analyze);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_analyze);
  __pyx_cur_scope->__pyx_v_edit = __pyx_v_edit;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_edit);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_edit);
  __pyx_cur_scope->__pyx_v_synthesize = __pyx_v_synthesize;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_synthesize);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_synthesize);

  /* "pysndlib/clm.pyx":4843
 *     cdef cclm.synthesize_cb cy_synthesize_f_ptr
 * 
 *     if fft_size <= 1:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be a positive number greater than 1 not {fft_size}')
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_fft_size, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4843, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "pysndlib/clm.pyx":4844
 * 
 *     if fft_size <= 1:
 *         raise ValueError(f'fft_size must be a positive number greater than 1 not {fft_size}')             # <<<<<<<<<<<<<<
 * 
 *     if fft_size > csndlib.mus_max_malloc():
 */
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fft_size, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fft_size_must_be_a_positive_numb_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4844, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4843
 *     cdef cclm.synthesize_cb cy_synthesize_f_ptr
 * 
 *     if fft_size <= 1:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be a positive number greater than 1 not {fft_size}')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4846
 *         raise ValueError(f'fft_size must be a positive number greater than 1 not {fft_size}')
 * 
 *     if fft_size > csndlib.mus_max_malloc():             # <<<<<<<<<<<<<<
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(mus_max_malloc()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_fft_size, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "pysndlib/clm.pyx":4847
 * 
 *     if fft_size > csndlib.mus_max_malloc():
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')             # <<<<<<<<<<<<<<
 * 
 *     if not is_power_of_2(fft_size):
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_fft_size_too_large_cannot_alloca);
    __pyx_t_4 += 36;
    __Pyx_GIVEREF(__pyx_kp_u_fft_size_too_large_cannot_alloca);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_fft_size_too_large_cannot_alloca);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fft_size, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_size_fft);
    __pyx_t_4 += 9;
    __Pyx_GIVEREF(__pyx_kp_u_size_fft);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_size_fft);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4847, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4846
 *         raise ValueError(f'fft_size must be a positive number greater than 1 not {fft_size}')
 * 
 *     if fft_size > csndlib.mus_max_malloc():             # <<<<<<<<<<<<<<
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4849
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 *     if not is_power_of_2(fft_size):             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be power of 2 not {fft_size}')
 * 
 */
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_is_power_of_2(__pyx_v_fft_size, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (!__pyx_t_2);
  if (unlikely(__pyx_t_6)) {

    /* "pysndlib/clm.pyx":4850
 * 
 *     if not is_power_of_2(fft_size):
 *         raise ValueError(f'fft_size must be power of 2 not {fft_size}')             # <<<<<<<<<<<<<<
 * 
 *     if(isinstance(inp, mus_any)):
 */
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_fft_size, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fft_size_must_be_power_of_2_not, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4850, __pyx_L1_error)

    /* "pysndlib/clm.pyx":4849
 *          raise ValueError(f'fft_size too large. cannot allocate {fft_size} size fft')
 * 
 *     if not is_power_of_2(fft_size):             # <<<<<<<<<<<<<<
 *         raise ValueError(f'fft_size must be power of 2 not {fft_size}')
 * 
 */
  }

  /* "pysndlib/clm.pyx":4852
 *         raise ValueError(f'fft_size must be power of 2 not {fft_size}')
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(<cclm.input_cb>input_callback_func, fft_size, overlap, interp, pitch, NULL, NULL, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_t_3, __pyx_ptype_8pysndlib_3clm_mus_any); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4853
 * 
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(<cclm.input_cb>input_callback_func, fft_size, overlap, interp, pitch, NULL, NULL, NULL, <void*>(<mus_any>inp)._ptr))             # <<<<<<<<<<<<<<
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_fft_size); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4853, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_overlap); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4853, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_interp); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4853, __pyx_L1_error)
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_pitch); if (unlikely((__pyx_t_10 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4853, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_phase_vocoder(((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func), __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, NULL, NULL, NULL, ((void *)((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_inp)->_ptr)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_cur_scope->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":4854
 *     if(isinstance(inp, mus_any)):
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(<cclm.input_cb>input_callback_func, fft_size, overlap, interp, pitch, NULL, NULL, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func             # <<<<<<<<<<<<<<
 *         res.cache_append(inp)
 * 
 */
    __pyx_cur_scope->__pyx_v_res->_inputcallback = ((input_cb)__pyx_f_8pysndlib_3clm_input_callback_func);

    /* "pysndlib/clm.pyx":4855
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(<cclm.input_cb>input_callback_func, fft_size, overlap, interp, pitch, NULL, NULL, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 *         res.cache_append(inp)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_inp;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_t_3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4852
 *         raise ValueError(f'fft_size must be power of 2 not {fft_size}')
 * 
 *     if(isinstance(inp, mus_any)):             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(<cclm.input_cb>input_callback_func, fft_size, overlap, interp, pitch, NULL, NULL, NULL, <void*>(<mus_any>inp)._ptr))
 *         res._inputcallback = <cclm.input_cb>input_callback_func
 */
    goto __pyx_L6;
  }

  /* "pysndlib/clm.pyx":4858
 * 
 * 
 *     elif callable(inp):             # <<<<<<<<<<<<<<
 *         @_inputcallback
 *         def inp_f(gen, d):
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_inp;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyCallable_Check(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_6)) {

    /* "pysndlib/clm.pyx":4859
 * 
 *     elif callable(inp):
 *         @_inputcallback             # <<<<<<<<<<<<<<
 *         def inp_f(gen, d):
 *             return inp(d)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_inputcallback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_1inp_f, 0, __pyx_n_s_make_phase_vocoder_locals_inp_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_inp_f = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4862
 *         def inp_f(gen, d):
 *             return inp(d)
 *         cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]             # <<<<<<<<<<<<<<
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(cy_inp_f_ptr, fft_size, overlap, interp, pitch, NULL, NULL, NULL, NULL))
 *         res._inputcallback = cy_inp_f_ptr
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_addressof); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_inp_f};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4862, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cy_inp_f_ptr = (((input_cb *)((size_t)__pyx_t_13))[0]);

    /* "pysndlib/clm.pyx":4863
 *             return inp(d)
 *         cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(cy_inp_f_ptr, fft_size, overlap, interp, pitch, NULL, NULL, NULL, NULL))             # <<<<<<<<<<<<<<
 *         res._inputcallback = cy_inp_f_ptr
 *         res.cache_append(inp_f)
 */
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_fft_size); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4863, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_overlap); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4863, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_interp); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4863, __pyx_L1_error)
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_pitch); if (unlikely((__pyx_t_10 == ((mus_float_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4863, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_phase_vocoder(__pyx_v_cy_inp_f_ptr, __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_10, NULL, NULL, NULL, NULL), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4864
 *         cy_inp_f_ptr = (<cclm.input_cb*><size_t>ctypes.addressof(inp_f))[0]
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(cy_inp_f_ptr, fft_size, overlap, interp, pitch, NULL, NULL, NULL, NULL))
 *         res._inputcallback = cy_inp_f_ptr             # <<<<<<<<<<<<<<
 *         res.cache_append(inp_f)
 * 
 */
    __pyx_cur_scope->__pyx_v_res->_inputcallback = __pyx_v_cy_inp_f_ptr;

    /* "pysndlib/clm.pyx":4865
 *         res = mus_any.from_ptr(cclm.mus_make_phase_vocoder(cy_inp_f_ptr, fft_size, overlap, interp, pitch, NULL, NULL, NULL, NULL))
 *         res._inputcallback = cy_inp_f_ptr
 *         res.cache_append(inp_f)             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_inp_f, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4858
 * 
 * 
 *     elif callable(inp):             # <<<<<<<<<<<<<<
 *         @_inputcallback
 *         def inp_f(gen, d):
 */
    goto __pyx_L6;
  }

  /* "pysndlib/clm.pyx":4868
 * 
 *     else:
 *         raise TypeError(f"input needs to be a clm gen or a callable not a {type(inp)}")             # <<<<<<<<<<<<<<
 * 
 *     if(edit is not None):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_inp)), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4868, __pyx_L1_error)
  }
  __pyx_L6:;

  /* "pysndlib/clm.pyx":4870
 *         raise TypeError(f"input needs to be a clm gen or a callable not a {type(inp)}")
 * 
 *     if(edit is not None):             # <<<<<<<<<<<<<<
 *         @_editcallback
 *         def edit_f(gen):
 */
  __pyx_t_6 = (__pyx_cur_scope->__pyx_v_edit != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4871
 * 
 *     if(edit is not None):
 *         @_editcallback             # <<<<<<<<<<<<<<
 *         def edit_f(gen):
 *             return edit(res)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_editcallback); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_3edit_f, 0, __pyx_n_s_make_phase_vocoder_locals_edit_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_v_edit_f = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4874
 *         def edit_f(gen):
 *             return edit(res)
 *         cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]             # <<<<<<<<<<<<<<
 *         res._editcallback  = cy_edit_f_ptr
 *         res.cache_append(edit_f)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_addressof); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_edit_f};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4874, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cy_edit_f_ptr = (((edit_cb *)((size_t)__pyx_t_13))[0]);

    /* "pysndlib/clm.pyx":4875
 *             return edit(res)
 *         cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 *         res._editcallback  = cy_edit_f_ptr             # <<<<<<<<<<<<<<
 *         res.cache_append(edit_f)
 * 
 */
    __pyx_cur_scope->__pyx_v_res->_editcallback = __pyx_v_cy_edit_f_ptr;

    /* "pysndlib/clm.pyx":4876
 *         cy_edit_f_ptr = (<cclm.edit_cb*><size_t>ctypes.addressof(edit_f))[0]
 *         res._editcallback  = cy_edit_f_ptr
 *         res.cache_append(edit_f)             # <<<<<<<<<<<<<<
 * 
 *     if (analyze is not None):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_edit_f, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4870
 *         raise TypeError(f"input needs to be a clm gen or a callable not a {type(inp)}")
 * 
 *     if(edit is not None):             # <<<<<<<<<<<<<<
 *         @_editcallback
 *         def edit_f(gen):
 */
  }

  /* "pysndlib/clm.pyx":4878
 *         res.cache_append(edit_f)
 * 
 *     if (analyze is not None):             # <<<<<<<<<<<<<<
 *         @_analyzecallback
 *         def analyze_f(gen, func):
 */
  __pyx_t_6 = (__pyx_cur_scope->__pyx_v_analyze != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4879
 * 
 *     if (analyze is not None):
 *         @_analyzecallback             # <<<<<<<<<<<<<<
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_analyzecallback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_5analyze_f, 0, __pyx_n_s_make_phase_vocoder_locals_analyz, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_analyze_f = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4882
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)
 *         cy_analyze_f_ptr = (<cclm.analyze_cb*><size_t>ctypes.addressof(analyze_f))[0]             # <<<<<<<<<<<<<<
 *         res._analyzecallback  = cy_analyze_f_ptr
 *         res.cache_append(analyze_f)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_addressof); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_analyze_f};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4882, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cy_analyze_f_ptr = (((analyze_cb *)((size_t)__pyx_t_13))[0]);

    /* "pysndlib/clm.pyx":4883
 *             return analyze(res, inp)
 *         cy_analyze_f_ptr = (<cclm.analyze_cb*><size_t>ctypes.addressof(analyze_f))[0]
 *         res._analyzecallback  = cy_analyze_f_ptr             # <<<<<<<<<<<<<<
 *         res.cache_append(analyze_f)
 * 
 */
    __pyx_cur_scope->__pyx_v_res->_analyzecallback = __pyx_v_cy_analyze_f_ptr;

    /* "pysndlib/clm.pyx":4884
 *         cy_analyze_f_ptr = (<cclm.analyze_cb*><size_t>ctypes.addressof(analyze_f))[0]
 *         res._analyzecallback  = cy_analyze_f_ptr
 *         res.cache_append(analyze_f)             # <<<<<<<<<<<<<<
 * 
 *     if (synthesize is not None):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_analyze_f, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4878
 *         res.cache_append(edit_f)
 * 
 *     if (analyze is not None):             # <<<<<<<<<<<<<<
 *         @_analyzecallback
 *         def analyze_f(gen, func):
 */
  }

  /* "pysndlib/clm.pyx":4886
 *         res.cache_append(analyze_f)
 * 
 *     if (synthesize is not None):             # <<<<<<<<<<<<<<
 *         @_synthesizecallback
 *         def synthesize_f(gen):
 */
  __pyx_t_6 = (__pyx_cur_scope->__pyx_v_synthesize != Py_None);
  if (__pyx_t_6) {

    /* "pysndlib/clm.pyx":4887
 * 
 *     if (synthesize is not None):
 *         @_synthesizecallback             # <<<<<<<<<<<<<<
 *         def synthesize_f(gen):
 *             return synthesize(res)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_synthesizecallback); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_18make_phase_vocoder_7synthesize_f, 0, __pyx_n_s_make_phase_vocoder_locals_synthe, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_v_synthesize_f = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4890
 *         def synthesize_f(gen):
 *             return synthesize(res)
 *         cy_synthesize_f_ptr = (<cclm.synthesize_cb*><size_t>ctypes.addressof(synthesize_f))[0]             # <<<<<<<<<<<<<<
 *         res._synthesizecallback = cy_synthesize_f_ptr
 *         res.cache_append(synthesize_f)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_addressof); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_synthesize_f};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cy_synthesize_f_ptr = (((synthesize_cb *)((size_t)__pyx_t_13))[0]);

    /* "pysndlib/clm.pyx":4891
 *             return synthesize(res)
 *         cy_synthesize_f_ptr = (<cclm.synthesize_cb*><size_t>ctypes.addressof(synthesize_f))[0]
 *         res._synthesizecallback = cy_synthesize_f_ptr             # <<<<<<<<<<<<<<
 *         res.cache_append(synthesize_f)
 * 
 */
    __pyx_cur_scope->__pyx_v_res->_synthesizecallback = __pyx_v_cy_synthesize_f_ptr;

    /* "pysndlib/clm.pyx":4892
 *         cy_synthesize_f_ptr = (<cclm.synthesize_cb*><size_t>ctypes.addressof(synthesize_f))[0]
 *         res._synthesizecallback = cy_synthesize_f_ptr
 *         res.cache_append(synthesize_f)             # <<<<<<<<<<<<<<
 * 
 *     return res
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_8pysndlib_3clm_mus_any *)__pyx_cur_scope->__pyx_v_res->__pyx_vtab)->cache_append(__pyx_cur_scope->__pyx_v_res, __pyx_v_synthesize_f, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":4886
 *         res.cache_append(analyze_f)
 * 
 *     if (synthesize is not None):             # <<<<<<<<<<<<<<
 *         @_synthesizecallback
 *         def synthesize_f(gen):
 */
  }

  /* "pysndlib/clm.pyx":4894
 *         res.cache_append(synthesize_f)
 * 
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_res);
  __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_res);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pysndlib.clm.make_phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inp_f);
  __Pyx_XDECREF(__pyx_v_edit_f);
  __Pyx_XDECREF(__pyx_v_analyze_f);
  __Pyx_XDECREF(__pyx_v_synthesize_f);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4897
 * 
 * 
 * cpdef cython.double phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next phase vocoder value.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_511phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_phase_vocoder(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "pysndlib/clm.pyx":4904
 *     :rtype: float
 *     """
 *     if gen._analyzecallback or gen._synthesizecallback or gen._editcallback :             # <<<<<<<<<<<<<<
 *         return cclm.mus_phase_vocoder_with_editors(gen._ptr, gen._inputcallback, gen._analyzecallback, gen._editcallback, gen._synthesizecallback)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_gen->_analyzecallback != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_gen->_synthesizecallback != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_gen->_editcallback != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4905
 *     """
 *     if gen._analyzecallback or gen._synthesizecallback or gen._editcallback :
 *         return cclm.mus_phase_vocoder_with_editors(gen._ptr, gen._inputcallback, gen._analyzecallback, gen._editcallback, gen._synthesizecallback)             # <<<<<<<<<<<<<<
 *     else:
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)
 */
    __pyx_r = mus_phase_vocoder_with_editors(__pyx_v_gen->_ptr, __pyx_v_gen->_inputcallback, __pyx_v_gen->_analyzecallback, __pyx_v_gen->_editcallback, __pyx_v_gen->_synthesizecallback);
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":4904
 *     :rtype: float
 *     """
 *     if gen._analyzecallback or gen._synthesizecallback or gen._editcallback :             # <<<<<<<<<<<<<<
 *         return cclm.mus_phase_vocoder_with_editors(gen._ptr, gen._inputcallback, gen._analyzecallback, gen._editcallback, gen._synthesizecallback)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":4907
 *         return cclm.mus_phase_vocoder_with_editors(gen._ptr, gen._inputcallback, gen._analyzecallback, gen._editcallback, gen._synthesizecallback)
 *     else:
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_phase_vocoder(mus_any gen):
 */
  /*else*/ {
    __pyx_r = mus_phase_vocoder(__pyx_v_gen->_ptr, __pyx_v_gen->_inputcallback);
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":4897
 * 
 * 
 * cpdef cython.double phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next phase vocoder value.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_511phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_510phase_vocoder, "\n    next phase vocoder value.\n    \n    :param gen: phase_vocoder gen\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_511phase_vocoder = {"phase_vocoder", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_511phase_vocoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_510phase_vocoder};
static PyObject *__pyx_pw_8pysndlib_3clm_511phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4897, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder") < 0)) __PYX_ERR(0, 4897, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4897, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4897, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_510phase_vocoder(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_510phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_phase_vocoder(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4897, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4909
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a phase_vocoder.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_513is_phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_phase_vocoder(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":4916
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_phase_vocoder(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = mus_is_phase_vocoder(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4909
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a phase_vocoder.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_513is_phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_512is_phase_vocoder, "\n    returns True if gen is a phase_vocoder.\n    \n    :param gen: gen\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_513is_phase_vocoder = {"is_phase_vocoder", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_513is_phase_vocoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_512is_phase_vocoder};
static PyObject *__pyx_pw_8pysndlib_3clm_513is_phase_vocoder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_phase_vocoder (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4909, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_phase_vocoder") < 0)) __PYX_ERR(0, 4909, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_phase_vocoder", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4909, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4909, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_512is_phase_vocoder(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_512is_phase_vocoder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_phase_vocoder", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_phase_vocoder(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4909, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_phase_vocoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4919
 * 
 * 
 * cpdef np.ndarray phase_vocoder_amp_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitude increments per sample.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_515phase_vocoder_amp_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_amp_increments(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_amp_increments", 1);

  /* "pysndlib/clm.pyx":4923
 *     returns a ndarray containing the current output sinusoid amplitude increments per sample.
 *     """
 *     return gen._pv_amp_increments             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray phase_vocoder_amps(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen->_pv_amp_increments);
  __pyx_r = __pyx_v_gen->_pv_amp_increments;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4919
 * 
 * 
 * cpdef np.ndarray phase_vocoder_amp_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitude increments per sample.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_515phase_vocoder_amp_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_514phase_vocoder_amp_increments, "\n    returns a ndarray containing the current output sinusoid amplitude increments per sample.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_515phase_vocoder_amp_increments = {"phase_vocoder_amp_increments", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_515phase_vocoder_amp_increments, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_514phase_vocoder_amp_increments};
static PyObject *__pyx_pw_8pysndlib_3clm_515phase_vocoder_amp_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_amp_increments (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4919, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder_amp_increments") < 0)) __PYX_ERR(0, 4919, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder_amp_increments", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4919, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_amp_increments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4919, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_514phase_vocoder_amp_increments(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_514phase_vocoder_amp_increments(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder_amp_increments", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_vocoder_amp_increments(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_amp_increments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4925
 *     return gen._pv_amp_increments
 * 
 * cpdef np.ndarray phase_vocoder_amps(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitudes.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_517phase_vocoder_amps(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_amps(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_amps", 1);

  /* "pysndlib/clm.pyx":4929
 *     returns a ndarray containing the current output sinusoid amplitudes.
 *     """
 *     return gen._pv_amps             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray phase_vocoder_freqs(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen->_pv_amps);
  __pyx_r = __pyx_v_gen->_pv_amps;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4925
 *     return gen._pv_amp_increments
 * 
 * cpdef np.ndarray phase_vocoder_amps(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitudes.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_517phase_vocoder_amps(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_516phase_vocoder_amps, "\n    returns a ndarray containing the current output sinusoid amplitudes.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_517phase_vocoder_amps = {"phase_vocoder_amps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_517phase_vocoder_amps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_516phase_vocoder_amps};
static PyObject *__pyx_pw_8pysndlib_3clm_517phase_vocoder_amps(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_amps (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4925, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder_amps") < 0)) __PYX_ERR(0, 4925, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder_amps", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4925, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_amps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4925, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_516phase_vocoder_amps(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_516phase_vocoder_amps(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder_amps", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_vocoder_amps(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_amps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4931
 *     return gen._pv_amps
 * 
 * cpdef np.ndarray phase_vocoder_freqs(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid frequencies.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_519phase_vocoder_freqs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_freqs(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_freqs", 1);

  /* "pysndlib/clm.pyx":4935
 *     returns a ndarray containing the current output sinusoid frequencies.
 *     """
 *     return gen._pv_freqs             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray phase_vocoder_phases(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen->_pv_freqs);
  __pyx_r = __pyx_v_gen->_pv_freqs;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4931
 *     return gen._pv_amps
 * 
 * cpdef np.ndarray phase_vocoder_freqs(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid frequencies.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_519phase_vocoder_freqs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_518phase_vocoder_freqs, "\n    returns a ndarray containing the current output sinusoid frequencies.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_519phase_vocoder_freqs = {"phase_vocoder_freqs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_519phase_vocoder_freqs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_518phase_vocoder_freqs};
static PyObject *__pyx_pw_8pysndlib_3clm_519phase_vocoder_freqs(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_freqs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4931, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder_freqs") < 0)) __PYX_ERR(0, 4931, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder_freqs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4931, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_freqs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4931, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_518phase_vocoder_freqs(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_518phase_vocoder_freqs(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder_freqs", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_vocoder_freqs(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_freqs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4937
 *     return gen._pv_freqs
 * 
 * cpdef np.ndarray phase_vocoder_phases(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phases.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_521phase_vocoder_phases(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_phases(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_phases", 1);

  /* "pysndlib/clm.pyx":4941
 *     returns a ndarray containing the current output sinusoid phases.
 *     """
 *     return gen._pv_phases             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen->_pv_phases);
  __pyx_r = __pyx_v_gen->_pv_phases;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4937
 *     return gen._pv_freqs
 * 
 * cpdef np.ndarray phase_vocoder_phases(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phases.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_521phase_vocoder_phases(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_520phase_vocoder_phases, "\n    returns a ndarray containing the current output sinusoid phases.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_521phase_vocoder_phases = {"phase_vocoder_phases", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_521phase_vocoder_phases, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_520phase_vocoder_phases};
static PyObject *__pyx_pw_8pysndlib_3clm_521phase_vocoder_phases(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_phases (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4937, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder_phases") < 0)) __PYX_ERR(0, 4937, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder_phases", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4937, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_phases", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4937, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_520phase_vocoder_phases(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_520phase_vocoder_phases(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder_phases", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_vocoder_phases(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_phases", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4943
 *     return gen._pv_phases
 * 
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phase increments.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_523phase_vocoder_phase_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyArrayObject *__pyx_f_8pysndlib_3clm_phase_vocoder_phase_increments(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_phase_increments", 1);

  /* "pysndlib/clm.pyx":4947
 *     returns a ndarray containing the current output sinusoid phase increments.
 *     """
 *     return gen._pv_phase_increments             # <<<<<<<<<<<<<<
 * 
 * # --------------- out-any ---------------- #
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen->_pv_phase_increments);
  __pyx_r = __pyx_v_gen->_pv_phase_increments;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":4943
 *     return gen._pv_phases
 * 
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phase increments.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_523phase_vocoder_phase_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_522phase_vocoder_phase_increments, "\n    returns a ndarray containing the current output sinusoid phase increments.\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_523phase_vocoder_phase_increments = {"phase_vocoder_phase_increments", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_523phase_vocoder_phase_increments, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_522phase_vocoder_phase_increments};
static PyObject *__pyx_pw_8pysndlib_3clm_523phase_vocoder_phase_increments(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_vocoder_phase_increments (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4943, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_vocoder_phase_increments") < 0)) __PYX_ERR(0, 4943, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_vocoder_phase_increments", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4943, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_phase_increments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 4943, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_522phase_vocoder_phase_increments(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_522phase_vocoder_phase_increments(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_vocoder_phase_increments", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_phase_vocoder_phase_increments(__pyx_v_gen, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.phase_vocoder_phase_increments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4950
 * 
 * # --------------- out-any ---------------- #
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_525out_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_out_any(long __pyx_v_loc, double __pyx_v_data, int __pyx_v_channel, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_out_any *__pyx_optional_args) {
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("out_any", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output = __pyx_optional_args->output;
    }
  }
  __Pyx_INCREF(__pyx_v_output);

  /* "pysndlib/clm.pyx":4962
 * 
 * 
 *     if isinstance(output, np.ndarray):             # <<<<<<<<<<<<<<
 *         output[channel][loc] += data
 *     else:
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_output, __pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4963
 * 
 *     if isinstance(output, np.ndarray):
 *         output[channel][loc] += data             # <<<<<<<<<<<<<<
 *     else:
 *         if not output:
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_output, __pyx_v_channel, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_v_loc;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely((__Pyx_SetItemInt(__pyx_t_2, __pyx_t_3, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 4963, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4962
 * 
 * 
 *     if isinstance(output, np.ndarray):             # <<<<<<<<<<<<<<
 *         output[channel][loc] += data
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":4965
 *         output[channel][loc] += data
 *     else:
 *         if not output:             # <<<<<<<<<<<<<<
 *             output = default.output
 *         out = <mus_any>output
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_output); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4965, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_1);
    if (__pyx_t_7) {

      /* "pysndlib/clm.pyx":4966
 *     else:
 *         if not output:
 *             output = default.output             # <<<<<<<<<<<<<<
 *         out = <mus_any>output
 *         cclm.mus_out_any(loc, data, channel, out._ptr)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pysndlib/clm.pyx":4965
 *         output[channel][loc] += data
 *     else:
 *         if not output:             # <<<<<<<<<<<<<<
 *             output = default.output
 *         out = <mus_any>output
 */
    }

    /* "pysndlib/clm.pyx":4967
 *         if not output:
 *             output = default.output
 *         out = <mus_any>output             # <<<<<<<<<<<<<<
 *         cclm.mus_out_any(loc, data, channel, out._ptr)
 * 
 */
    __pyx_t_6 = __pyx_v_output;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_v_out = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysndlib/clm.pyx":4968
 *             output = default.output
 *         out = <mus_any>output
 *         cclm.mus_out_any(loc, data, channel, out._ptr)             # <<<<<<<<<<<<<<
 * 
 * # --------------- outa ---------------- #
 */
    (void)(mus_out_any(__pyx_v_loc, __pyx_v_data, __pyx_v_channel, __pyx_v_out->_ptr));
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":4950
 * 
 * # --------------- out-any ---------------- #
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.out_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_525out_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_524out_any, "\n    add data to output.\n    \n    :param loc: location to write to \\in samples\n    :param data: sample value\n    :param channel: channel to write to \n    :param output: output to write to. can be an appropriately shaped np.ndarray or sample2file\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_525out_any = {"out_any", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_525out_any, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_524out_any};
static PyObject *__pyx_pw_8pysndlib_3clm_525out_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  double __pyx_v_data;
  int __pyx_v_channel;
  PyObject *__pyx_v_output = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("out_any (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_data,&__pyx_n_s_channel,&__pyx_n_s_output,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("out_any", 0, 3, 4, 1); __PYX_ERR(0, 4950, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_channel)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("out_any", 0, 3, 4, 2); __PYX_ERR(0, 4950, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "out_any") < 0)) __PYX_ERR(0, 4950, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
    __pyx_v_data = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_data == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4950, __pyx_L3_error)
    __pyx_v_output = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("out_any", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 4950, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.out_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_524out_any(__pyx_self, __pyx_v_loc, __pyx_v_data, __pyx_v_channel, __pyx_v_output);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_524out_any(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, int __pyx_v_channel, PyObject *__pyx_v_output) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("out_any", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, __pyx_v_channel, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.out_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4971
 * 
 * # --------------- outa ---------------- #
 * cpdef outa(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 0.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_527outa(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outa(long __pyx_v_loc, double __pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outa *__pyx_optional_args) {
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outa", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output = __pyx_optional_args->output;
    }
  }

  /* "pysndlib/clm.pyx":4981
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 0, output)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_output != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4982
 *     """
 *     if output is not None:
 *         out_any(loc, data, 0, output)             # <<<<<<<<<<<<<<
 *     else:
 *         out_any(loc, data, 0, default.output)
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_v_output;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 0, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4981
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 0, output)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":4984
 *         out_any(loc, data, 0, output)
 *     else:
 *         out_any(loc, data, 0, default.output)             # <<<<<<<<<<<<<<
 * 
 * # --------------- outb ---------------- #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_t_4;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 0, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":4971
 * 
 * # --------------- outa ---------------- #
 * cpdef outa(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 0.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.outa", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_527outa(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_526outa, "\n    add data to output \\in channel 0.\n    \n    :param loc: location to write to \\in samples\n    :param data: sample value\n    :param channel: channel to write to \n    :param output: output to write to. can be an appropriately shaped np.ndarray or sample2file\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_527outa = {"outa", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_527outa, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_526outa};
static PyObject *__pyx_pw_8pysndlib_3clm_527outa(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  double __pyx_v_data;
  PyObject *__pyx_v_output = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outa (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_data,&__pyx_n_s_output,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("outa", 0, 2, 3, 1); __PYX_ERR(0, 4971, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "outa") < 0)) __PYX_ERR(0, 4971, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L3_error)
    __pyx_v_data = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_data == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L3_error)
    __pyx_v_output = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outa", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4971, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.outa", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_526outa(__pyx_self, __pyx_v_loc, __pyx_v_data, __pyx_v_output);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_526outa(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_outa __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outa", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_outa(__pyx_v_loc, __pyx_v_data, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.outa", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":4987
 * 
 * # --------------- outb ---------------- #
 * cpdef outb(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 1.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_529outb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outb(long __pyx_v_loc, double __pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outb *__pyx_optional_args) {
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outb", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output = __pyx_optional_args->output;
    }
  }

  /* "pysndlib/clm.pyx":4997
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 1, output)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_output != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":4998
 *     """
 *     if output is not None:
 *         out_any(loc, data, 1, output)             # <<<<<<<<<<<<<<
 *     else:
 *         out_any(loc, data, 1, default.output)
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_v_output;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":4997
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 1, output)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":5000
 *         out_any(loc, data, 1, output)
 *     else:
 *         out_any(loc, data, 1, default.output)             # <<<<<<<<<<<<<<
 * 
 * # --------------- outc ---------------- #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_t_4;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 1, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":4987
 * 
 * # --------------- outb ---------------- #
 * cpdef outb(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 1.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.outb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_529outb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_528outb, "\n    add data to output \\in channel 1.\n    \n    :param loc: location to write to \\in samples\n    :param data: sample value\n    :param channel: channel to write to \n    :param output: output to write to. can be an appropriately shaped np.ndarray or sample2fil\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_529outb = {"outb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_529outb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_528outb};
static PyObject *__pyx_pw_8pysndlib_3clm_529outb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  double __pyx_v_data;
  PyObject *__pyx_v_output = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_data,&__pyx_n_s_output,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4987, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4987, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("outb", 0, 2, 3, 1); __PYX_ERR(0, 4987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4987, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "outb") < 0)) __PYX_ERR(0, 4987, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4987, __pyx_L3_error)
    __pyx_v_data = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_data == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4987, __pyx_L3_error)
    __pyx_v_output = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outb", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4987, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.outb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_528outb(__pyx_self, __pyx_v_loc, __pyx_v_data, __pyx_v_output);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_528outb(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_outb __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_outb(__pyx_v_loc, __pyx_v_data, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.outb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5003
 * 
 * # --------------- outc ---------------- #
 * cpdef outc(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 2.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_531outc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outc(long __pyx_v_loc, double __pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outc *__pyx_optional_args) {
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outc", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output = __pyx_optional_args->output;
    }
  }

  /* "pysndlib/clm.pyx":5013
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 2, output)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_output != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5014
 *     """
 *     if output is not None:
 *         out_any(loc, data, 2, output)             # <<<<<<<<<<<<<<
 *     else:
 *         out_any(loc, data, 2, default.output)
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_v_output;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 2, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":5013
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 2, output)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":5016
 *         out_any(loc, data, 2, output)
 *     else:
 *         out_any(loc, data, 2, default.output)             # <<<<<<<<<<<<<<
 * 
 * # --------------- outd ---------------- #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_t_4;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 2, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":5003
 * 
 * # --------------- outc ---------------- #
 * cpdef outc(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 2.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.outc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_531outc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_530outc, "\n    add data to output \\in channel 2.\n    \n    :param loc: location to write to \\in samples\n    :param data: sample value\n    :param channel: channel to write to \n    :param output: output to write to. can be an appropriately shaped np.ndarray or sample2file\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_531outc = {"outc", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_531outc, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_530outc};
static PyObject *__pyx_pw_8pysndlib_3clm_531outc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  double __pyx_v_data;
  PyObject *__pyx_v_output = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_data,&__pyx_n_s_output,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5003, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5003, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("outc", 0, 2, 3, 1); __PYX_ERR(0, 5003, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5003, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "outc") < 0)) __PYX_ERR(0, 5003, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5003, __pyx_L3_error)
    __pyx_v_data = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_data == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5003, __pyx_L3_error)
    __pyx_v_output = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outc", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5003, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.outc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_530outc(__pyx_self, __pyx_v_loc, __pyx_v_data, __pyx_v_output);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_530outc(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_outc __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outc", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_outc(__pyx_v_loc, __pyx_v_data, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.outc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5019
 * 
 * # --------------- outd ---------------- #
 * cpdef outd(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 3.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_533outd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_outd(long __pyx_v_loc, double __pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outd *__pyx_optional_args) {
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outd", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output = __pyx_optional_args->output;
    }
  }

  /* "pysndlib/clm.pyx":5029
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 3, output)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_output != Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5030
 *     """
 *     if output is not None:
 *         out_any(loc, data, 3, output)             # <<<<<<<<<<<<<<
 *     else:
 *         out_any(loc, data, 3, default.output)
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_v_output;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 3, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":5029
 * 
 *     """
 *     if output is not None:             # <<<<<<<<<<<<<<
 *         out_any(loc, data, 3, output)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":5032
 *         out_any(loc, data, 3, output)
 *     else:
 *         out_any(loc, data, 3, default.output)             # <<<<<<<<<<<<<<
 * 
 *    #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.output = __pyx_t_4;
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_v_data, 3, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":5019
 * 
 * # --------------- outd ---------------- #
 * cpdef outd(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 3.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.outd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_533outd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_532outd, "\n    add data to output \\in channel 3.\n    \n    :param loc: location to write to \\in samples\n    :param data: sample value\n    :param channel: channel to write to \n    :param output: output to write to. can be an appropriately shaped np.ndarray or sample2file\n\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_533outd = {"outd", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_533outd, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_532outd};
static PyObject *__pyx_pw_8pysndlib_3clm_533outd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  double __pyx_v_data;
  PyObject *__pyx_v_output = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outd (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_data,&__pyx_n_s_output,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5019, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5019, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("outd", 0, 2, 3, 1); __PYX_ERR(0, 5019, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5019, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "outd") < 0)) __PYX_ERR(0, 5019, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5019, __pyx_L3_error)
    __pyx_v_data = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_data == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5019, __pyx_L3_error)
    __pyx_v_output = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outd", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5019, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.outd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_532outd(__pyx_self, __pyx_v_loc, __pyx_v_data, __pyx_v_output);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_532outd(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, double __pyx_v_data, PyObject *__pyx_v_output) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_outd __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outd", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_outd(__pyx_v_loc, __pyx_v_data, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.outd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5036
 *    #
 * # --------------- out-bank ---------------- #
 * cpdef out_bank(gens, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     calls each generator \in the gens list, passing it the argument val, then sends that output to the output channels \in the list order (the first generator writes to outa, the second to outb, etc)."
 */

static PyObject *__pyx_pw_8pysndlib_3clm_535out_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_out_bank(PyObject *__pyx_v_gens, long __pyx_v_loc, double __pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_gen = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  double __pyx_t_9;
  struct __pyx_opt_args_8pysndlib_3clm_out_any __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("out_bank", 1);

  /* "pysndlib/clm.pyx":5045
 *     :rtype: float
 *     """
 *     for i in range(len(gens)):             # <<<<<<<<<<<<<<
 *         gen = gens[i]
 *         out_any(loc, gen(val, 0.), i, default.output)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_gens); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5045, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pysndlib/clm.pyx":5046
 *     """
 *     for i in range(len(gens)):
 *         gen = gens[i]             # <<<<<<<<<<<<<<
 *         out_any(loc, gen(val, 0.), i, default.output)
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_gens, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_gen, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":5047
 *     for i in range(len(gens)):
 *         gen = gens[i]
 *         out_any(loc, gen(val, 0.), i, default.output)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_gen);
    __pyx_t_6 = __pyx_v_gen; __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, __pyx_float_0_};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5047, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_output); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.output = __pyx_t_6;
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_out_any(__pyx_v_loc, __pyx_t_9, __pyx_v_i, 0, &__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "pysndlib/clm.pyx":5036
 *    #
 * # --------------- out-bank ---------------- #
 * cpdef out_bank(gens, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     calls each generator \in the gens list, passing it the argument val, then sends that output to the output channels \in the list order (the first generator writes to outa, the second to outb, etc)."
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.out_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gen);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_535out_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_534out_bank, "\n    calls each generator \\in the gens list, passing it the argument val, then sends that output to the output channels \\in the list order (the first generator writes to outa, the second to outb, etc).\"\n\n    :param gens: gens to call\n    :param loca: location in samples to write to\n    :return: data\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_535out_bank = {"out_bank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_535out_bank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_534out_bank};
static PyObject *__pyx_pw_8pysndlib_3clm_535out_bank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_gens = 0;
  long __pyx_v_loc;
  double __pyx_v_val;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("out_bank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gens,&__pyx_n_s_loc,&__pyx_n_s_val,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gens)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("out_bank", 1, 3, 3, 1); __PYX_ERR(0, 5036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("out_bank", 1, 3, 3, 2); __PYX_ERR(0, 5036, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "out_bank") < 0)) __PYX_ERR(0, 5036, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gens = values[0];
    __pyx_v_loc = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L3_error)
    __pyx_v_val = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("out_bank", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5036, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.out_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_534out_bank(__pyx_self, __pyx_v_gens, __pyx_v_loc, __pyx_v_val);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_534out_bank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gens, long __pyx_v_loc, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("out_bank", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_out_bank(__pyx_v_gens, __pyx_v_loc, __pyx_v_val, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.out_bank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5052
 * 
 * #--------------- in-any ----------------#
 * cpdef in_any(cython.long loc, cython.int channel, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel chan.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_537in_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_in_any(long __pyx_v_loc, int __pyx_v_channel, PyObject *__pyx_v_inp, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_ipt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("in_any", 1);

  /* "pysndlib/clm.pyx":5062
 *     :rtype: float
 *     """
 *     if is_list_or_ndarray(input):             # <<<<<<<<<<<<<<
 *         return inp[channel][loc]
 *     elif isinstance(inp, types.GeneratorType):
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_builtin_input, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5063
 *     """
 *     if is_list_or_ndarray(input):
 *         return inp[channel][loc]             # <<<<<<<<<<<<<<
 *     elif isinstance(inp, types.GeneratorType):
 *         return next(inp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_inp, __pyx_v_channel, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_loc, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5062
 *     :rtype: float
 *     """
 *     if is_list_or_ndarray(input):             # <<<<<<<<<<<<<<
 *         return inp[channel][loc]
 *     elif isinstance(inp, types.GeneratorType):
 */
  }

  /* "pysndlib/clm.pyx":5064
 *     if is_list_or_ndarray(input):
 *         return inp[channel][loc]
 *     elif isinstance(inp, types.GeneratorType):             # <<<<<<<<<<<<<<
 *         return next(inp)
 *     elif callable(inp):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GeneratorType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_inp, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 5064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5065
 *         return inp[channel][loc]
 *     elif isinstance(inp, types.GeneratorType):
 *         return next(inp)             # <<<<<<<<<<<<<<
 *     elif callable(inp):
 *         return inp(loc, channel)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_inp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5064
 *     if is_list_or_ndarray(input):
 *         return inp[channel][loc]
 *     elif isinstance(inp, types.GeneratorType):             # <<<<<<<<<<<<<<
 *         return next(inp)
 *     elif callable(inp):
 */
  }

  /* "pysndlib/clm.pyx":5066
 *     elif isinstance(inp, types.GeneratorType):
 *         return next(inp)
 *     elif callable(inp):             # <<<<<<<<<<<<<<
 *         return inp(loc, channel)
 *     else:
 */
  __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_inp); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 5066, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5067
 *         return next(inp)
 *     elif callable(inp):
 *         return inp(loc, channel)             # <<<<<<<<<<<<<<
 *     else:
 *         ipt = <mus_any>inp
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_channel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_inp);
    __pyx_t_5 = __pyx_v_inp; __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5066
 *     elif isinstance(inp, types.GeneratorType):
 *         return next(inp)
 *     elif callable(inp):             # <<<<<<<<<<<<<<
 *         return inp(loc, channel)
 *     else:
 */
  }

  /* "pysndlib/clm.pyx":5069
 *         return inp(loc, channel)
 *     else:
 *         ipt = <mus_any>inp             # <<<<<<<<<<<<<<
 *         return cclm.mus_in_any(loc, channel, ipt._ptr)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __pyx_v_inp;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_ipt = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5070
 *     else:
 *         ipt = <mus_any>inp
 *         return cclm.mus_in_any(loc, channel, ipt._ptr)             # <<<<<<<<<<<<<<
 * 
 * #--------------- ina ----------------#
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(mus_in_any(__pyx_v_loc, __pyx_v_channel, __pyx_v_ipt->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pysndlib/clm.pyx":5052
 * 
 * #--------------- in-any ----------------#
 * cpdef in_any(cython.long loc, cython.int channel, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel chan.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.in_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ipt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_537in_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_536in_any, "\n    input stream sample at loc \\in channel chan.\n    \n    :param loc: location to read from\n    :param channel: channel to read from \n    :param inp: input to read from. can be an appropriately shaped np.ndarray or file2sample\n    :return: data\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_537in_any = {"in_any", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_537in_any, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_536in_any};
static PyObject *__pyx_pw_8pysndlib_3clm_537in_any(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  int __pyx_v_channel;
  PyObject *__pyx_v_inp = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("in_any (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_channel,&__pyx_n_s_inp,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_channel)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("in_any", 1, 3, 3, 1); __PYX_ERR(0, 5052, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("in_any", 1, 3, 3, 2); __PYX_ERR(0, 5052, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "in_any") < 0)) __PYX_ERR(0, 5052, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L3_error)
    __pyx_v_inp = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("in_any", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5052, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.in_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_536in_any(__pyx_self, __pyx_v_loc, __pyx_v_channel, __pyx_v_inp);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_536in_any(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, int __pyx_v_channel, PyObject *__pyx_v_inp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("in_any", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_in_any(__pyx_v_loc, __pyx_v_channel, __pyx_v_inp, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.in_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5073
 * 
 * #--------------- ina ----------------#
 * cpdef ina(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 0.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_539ina(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_ina(long __pyx_v_loc, PyObject *__pyx_v_inp, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ina", 1);

  /* "pysndlib/clm.pyx":5082
 *     :rtype: float
 *     """
 *     return in_any(loc, 0, inp)             # <<<<<<<<<<<<<<
 * 
 * #--------------- inb ----------------#
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_in_any(__pyx_v_loc, 0, __pyx_v_inp, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5073
 * 
 * #--------------- ina ----------------#
 * cpdef ina(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 0.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.ina", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_539ina(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_538ina, "\n    input stream sample at loc \\in channel 0.\n    \n    :param loc: location to read from\n    :param inp: input to read from. can be an appropriately shaped np.ndarray or file2sample\n    :return: data\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_539ina = {"ina", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_539ina, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_538ina};
static PyObject *__pyx_pw_8pysndlib_3clm_539ina(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  PyObject *__pyx_v_inp = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ina (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_inp,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5073, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5073, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("ina", 1, 2, 2, 1); __PYX_ERR(0, 5073, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ina") < 0)) __PYX_ERR(0, 5073, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5073, __pyx_L3_error)
    __pyx_v_inp = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ina", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5073, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.ina", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_538ina(__pyx_self, __pyx_v_loc, __pyx_v_inp);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_538ina(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, PyObject *__pyx_v_inp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ina", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_ina(__pyx_v_loc, __pyx_v_inp, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.ina", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5085
 * 
 * #--------------- inb ----------------#
 * cpdef inb(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 1.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_541inb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_inb(long __pyx_v_loc, PyObject *__pyx_v_inp, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inb", 1);

  /* "pysndlib/clm.pyx":5095
 *     :rtype: float
 *     """
 *     return in_any(loc, 1, inp)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_in_any(__pyx_v_loc, 1, __pyx_v_inp, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5085
 * 
 * #--------------- inb ----------------#
 * cpdef inb(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 1.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.inb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_541inb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_540inb, "\n    input stream sample at loc \\in channel 1.\n    \n    :param loc: location to read from\n    :param channel: channel to read from \n    :param inp: input to read from. can be an appropriately shaped np.ndarray or file2sample\n    :return: data\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_541inb = {"inb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_541inb, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_540inb};
static PyObject *__pyx_pw_8pysndlib_3clm_541inb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_loc;
  PyObject *__pyx_v_inp = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loc,&__pyx_n_s_inp,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5085, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_inp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5085, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("inb", 1, 2, 2, 1); __PYX_ERR(0, 5085, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inb") < 0)) __PYX_ERR(0, 5085, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_loc = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5085, __pyx_L3_error)
    __pyx_v_inp = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inb", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5085, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.inb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_540inb(__pyx_self, __pyx_v_loc, __pyx_v_inp);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_540inb(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_loc, PyObject *__pyx_v_inp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inb", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_inb(__pyx_v_loc, __pyx_v_inp, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.inb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5100
 * 
 * # --------------- locsig ---------------- #
 * cpdef mus_any make_locsig(cython.double degree=0.0, cython.double distance=1., cython.double reverb=0.0, output=None, revout=None, channels=None, reverb_channels=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

static PyObject *__pyx_pw_8pysndlib_3clm_543make_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_locsig(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_locsig *__pyx_optional_args) {
  double __pyx_v_degree = ((double)0.0);
  double __pyx_v_distance = ((double)1.);
  double __pyx_v_reverb = ((double)0.0);
  PyObject *__pyx_v_output = ((PyObject *)Py_None);
  PyObject *__pyx_v_revout = ((PyObject *)Py_None);
  PyObject *__pyx_v_channels = ((PyObject *)Py_None);
  PyObject *__pyx_v_reverb_channels = ((PyObject *)Py_None);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type = __pyx_k__61;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_out = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_rout = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_res = NULL;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_locsig", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_degree = __pyx_optional_args->degree;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_distance = __pyx_optional_args->distance;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_reverb = __pyx_optional_args->reverb;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_output = __pyx_optional_args->output;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_revout = __pyx_optional_args->revout;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_channels = __pyx_optional_args->channels;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_reverb_channels = __pyx_optional_args->reverb_channels;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_interp_type = __pyx_optional_args->interp_type;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_output);
  __Pyx_INCREF(__pyx_v_revout);
  __Pyx_INCREF(__pyx_v_channels);
  __Pyx_INCREF(__pyx_v_reverb_channels);

  /* "pysndlib/clm.pyx":5117
 *     cdef cclm.detour_cb cy_detour_f_ptr
 * 
 *     if output is None:             # <<<<<<<<<<<<<<
 *         output = default.output  #todo : check if this exists
 * 
 */
  __pyx_t_1 = (__pyx_v_output == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5118
 * 
 *     if output is None:
 *         output = default.output  #todo : check if this exists             # <<<<<<<<<<<<<<
 * 
 *     if revout is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5117
 *     cdef cclm.detour_cb cy_detour_f_ptr
 * 
 *     if output is None:             # <<<<<<<<<<<<<<
 *         output = default.output  #todo : check if this exists
 * 
 */
  }

  /* "pysndlib/clm.pyx":5120
 *         output = default.output  #todo : check if this exists
 * 
 *     if revout is None:             # <<<<<<<<<<<<<<
 *         if default.reverb is not None:
 *             revout = default.reverb
 */
  __pyx_t_1 = (__pyx_v_revout == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5121
 * 
 *     if revout is None:
 *         if default.reverb is not None:             # <<<<<<<<<<<<<<
 *             revout = default.reverb
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_2 != Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":5122
 *     if revout is None:
 *         if default.reverb is not None:
 *             revout = default.reverb             # <<<<<<<<<<<<<<
 *         else:
 *             revout = None #this generates and error but still works
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_revout, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":5121
 * 
 *     if revout is None:
 *         if default.reverb is not None:             # <<<<<<<<<<<<<<
 *             revout = default.reverb
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pysndlib/clm.pyx":5124
 *             revout = default.reverb
 *         else:
 *             revout = None #this generates and error but still works             # <<<<<<<<<<<<<<
 * 
 *     if channels is None:
 */
    /*else*/ {
      __Pyx_INCREF(Py_None);
      __Pyx_DECREF_SET(__pyx_v_revout, Py_None);
    }
    __pyx_L5:;

    /* "pysndlib/clm.pyx":5120
 *         output = default.output  #todo : check if this exists
 * 
 *     if revout is None:             # <<<<<<<<<<<<<<
 *         if default.reverb is not None:
 *             revout = default.reverb
 */
  }

  /* "pysndlib/clm.pyx":5126
 *             revout = None #this generates and error but still works
 * 
 *     if channels is None:             # <<<<<<<<<<<<<<
 *         channels = get_channels(output)
 * 
 */
  __pyx_t_1 = (__pyx_v_channels == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5127
 * 
 *     if channels is None:
 *         channels = get_channels(output)             # <<<<<<<<<<<<<<
 * 
 *     if reverb_channels is None:
 */
    __pyx_t_4 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_v_output, 0); if (unlikely(__pyx_t_4 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5127, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_channels, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5126
 *             revout = None #this generates and error but still works
 * 
 *     if channels is None:             # <<<<<<<<<<<<<<
 *         channels = get_channels(output)
 * 
 */
  }

  /* "pysndlib/clm.pyx":5129
 *         channels = get_channels(output)
 * 
 *     if reverb_channels is None:             # <<<<<<<<<<<<<<
 *         if revout is None:
 *             reverb_channels = 0
 */
  __pyx_t_1 = (__pyx_v_reverb_channels == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5130
 * 
 *     if reverb_channels is None:
 *         if revout is None:             # <<<<<<<<<<<<<<
 *             reverb_channels = 0
 *         else:
 */
    __pyx_t_1 = (__pyx_v_revout == Py_None);
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":5131
 *     if reverb_channels is None:
 *         if revout is None:
 *             reverb_channels = 0             # <<<<<<<<<<<<<<
 *         else:
 *             reverb_channels = get_channels(revout)
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_reverb_channels, __pyx_int_0);

      /* "pysndlib/clm.pyx":5130
 * 
 *     if reverb_channels is None:
 *         if revout is None:             # <<<<<<<<<<<<<<
 *             reverb_channels = 0
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pysndlib/clm.pyx":5133
 *             reverb_channels = 0
 *         else:
 *             reverb_channels = get_channels(revout)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(output, mus_any):
 */
    /*else*/ {
      __pyx_t_4 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_v_revout, 0); if (unlikely(__pyx_t_4 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5133, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_reverb_channels, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "pysndlib/clm.pyx":5129
 *         channels = get_channels(output)
 * 
 *     if reverb_channels is None:             # <<<<<<<<<<<<<<
 *         if revout is None:
 *             reverb_channels = 0
 */
  }

  /* "pysndlib/clm.pyx":5135
 *             reverb_channels = get_channels(revout)
 * 
 *     if isinstance(output, mus_any):             # <<<<<<<<<<<<<<
 * 
 *         out = <mus_any>output
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_output, __pyx_ptype_8pysndlib_3clm_mus_any); 
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5137
 *     if isinstance(output, mus_any):
 * 
 *         out = <mus_any>output             # <<<<<<<<<<<<<<
 *         rout = <mus_any>revout
 *         if revout is not None:
 */
    __pyx_t_3 = __pyx_v_output;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_out = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5138
 * 
 *         out = <mus_any>output
 *         rout = <mus_any>revout             # <<<<<<<<<<<<<<
 *         if revout is not None:
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, rout._ptr,  <cclm.mus_interp_t>interp_type))
 */
    __pyx_t_3 = __pyx_v_revout;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_rout = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5139
 *         out = <mus_any>output
 *         rout = <mus_any>revout
 *         if revout is not None:             # <<<<<<<<<<<<<<
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, rout._ptr,  <cclm.mus_interp_t>interp_type))
 *         else:
 */
    __pyx_t_1 = (__pyx_v_revout != Py_None);
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":5140
 *         rout = <mus_any>revout
 *         if revout is not None:
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, rout._ptr,  <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *         else:
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, NULL ,  <cclm.mus_interp_t>interp_type))
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_channels); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5140, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_reverb_channels); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5140, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_locsig(__pyx_v_degree, __pyx_v_distance, __pyx_v_reverb, __pyx_t_5, __pyx_v_out->_ptr, __pyx_t_6, __pyx_v_rout->_ptr, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pysndlib/clm.pyx":5139
 *         out = <mus_any>output
 *         rout = <mus_any>revout
 *         if revout is not None:             # <<<<<<<<<<<<<<
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, rout._ptr,  <cclm.mus_interp_t>interp_type))
 *         else:
 */
      goto __pyx_L10;
    }

    /* "pysndlib/clm.pyx":5142
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, rout._ptr,  <cclm.mus_interp_t>interp_type))
 *         else:
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, NULL ,  <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_channels); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5142, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_reverb_channels); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5142, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_locsig(__pyx_v_degree, __pyx_v_distance, __pyx_v_reverb, __pyx_t_6, __pyx_v_out->_ptr, __pyx_t_5, NULL, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L10:;

    /* "pysndlib/clm.pyx":5143
 *         else:
 *             res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, out._ptr, reverb_channels, NULL ,  <cclm.mus_interp_t>interp_type))
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     # todo: what if revout is not an iterable? while possible not going to deal with it right now :)
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_res);
    __pyx_r = __pyx_v_res;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5135
 *             reverb_channels = get_channels(revout)
 * 
 *     if isinstance(output, mus_any):             # <<<<<<<<<<<<<<
 * 
 *         out = <mus_any>output
 */
  }

  /* "pysndlib/clm.pyx":5146
 * 
 *     # todo: what if revout is not an iterable? while possible not going to deal with it right now :)
 *     elif is_list_or_ndarray(output):             # <<<<<<<<<<<<<<
 *         if reverb_channels is None:
 *             reverb_channels = 0
 */
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_is_list_or_ndarray(__pyx_v_output, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_1)) {

    /* "pysndlib/clm.pyx":5147
 *     # todo: what if revout is not an iterable? while possible not going to deal with it right now :)
 *     elif is_list_or_ndarray(output):
 *         if reverb_channels is None:             # <<<<<<<<<<<<<<
 *             reverb_channels = 0
 * 
 */
    __pyx_t_1 = (__pyx_v_reverb_channels == Py_None);
    if (__pyx_t_1) {

      /* "pysndlib/clm.pyx":5148
 *     elif is_list_or_ndarray(output):
 *         if reverb_channels is None:
 *             reverb_channels = 0             # <<<<<<<<<<<<<<
 * 
 *         res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, NULL, reverb_channels, NULL, <cclm.mus_interp_t>interp_type))
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_reverb_channels, __pyx_int_0);

      /* "pysndlib/clm.pyx":5147
 *     # todo: what if revout is not an iterable? while possible not going to deal with it right now :)
 *     elif is_list_or_ndarray(output):
 *         if reverb_channels is None:             # <<<<<<<<<<<<<<
 *             reverb_channels = 0
 * 
 */
    }

    /* "pysndlib/clm.pyx":5150
 *             reverb_channels = 0
 * 
 *         res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, NULL, reverb_channels, NULL, <cclm.mus_interp_t>interp_type))             # <<<<<<<<<<<<<<
 *         cclm.mus_locsig_set_detour(res._ptr, <cclm.detour_cb>locsig_detour_callback_func)
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_channels); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5150, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_reverb_channels); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5150, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_vtabptr_8pysndlib_3clm_mus_any->from_ptr(mus_make_locsig(__pyx_v_degree, __pyx_v_distance, __pyx_v_reverb, __pyx_t_5, NULL, __pyx_t_6, NULL, ((mus_interp_t)__pyx_v_interp_type)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5151
 * 
 *         res = mus_any.from_ptr(cclm.mus_make_locsig(degree, distance, reverb, channels, NULL, reverb_channels, NULL, <cclm.mus_interp_t>interp_type))
 *         cclm.mus_locsig_set_detour(res._ptr, <cclm.detour_cb>locsig_detour_callback_func)             # <<<<<<<<<<<<<<
 * 
 *         return res
 */
    mus_locsig_set_detour(__pyx_v_res->_ptr, ((detour_cb)__pyx_f_8pysndlib_3clm_locsig_detour_callback_func));

    /* "pysndlib/clm.pyx":5153
 *         cclm.mus_locsig_set_detour(res._ptr, <cclm.detour_cb>locsig_detour_callback_func)
 * 
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_res);
    __pyx_r = __pyx_v_res;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5146
 * 
 *     # todo: what if revout is not an iterable? while possible not going to deal with it right now :)
 *     elif is_list_or_ndarray(output):             # <<<<<<<<<<<<<<
 *         if reverb_channels is None:
 *             reverb_channels = 0
 */
  }

  /* "pysndlib/clm.pyx":5156
 * 
 *     else:
 *         raise TypeError(f"output needs to be a clm gen or np.array not a {type(output)}")             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double locsig(mus_any gen, cython.long loc, cython.double val):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_output)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_output_needs_to_be_a_clm_gen_or, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 5156, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":5100
 * 
 * # --------------- locsig ---------------- #
 * cpdef mus_any make_locsig(cython.double degree=0.0, cython.double distance=1., cython.double reverb=0.0, output=None, revout=None, channels=None, reverb_channels=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_rout);
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_revout);
  __Pyx_XDECREF(__pyx_v_channels);
  __Pyx_XDECREF(__pyx_v_reverb_channels);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_543make_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_542make_locsig, "\n    return a new generator for signal placement \\in n channels.  channel 0 corresponds to 0 degrees.\n    \n    :param degree: degree to place sound\n    :param distance: distance, 1.0 or greater\n    :param reverb: reverb amount\n    :param output: output to write 'dry' signal to. can be an appropriately shaped np.ndarray or sample2file\n    :param revout: output to write 'wet' signal to. can be an appropriately shaped np.ndarray or sample2file\n    :param channels: number of main channels\n    :param reverb_channels: number of channels for reverb\n    :param interp_type: interpolation of position. can be Interp.LINEAR, Interp.SINUSOIDAL\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_543make_locsig = {"make_locsig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_543make_locsig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_542make_locsig};
static PyObject *__pyx_pw_8pysndlib_3clm_543make_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_degree;
  double __pyx_v_distance;
  double __pyx_v_reverb;
  PyObject *__pyx_v_output = 0;
  PyObject *__pyx_v_revout = 0;
  PyObject *__pyx_v_channels = 0;
  PyObject *__pyx_v_reverb_channels = 0;
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_locsig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_degree,&__pyx_n_s_distance,&__pyx_n_s_reverb,&__pyx_n_s_output,&__pyx_n_s_revout,&__pyx_n_s_channels,&__pyx_n_s_reverb_channels,&__pyx_n_s_interp_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_degree);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_distance);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverb);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_revout);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_channels);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverb_channels);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_locsig") < 0)) __PYX_ERR(0, 5100, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_degree = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_degree == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
    } else {
      __pyx_v_degree = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_distance = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_distance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
    } else {
      __pyx_v_distance = ((double)1.);
    }
    if (values[2]) {
      __pyx_v_reverb = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_reverb == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
    } else {
      __pyx_v_reverb = ((double)0.0);
    }
    __pyx_v_output = values[3];
    __pyx_v_revout = values[4];
    __pyx_v_channels = values[5];
    __pyx_v_reverb_channels = values[6];
    if (values[7]) {
      __pyx_v_interp_type = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(values[7])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
    } else {
      __pyx_v_interp_type = __pyx_k__61;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_locsig", 0, 0, 8, __pyx_nargs); __PYX_ERR(0, 5100, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_542make_locsig(__pyx_self, __pyx_v_degree, __pyx_v_distance, __pyx_v_reverb, __pyx_v_output, __pyx_v_revout, __pyx_v_channels, __pyx_v_reverb_channels, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_542make_locsig(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_degree, double __pyx_v_distance, double __pyx_v_reverb, PyObject *__pyx_v_output, PyObject *__pyx_v_revout, PyObject *__pyx_v_channels, PyObject *__pyx_v_reverb_channels, enum __pyx_t_8pysndlib_3clm_Interp __pyx_v_interp_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_locsig __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_locsig", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 8;
  __pyx_t_2.degree = __pyx_v_degree;
  __pyx_t_2.distance = __pyx_v_distance;
  __pyx_t_2.reverb = __pyx_v_reverb;
  __pyx_t_2.output = __pyx_v_output;
  __pyx_t_2.revout = __pyx_v_revout;
  __pyx_t_2.channels = __pyx_v_channels;
  __pyx_t_2.reverb_channels = __pyx_v_reverb_channels;
  __pyx_t_2.interp_type = __pyx_v_interp_type;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_locsig(0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5158
 *         raise TypeError(f"output needs to be a clm gen or np.array not a {type(output)}")
 * 
 * cpdef cython.double locsig(mus_any gen, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     locsig 'gen' channel 'chan' scaler.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_545locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, double __pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5168
 *     :rtype: float
 *     """
 *     cclm.mus_locsig(gen._ptr, loc, val)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_locsig(mus_any gen):
 */
  mus_locsig(__pyx_v_gen->_ptr, __pyx_v_loc, __pyx_v_val);

  /* "pysndlib/clm.pyx":5158
 *         raise TypeError(f"output needs to be a clm gen or np.array not a {type(output)}")
 * 
 * cpdef cython.double locsig(mus_any gen, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     locsig 'gen' channel 'chan' scaler.
 */

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_545locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_544locsig, "\n    locsig 'gen' channel 'chan' scaler.\n    \n    :param gen: locsig gen\n    :param loc: location to write to \\in samples\n    :param val: sample value\n    :return: data\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_545locsig = {"locsig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_545locsig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_544locsig};
static PyObject *__pyx_pw_8pysndlib_3clm_545locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  long __pyx_v_loc;
  double __pyx_v_val;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("locsig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_loc,&__pyx_n_s_val,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig", 1, 3, 3, 1); __PYX_ERR(0, 5158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig", 1, 3, 3, 2); __PYX_ERR(0, 5158, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "locsig") < 0)) __PYX_ERR(0, 5158, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_loc = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_loc == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
    __pyx_v_val = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("locsig", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5158, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5158, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_544locsig(__pyx_self, __pyx_v_gen, __pyx_v_loc, __pyx_v_val);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_544locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, long __pyx_v_loc, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_locsig(__pyx_v_gen, __pyx_v_loc, __pyx_v_val, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5170
 *     cclm.mus_locsig(gen._ptr, loc, val)
 * 
 * cpdef bint is_locsig(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a locsig.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_547is_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;

  /* "pysndlib/clm.pyx":5178
 *     :rtype: bool
 *     """
 *     return cclm.mus_is_locsig(gen._ptr)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double locsig_ref(mus_any gen, cython.int chan):
 */
  __pyx_r = mus_is_locsig(__pyx_v_gen->_ptr);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5170
 *     cclm.mus_locsig(gen._ptr, loc, val)
 * 
 * cpdef bint is_locsig(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a locsig.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_547is_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_546is_locsig, "\n    returns True if gen is a locsig.\n    \n    :param gen: gen\n    :return: result\n    :rtype: bool\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_547is_locsig = {"is_locsig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_547is_locsig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_546is_locsig};
static PyObject *__pyx_pw_8pysndlib_3clm_547is_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_locsig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5170, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_locsig") < 0)) __PYX_ERR(0, 5170, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_locsig", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5170, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5170, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_546is_locsig(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_546is_locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_locsig", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_locsig(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5170, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5180
 *     return cclm.mus_is_locsig(gen._ptr)
 * 
 * cpdef cython.double locsig_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig 'gen' channel 'chan' scaler for main output.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_549locsig_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_ref(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5189
 *     :rtype: float
 *     """
 *     return cclm.mus_locsig_ref(gen._ptr, chan)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double locsig_set(mus_any gen, cython.int chan, cython.double val):
 */
  __pyx_r = mus_locsig_ref(__pyx_v_gen->_ptr, __pyx_v_chan);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5180
 *     return cclm.mus_is_locsig(gen._ptr)
 * 
 * cpdef cython.double locsig_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig 'gen' channel 'chan' scaler for main output.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_549locsig_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_548locsig_ref, "\n    get locsig 'gen' channel 'chan' scaler for main output.\n    \n    :param gen: locsig gen\n    :param chan: channel to get\n    :return: scaler of chan\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_549locsig_ref = {"locsig_ref", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_549locsig_ref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_548locsig_ref};
static PyObject *__pyx_pw_8pysndlib_3clm_549locsig_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  int __pyx_v_chan;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("locsig_ref (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_chan,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5180, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5180, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_ref", 1, 2, 2, 1); __PYX_ERR(0, 5180, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "locsig_ref") < 0)) __PYX_ERR(0, 5180, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_chan = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5180, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("locsig_ref", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5180, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.locsig_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5180, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_548locsig_ref(__pyx_self, __pyx_v_gen, __pyx_v_chan);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_548locsig_ref(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig_ref", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_locsig_ref(__pyx_v_gen, __pyx_v_chan, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5180, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.locsig_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5191
 *     return cclm.mus_locsig_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig generator's channel 'chan' scaler to 'val'  for main output.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_551locsig_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_set(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5201
 *     :rtype: float
 *     """
 *     return cclm.mus_locsig_set(gen._ptr, chan, val)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double locsig_reverb_ref(mus_any gen, cython.int chan):
 */
  __pyx_r = mus_locsig_set(__pyx_v_gen->_ptr, __pyx_v_chan, __pyx_v_val);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5191
 *     return cclm.mus_locsig_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig generator's channel 'chan' scaler to 'val'  for main output.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_551locsig_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_550locsig_set, "\n    set the locsig generator's channel 'chan' scaler to 'val'  for main output.\n    \n    :param gen: locsig gen\n    :param chan: channel to set\n    :param val: value to set to\n    :return: scaler of chan\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_551locsig_set = {"locsig_set", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_551locsig_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_550locsig_set};
static PyObject *__pyx_pw_8pysndlib_3clm_551locsig_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  int __pyx_v_chan;
  double __pyx_v_val;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("locsig_set (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_chan,&__pyx_n_s_val,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_set", 1, 3, 3, 1); __PYX_ERR(0, 5191, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_set", 1, 3, 3, 2); __PYX_ERR(0, 5191, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "locsig_set") < 0)) __PYX_ERR(0, 5191, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_chan = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L3_error)
    __pyx_v_val = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("locsig_set", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5191, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.locsig_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5191, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_550locsig_set(__pyx_self, __pyx_v_gen, __pyx_v_chan, __pyx_v_val);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_550locsig_set(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig_set", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_locsig_set(__pyx_v_gen, __pyx_v_chan, __pyx_v_val, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5191, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.locsig_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5203
 *     return cclm.mus_locsig_set(gen._ptr, chan, val)
 * 
 * cpdef cython.double locsig_reverb_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig reverb channel 'chan' scaler.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_553locsig_reverb_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_reverb_ref(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5213
 * 
 *     """
 *     return cclm.mus_locsig_reverb_ref(gen._ptr, chan)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double locsig_reverb_set(mus_any gen, cython.int chan, cython.double val):
 */
  __pyx_r = mus_locsig_reverb_ref(__pyx_v_gen->_ptr, __pyx_v_chan);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5203
 *     return cclm.mus_locsig_set(gen._ptr, chan, val)
 * 
 * cpdef cython.double locsig_reverb_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig reverb channel 'chan' scaler.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_553locsig_reverb_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_552locsig_reverb_ref, "\n    get locsig reverb channel 'chan' scaler.\n    \n    :param gen: locsig gen\n    :param chan: channel to get\n    :return: scaler of chan\n    :rtype: float\n    \n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_553locsig_reverb_ref = {"locsig_reverb_ref", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_553locsig_reverb_ref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_552locsig_reverb_ref};
static PyObject *__pyx_pw_8pysndlib_3clm_553locsig_reverb_ref(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  int __pyx_v_chan;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("locsig_reverb_ref (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_chan,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5203, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5203, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_reverb_ref", 1, 2, 2, 1); __PYX_ERR(0, 5203, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "locsig_reverb_ref") < 0)) __PYX_ERR(0, 5203, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_chan = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5203, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("locsig_reverb_ref", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5203, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.locsig_reverb_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5203, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_552locsig_reverb_ref(__pyx_self, __pyx_v_gen, __pyx_v_chan);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_552locsig_reverb_ref(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig_reverb_ref", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_locsig_reverb_ref(__pyx_v_gen, __pyx_v_chan, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5203, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.locsig_reverb_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5215
 *     return cclm.mus_locsig_reverb_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_reverb_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig reverb channel 'chan' scaler to 'val'.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_555locsig_reverb_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_locsig_reverb_set(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5225
 *     :rtype: float
 *     """
 *     return cclm.mus_locsig_reverb_set(gen._ptr, chan, val)             # <<<<<<<<<<<<<<
 * 
 * cpdef move_locsig(mus_any gen,  cython.double degree, cython.double distance):
 */
  __pyx_r = mus_locsig_reverb_set(__pyx_v_gen->_ptr, __pyx_v_chan, __pyx_v_val);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5215
 *     return cclm.mus_locsig_reverb_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_reverb_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig reverb channel 'chan' scaler to 'val'.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_555locsig_reverb_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_554locsig_reverb_set, "\n    set the locsig reverb channel 'chan' scaler to 'val'.\n    \n    :param gen: locsig gen\n    :param chan: channel to set\n    :param val: value to set to\n    :return: scaler of chan\n    :rtype: float\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_555locsig_reverb_set = {"locsig_reverb_set", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_555locsig_reverb_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_554locsig_reverb_set};
static PyObject *__pyx_pw_8pysndlib_3clm_555locsig_reverb_set(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  int __pyx_v_chan;
  double __pyx_v_val;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("locsig_reverb_set (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_chan,&__pyx_n_s_val,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_reverb_set", 1, 3, 3, 1); __PYX_ERR(0, 5215, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("locsig_reverb_set", 1, 3, 3, 2); __PYX_ERR(0, 5215, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "locsig_reverb_set") < 0)) __PYX_ERR(0, 5215, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_chan = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_chan == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L3_error)
    __pyx_v_val = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("locsig_reverb_set", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5215, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.locsig_reverb_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5215, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_554locsig_reverb_set(__pyx_self, __pyx_v_gen, __pyx_v_chan, __pyx_v_val);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_554locsig_reverb_set(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, int __pyx_v_chan, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("locsig_reverb_set", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_locsig_reverb_set(__pyx_v_gen, __pyx_v_chan, __pyx_v_val, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5215, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.locsig_reverb_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5227
 *     return cclm.mus_locsig_reverb_set(gen._ptr, chan, val)
 * 
 * cpdef move_locsig(mus_any gen,  cython.double degree, cython.double distance):             # <<<<<<<<<<<<<<
 *     """
 *     move locsig gen to reflect degree and distance.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_557move_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_move_locsig(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_degree, double __pyx_v_distance, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move_locsig", 1);

  /* "pysndlib/clm.pyx":5235
 *     :param distance: new distance
 *     """
 *     cclm.mus_move_locsig(gen._ptr, degree, distance)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  mus_move_locsig(__pyx_v_gen->_ptr, __pyx_v_degree, __pyx_v_distance);

  /* "pysndlib/clm.pyx":5227
 *     return cclm.mus_locsig_reverb_set(gen._ptr, chan, val)
 * 
 * cpdef move_locsig(mus_any gen,  cython.double degree, cython.double distance):             # <<<<<<<<<<<<<<
 *     """
 *     move locsig gen to reflect degree and distance.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_557move_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_556move_locsig, "\n    move locsig gen to reflect degree and distance.\n    \n    :param gen: locsig gen\n    :param degree: new degree\n    :param distance: new distance\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_557move_locsig = {"move_locsig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_557move_locsig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_556move_locsig};
static PyObject *__pyx_pw_8pysndlib_3clm_557move_locsig(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_degree;
  double __pyx_v_distance;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move_locsig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_degree,&__pyx_n_s_distance,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5227, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5227, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("move_locsig", 1, 3, 3, 1); __PYX_ERR(0, 5227, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_distance)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5227, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("move_locsig", 1, 3, 3, 2); __PYX_ERR(0, 5227, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "move_locsig") < 0)) __PYX_ERR(0, 5227, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_degree = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_degree == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5227, __pyx_L3_error)
    __pyx_v_distance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_distance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5227, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("move_locsig", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5227, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.move_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5227, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_556move_locsig(__pyx_self, __pyx_v_gen, __pyx_v_degree, __pyx_v_distance);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_556move_locsig(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_degree, double __pyx_v_distance) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("move_locsig", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_move_locsig(__pyx_v_gen, __pyx_v_degree, __pyx_v_distance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.move_locsig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5239
 * 
 * # added some options . todo: what about sample rate conversion
 * cpdef convolve_files(str file1, str file2, cython.double maxamp=1., str outputfile='test.aif', sample_type=None, header_type=None):             # <<<<<<<<<<<<<<
 *     """
 *     convolve-files handles a very common special case: convolve two files, then normalize the result to some maxamp.
 */

static PyObject *__pyx_pw_8pysndlib_3clm_559convolve_files(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_convolve_files(PyObject *__pyx_v_file1, PyObject *__pyx_v_file2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolve_files *__pyx_optional_args) {
  double __pyx_v_maxamp = ((double)1.);
  PyObject *__pyx_v_outputfile = ((PyObject*)__pyx_kp_u_test_aif);
  PyObject *__pyx_v_sample_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_header_type = ((PyObject *)Py_None);
  PyObject *__pyx_v_temp_file = NULL;
  long __pyx_v_length;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_reader = NULL;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  char const *__pyx_t_14;
  long __pyx_t_15;
  long __pyx_t_16;
  long __pyx_t_17;
  double __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convolve_files", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_maxamp = __pyx_optional_args->maxamp;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_outputfile = __pyx_optional_args->outputfile;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_sample_type = __pyx_optional_args->sample_type;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_header_type = __pyx_optional_args->header_type;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_sample_type);
  __Pyx_INCREF(__pyx_v_header_type);

  /* "pysndlib/clm.pyx":5252
 *     :rtype: str
 *     """
 *     sample_type = sample_type or default.sample_type             # <<<<<<<<<<<<<<
 *     header_type = header_type or default.header_type
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sample_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5252, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_sample_type);
    __pyx_t_1 = __pyx_v_sample_type;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sample_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_sample_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5253
 *     """
 *     sample_type = sample_type or default.sample_type
 *     header_type = header_type or default.header_type             # <<<<<<<<<<<<<<
 * 
 *     if header_type == Header.NEXT:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_header_type); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5253, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_header_type);
    __pyx_t_1 = __pyx_v_header_type;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_header_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_header_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5255
 *     header_type = header_type or default.header_type
 * 
 *     if header_type == Header.NEXT:             # <<<<<<<<<<<<<<
 *         cclm.mus_convolve_files(file1, file2, maxamp,outputfile)
 *     else:
 */
  __pyx_t_1 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(__pyx_e_8pysndlib_6sndlib_NEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_header_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5256
 * 
 *     if header_type == Header.NEXT:
 *         cclm.mus_convolve_files(file1, file2, maxamp,outputfile)             # <<<<<<<<<<<<<<
 *     else:
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_file1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 5256, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_file2); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 5256, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_outputfile); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 5256, __pyx_L1_error)
    mus_convolve_files(__pyx_t_5, __pyx_t_6, __pyx_v_maxamp, __pyx_t_7);

    /* "pysndlib/clm.pyx":5255
 *     header_type = header_type or default.header_type
 * 
 *     if header_type == Header.NEXT:             # <<<<<<<<<<<<<<
 *         cclm.mus_convolve_files(file1, file2, maxamp,outputfile)
 *     else:
 */
    goto __pyx_L7;
  }

  /* "pysndlib/clm.pyx":5258
 *         cclm.mus_convolve_files(file1, file2, maxamp,outputfile)
 *     else:
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile             # <<<<<<<<<<<<<<
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tempfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gettempdir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__62); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_temp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_outputfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_temp_file = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":5259
 *     else:
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)             # <<<<<<<<<<<<<<
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_file1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 5259, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_file2); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 5259, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_temp_file); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 5259, __pyx_L1_error)
    mus_convolve_files(__pyx_t_5, __pyx_t_6, __pyx_v_maxamp, __pyx_t_7);

    /* "pysndlib/clm.pyx":5260
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):             # <<<<<<<<<<<<<<
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 *             reader = make_readin(temp_file)
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Sound); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_outputfile);
      __Pyx_GIVEREF(__pyx_v_outputfile);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_outputfile)) __PYX_ERR(0, 5260, __pyx_L1_error);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_header_type, __pyx_v_header_type) < 0) __PYX_ERR(0, 5260, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sample_type, __pyx_v_sample_type) < 0) __PYX_ERR(0, 5260, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5260, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          /*try:*/ {

            /* "pysndlib/clm.pyx":5261
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))             # <<<<<<<<<<<<<<
 *             reader = make_readin(temp_file)
 *             for i in range(0, length):
 */
            __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_temp_file); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 5261, __pyx_L12_error)
            __pyx_t_15 = __pyx_f_8pysndlib_3clm_seconds2samples(mus_sound_duration(__pyx_t_14), 0); if (unlikely(__pyx_t_15 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5261, __pyx_L12_error)
            __pyx_v_length = __pyx_t_15;

            /* "pysndlib/clm.pyx":5262
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 *             reader = make_readin(temp_file)             # <<<<<<<<<<<<<<
 *             for i in range(0, length):
 *                 outa(i, readin(reader))
 */
            if (!(likely(PyUnicode_CheckExact(__pyx_v_temp_file))||((__pyx_v_temp_file) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_temp_file))) __PYX_ERR(0, 5262, __pyx_L12_error)
            __pyx_t_9 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_readin(((PyObject*)__pyx_v_temp_file), 0, NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5262, __pyx_L12_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_reader = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "pysndlib/clm.pyx":5263
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 *             reader = make_readin(temp_file)
 *             for i in range(0, length):             # <<<<<<<<<<<<<<
 *                 outa(i, readin(reader))
 *     return outputfile
 */
            __pyx_t_15 = __pyx_v_length;
            __pyx_t_16 = __pyx_t_15;
            for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
              __pyx_v_i = __pyx_t_17;

              /* "pysndlib/clm.pyx":5264
 *             reader = make_readin(temp_file)
 *             for i in range(0, length):
 *                 outa(i, readin(reader))             # <<<<<<<<<<<<<<
 *     return outputfile
 * 
 */
              __pyx_t_18 = __pyx_f_8pysndlib_3clm_readin(__pyx_v_reader, 0); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5264, __pyx_L12_error)
              __pyx_t_9 = __pyx_f_8pysndlib_3clm_outa(__pyx_v_i, __pyx_t_18, 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5264, __pyx_L12_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }

            /* "pysndlib/clm.pyx":5260
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):             # <<<<<<<<<<<<<<
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 *             reader = make_readin(temp_file)
 */
          }
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L17_try_end;
          __pyx_L12_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("pysndlib.clm.convolve_files", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 5260, __pyx_L14_except_error)
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __pyx_t_4 = PyTuple_Pack(3, __pyx_t_9, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5260, __pyx_L14_except_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5260, __pyx_L14_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (__pyx_t_2 < 0) __PYX_ERR(0, 5260, __pyx_L14_except_error)
            __pyx_t_20 = (!__pyx_t_2);
            if (unlikely(__pyx_t_20)) {
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_XGIVEREF(__pyx_t_3);
              __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_1, __pyx_t_3);
              __pyx_t_9 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
              __PYX_ERR(0, 5260, __pyx_L14_except_error)
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L13_exception_handled;
          }
          __pyx_L14_except_error:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          goto __pyx_L1_error;
          __pyx_L13_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          __pyx_L17_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_10) {
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__63, NULL);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5260, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
      goto __pyx_L23;
      __pyx_L8_error:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L1_error;
      __pyx_L23:;
    }
  }
  __pyx_L7:;

  /* "pysndlib/clm.pyx":5265
 *             for i in range(0, length):
 *                 outa(i, readin(reader))
 *     return outputfile             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_outputfile);
  __pyx_r = __pyx_v_outputfile;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5239
 * 
 * # added some options . todo: what about sample rate conversion
 * cpdef convolve_files(str file1, str file2, cython.double maxamp=1., str outputfile='test.aif', sample_type=None, header_type=None):             # <<<<<<<<<<<<<<
 *     """
 *     convolve-files handles a very common special case: convolve two files, then normalize the result to some maxamp.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysndlib.clm.convolve_files", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_temp_file);
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_sample_type);
  __Pyx_XDECREF(__pyx_v_header_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_559convolve_files(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_558convolve_files, "\n    convolve-files handles a very common special case: convolve two files, then normalize the result to some maxamp.\n    \n    :param file1: first file\n    :param file2: second file\n    :param maxamp: amp to scale to\n    :param outputfile: output file\n    :param sample_type: type of sample type to use. defaults to clm.sample_type\n    :param header_type: header of sample type to use. defaults to clm.header_type\n    :return: output file \n    :rtype: str\n    ");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_559convolve_files = {"convolve_files", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_559convolve_files, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_558convolve_files};
static PyObject *__pyx_pw_8pysndlib_3clm_559convolve_files(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file1 = 0;
  PyObject *__pyx_v_file2 = 0;
  double __pyx_v_maxamp;
  PyObject *__pyx_v_outputfile = 0;
  PyObject *__pyx_v_sample_type = 0;
  PyObject *__pyx_v_header_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convolve_files (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file1,&__pyx_n_s_file2,&__pyx_n_s_maxamp_2,&__pyx_n_s_outputfile,&__pyx_n_s_sample_type,&__pyx_n_s_header_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)__pyx_kp_u_test_aif));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_file1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_file2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("convolve_files", 0, 2, 6, 1); __PYX_ERR(0, 5239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxamp_2);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_outputfile);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convolve_files") < 0)) __PYX_ERR(0, 5239, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file1 = ((PyObject*)values[0]);
    __pyx_v_file2 = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_maxamp = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_maxamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5239, __pyx_L3_error)
    } else {
      __pyx_v_maxamp = ((double)1.);
    }
    __pyx_v_outputfile = ((PyObject*)values[3]);
    __pyx_v_sample_type = values[4];
    __pyx_v_header_type = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convolve_files", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 5239, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.convolve_files", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file1), (&PyUnicode_Type), 1, "file1", 1))) __PYX_ERR(0, 5239, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file2), (&PyUnicode_Type), 1, "file2", 1))) __PYX_ERR(0, 5239, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_outputfile), (&PyUnicode_Type), 1, "outputfile", 1))) __PYX_ERR(0, 5239, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_558convolve_files(__pyx_self, __pyx_v_file1, __pyx_v_file2, __pyx_v_maxamp, __pyx_v_outputfile, __pyx_v_sample_type, __pyx_v_header_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_558convolve_files(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file1, PyObject *__pyx_v_file2, double __pyx_v_maxamp, PyObject *__pyx_v_outputfile, PyObject *__pyx_v_sample_type, PyObject *__pyx_v_header_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_convolve_files __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convolve_files", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.maxamp = __pyx_v_maxamp;
  __pyx_t_2.outputfile = __pyx_v_outputfile;
  __pyx_t_2.sample_type = __pyx_v_sample_type;
  __pyx_t_2.header_type = __pyx_v_header_type;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_convolve_files(__pyx_v_file1, __pyx_v_file2, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.convolve_files", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5275
 * # --------------- dcblock ---------------- #
 * 
 * cpdef mus_any make_dcblock():             # <<<<<<<<<<<<<<
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_561make_dcblock(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_dcblock(CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_dcblock", 1);

  /* "pysndlib/clm.pyx":5276
 * 
 * cpdef mus_any make_dcblock():
 *     return make_filter(2, [1,-1], [1, -.99])             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 5276, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_neg_1)) __PYX_ERR(0, 5276, __pyx_L1_error);
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 5276, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_neg__99);
  __Pyx_GIVEREF(__pyx_float_neg__99);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_float_neg__99)) __PYX_ERR(0, 5276, __pyx_L1_error);
  __pyx_t_3 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_filter(2, __pyx_t_1, __pyx_t_2, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5275
 * # --------------- dcblock ---------------- #
 * 
 * cpdef mus_any make_dcblock():             # <<<<<<<<<<<<<<
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.make_dcblock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_561make_dcblock(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_561make_dcblock = {"make_dcblock", (PyCFunction)__pyx_pw_8pysndlib_3clm_561make_dcblock, METH_NOARGS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_561make_dcblock(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_dcblock (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_560make_dcblock(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_560make_dcblock(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_dcblock", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_dcblock(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_dcblock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5278
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_563dcblock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_dcblock(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":5279
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):
 *     return filter(gen, insig)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filter(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5279, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5278
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.dcblock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_563dcblock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_563dcblock = {"dcblock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_563dcblock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_563dcblock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dcblock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("dcblock", 1, 2, 2, 1); __PYX_ERR(0, 5278, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dcblock") < 0)) __PYX_ERR(0, 5278, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dcblock", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5278, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.dcblock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5278, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_562dcblock(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_562dcblock(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dcblock", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_dcblock(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.dcblock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5284
 * # --------------- biquad ---------------- #
 * 
 * cpdef mus_any make_biquad(cython.double a0, cython.double a1, cython.double a2, cython.double b1, cython.double b2):             # <<<<<<<<<<<<<<
 *     """returns a biquad filter (use with the CLM filter gen)"""
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 */

static PyObject *__pyx_pw_8pysndlib_3clm_565make_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad(double __pyx_v_a0, double __pyx_v_a1, double __pyx_v_a2, double __pyx_v_b1, double __pyx_v_b2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad", 1);

  /* "pysndlib/clm.pyx":5286
 * cpdef mus_any make_biquad(cython.double a0, cython.double a1, cython.double a2, cython.double b1, cython.double b2):
 *     """returns a biquad filter (use with the CLM filter gen)"""
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_a0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_a1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_a2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_b1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_b2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_0)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_4)) __PYX_ERR(0, 5286, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_filter(3, __pyx_t_1, __pyx_t_3, 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5284
 * # --------------- biquad ---------------- #
 * 
 * cpdef mus_any make_biquad(cython.double a0, cython.double a1, cython.double a2, cython.double b1, cython.double b2):             # <<<<<<<<<<<<<<
 *     """returns a biquad filter (use with the CLM filter gen)"""
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_565make_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_8pysndlib_3clm_564make_biquad, "returns a biquad filter (use with the CLM filter gen)");
static PyMethodDef __pyx_mdef_8pysndlib_3clm_565make_biquad = {"make_biquad", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_565make_biquad, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8pysndlib_3clm_564make_biquad};
static PyObject *__pyx_pw_8pysndlib_3clm_565make_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  double __pyx_v_b1;
  double __pyx_v_b2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a0,&__pyx_n_s_a1,&__pyx_n_s_a2_2,&__pyx_n_s_b1,&__pyx_n_s_b2_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a0)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad", 1, 5, 5, 1); __PYX_ERR(0, 5284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a2_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad", 1, 5, 5, 2); __PYX_ERR(0, 5284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_b1)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad", 1, 5, 5, 3); __PYX_ERR(0, 5284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_b2_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad", 1, 5, 5, 4); __PYX_ERR(0, 5284, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad") < 0)) __PYX_ERR(0, 5284, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
      values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
    }
    __pyx_v_a0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
    __pyx_v_a1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_a1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
    __pyx_v_a2 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_a2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
    __pyx_v_b1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_b1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
    __pyx_v_b2 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_b2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5284, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 5284, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_564make_biquad(__pyx_self, __pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_564make_biquad(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a0, double __pyx_v_a1, double __pyx_v_a2, double __pyx_v_b1, double __pyx_v_b2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5288
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_567biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_biquad(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":5289
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):
 *     return filter(gen, insig)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint is_biquad(mus_any gen):
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_filter(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5289, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5288
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_567biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_567biquad = {"biquad", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_567biquad, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_567biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_insig;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("biquad (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_insig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5288, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_insig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5288, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("biquad", 1, 2, 2, 1); __PYX_ERR(0, 5288, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "biquad") < 0)) __PYX_ERR(0, 5288, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_insig = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_insig == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5288, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("biquad", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5288, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5288, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_566biquad(__pyx_self, __pyx_v_gen, __pyx_v_insig);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_566biquad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_insig) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("biquad", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_biquad(__pyx_v_gen, __pyx_v_insig, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5288, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5291
 *     return filter(gen, insig)
 * 
 * cpdef bint is_biquad(mus_any gen):             # <<<<<<<<<<<<<<
 *     return is_filter(gen) and (gen.mus_order == 3)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_569is_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_8pysndlib_3clm_is_biquad(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_biquad", 1);

  /* "pysndlib/clm.pyx":5292
 * 
 * cpdef bint is_biquad(mus_any gen):
 *     return is_filter(gen) and (gen.mus_order == 3)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_is_filter(__pyx_v_gen, 0); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5292, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_order); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_3, 3, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5291
 *     return filter(gen, insig)
 * 
 * cpdef bint is_biquad(mus_any gen):             # <<<<<<<<<<<<<<
 *     return is_filter(gen) and (gen.mus_order == 3)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.is_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_569is_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_569is_biquad = {"is_biquad", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_569is_biquad, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_569is_biquad(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_biquad (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5291, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_biquad") < 0)) __PYX_ERR(0, 5291, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_biquad", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5291, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5291, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_568is_biquad(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_568is_biquad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_biquad", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_biquad(__pyx_v_gen, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5291, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_biquad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5295
 * 
 * 
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0
 */

static PyObject *__pyx_pw_8pysndlib_3clm_571make_biquad_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_notch(double __pyx_v_fc, double __pyx_v_radius, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  double __pyx_v_b1;
  double __pyx_v_b2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_notch", 1);

  /* "pysndlib/clm.pyx":5296
 * 
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double a0 = 1.0
 *     cdef cython.double a1 = 2.0 * radius * math.cos((np.pi*2) * fc /  sr)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5296, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5297
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = 2.0 * radius * math.cos((np.pi*2) * fc /  sr)
 *     cdef cython.double a2 = radius * radius
 */
  __pyx_v_a0 = 1.0;

  /* "pysndlib/clm.pyx":5298
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0
 *     cdef cython.double a1 = 2.0 * radius * math.cos((np.pi*2) * fc /  sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = radius * radius
 *     cdef cython.double b1 = 0.0
 */
  __pyx_t_2 = PyFloat_FromDouble((2.0 * __pyx_v_radius)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pi); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_MultiplyObjC(__pyx_t_6, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_a1 = __pyx_t_1;

  /* "pysndlib/clm.pyx":5299
 *     cdef cython.double a0 = 1.0
 *     cdef cython.double a1 = 2.0 * radius * math.cos((np.pi*2) * fc /  sr)
 *     cdef cython.double a2 = radius * radius             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 0.0
 *     cdef cython.double b2 = 0.0
 */
  __pyx_v_a2 = (__pyx_v_radius * __pyx_v_radius);

  /* "pysndlib/clm.pyx":5300
 *     cdef cython.double a1 = 2.0 * radius * math.cos((np.pi*2) * fc /  sr)
 *     cdef cython.double a2 = radius * radius
 *     cdef cython.double b1 = 0.0             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = 0.0
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_b1 = 0.0;

  /* "pysndlib/clm.pyx":5301
 *     cdef cython.double a2 = radius * radius
 *     cdef cython.double b1 = 0.0
 *     cdef cython.double b2 = 0.0             # <<<<<<<<<<<<<<
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 */
  __pyx_v_b2 = 0.0;

  /* "pysndlib/clm.pyx":5302
 *     cdef cython.double b1 = 0.0
 *     cdef cython.double b2 = 0.0
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5295
 * 
 * 
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_571make_biquad_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_571make_biquad_notch = {"make_biquad_notch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_571make_biquad_notch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_571make_biquad_notch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_radius;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_notch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_radius,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5295, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5295, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_notch", 1, 2, 2, 1); __PYX_ERR(0, 5295, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_notch") < 0)) __PYX_ERR(0, 5295, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5295, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5295, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_notch", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5295, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_570make_biquad_notch(__pyx_self, __pyx_v_fc, __pyx_v_radius);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_570make_biquad_notch(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_notch", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_notch(__pyx_v_fc, __pyx_v_radius, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_notch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5304
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_573make_biquad_low_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_low_pass(double __pyx_v_fc, double __pyx_v_q, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_k;
  double __pyx_v_ksqr;
  double __pyx_v_denom;
  double __pyx_v_b1;
  double __pyx_v_b2;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_low_pass", 1);

  /* "pysndlib/clm.pyx":5305
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5305, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5306
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "pysndlib/clm.pyx":5307
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k             # <<<<<<<<<<<<<<
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 */
  __pyx_v_ksqr = (__pyx_v_k * __pyx_v_k);

  /* "pysndlib/clm.pyx":5308
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 */
  __pyx_t_1 = (((__pyx_v_ksqr * __pyx_v_q) + __pyx_v_k) + __pyx_v_q);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5308, __pyx_L1_error)
  }
  __pyx_v_denom = (1.0 / __pyx_t_1);

  /* "pysndlib/clm.pyx":5309
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 */
  __pyx_v_b1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.0)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5310
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom             # <<<<<<<<<<<<<<
 * 
 *     cdef cython.double a0 = ksqr * q * denom
 */
  __pyx_v_b2 = ((((__pyx_v_ksqr * __pyx_v_q) - __pyx_v_k) + __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5312
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 *     cdef cython.double a0 = ksqr * q * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = 2 * a0
 *     cdef cython.double a2 = a0
 */
  __pyx_v_a0 = ((__pyx_v_ksqr * __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5313
 * 
 *     cdef cython.double a0 = ksqr * q * denom
 *     cdef cython.double a1 = 2 * a0             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = a0
 * 
 */
  __pyx_v_a1 = (2.0 * __pyx_v_a0);

  /* "pysndlib/clm.pyx":5314
 *     cdef cython.double a0 = ksqr * q * denom
 *     cdef cython.double a1 = 2 * a0
 *     cdef cython.double a2 = a0             # <<<<<<<<<<<<<<
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_a2 = __pyx_v_a0;

  /* "pysndlib/clm.pyx":5316
 *     cdef cython.double a2 = a0
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5304
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_low_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_573make_biquad_low_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_573make_biquad_low_pass = {"make_biquad_low_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_573make_biquad_low_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_573make_biquad_low_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_q;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_low_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_q,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5304, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5304, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_low_pass", 1, 2, 2, 1); __PYX_ERR(0, 5304, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_low_pass") < 0)) __PYX_ERR(0, 5304, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5304, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5304, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_low_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5304, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_low_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_572make_biquad_low_pass(__pyx_self, __pyx_v_fc, __pyx_v_q);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_572make_biquad_low_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_low_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_low_pass(__pyx_v_fc, __pyx_v_q, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_low_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5318
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_575make_biquad_high_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_high_pass(double __pyx_v_fc, double __pyx_v_q, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_k;
  double __pyx_v_ksqr;
  double __pyx_v_denom;
  double __pyx_v_b1;
  double __pyx_v_b2;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_high_pass", 1);

  /* "pysndlib/clm.pyx":5319
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5319, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5320
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "pysndlib/clm.pyx":5321
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k             # <<<<<<<<<<<<<<
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 */
  __pyx_v_ksqr = (__pyx_v_k * __pyx_v_k);

  /* "pysndlib/clm.pyx":5322
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 */
  __pyx_t_1 = (((__pyx_v_ksqr * __pyx_v_q) + __pyx_v_k) + __pyx_v_q);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5322, __pyx_L1_error)
  }
  __pyx_v_denom = (1.0 / __pyx_t_1);

  /* "pysndlib/clm.pyx":5323
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 */
  __pyx_v_b1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.0)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5324
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom             # <<<<<<<<<<<<<<
 * 
 *     cdef cython.double a0 = q * denom
 */
  __pyx_v_b2 = ((((__pyx_v_ksqr * __pyx_v_q) - __pyx_v_k) + __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5326
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 *     cdef cython.double a0 = q * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = -2 * a0
 *     cdef cython.double a2 = a0
 */
  __pyx_v_a0 = (__pyx_v_q * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5327
 * 
 *     cdef cython.double a0 = q * denom
 *     cdef cython.double a1 = -2 * a0             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = a0
 * 
 */
  __pyx_v_a1 = (-2.0 * __pyx_v_a0);

  /* "pysndlib/clm.pyx":5328
 *     cdef cython.double a0 = q * denom
 *     cdef cython.double a1 = -2 * a0
 *     cdef cython.double a2 = a0             # <<<<<<<<<<<<<<
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_a2 = __pyx_v_a0;

  /* "pysndlib/clm.pyx":5330
 *     cdef cython.double a2 = a0
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5318
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_high_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_575make_biquad_high_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_575make_biquad_high_pass = {"make_biquad_high_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_575make_biquad_high_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_575make_biquad_high_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_q;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_high_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_q,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5318, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5318, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_high_pass", 1, 2, 2, 1); __PYX_ERR(0, 5318, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_high_pass") < 0)) __PYX_ERR(0, 5318, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5318, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5318, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_high_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5318, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_high_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_574make_biquad_high_pass(__pyx_self, __pyx_v_fc, __pyx_v_q);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_574make_biquad_high_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_high_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_high_pass(__pyx_v_fc, __pyx_v_q, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_high_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5332
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_577make_biquad_band_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_band_pass(double __pyx_v_fc, double __pyx_v_q, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_k;
  double __pyx_v_ksqr;
  double __pyx_v_denom;
  double __pyx_v_b1;
  double __pyx_v_b2;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_band_pass", 1);

  /* "pysndlib/clm.pyx":5333
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5333, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5334
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "pysndlib/clm.pyx":5335
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k             # <<<<<<<<<<<<<<
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 */
  __pyx_v_ksqr = (__pyx_v_k * __pyx_v_k);

  /* "pysndlib/clm.pyx":5336
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 */
  __pyx_t_1 = (((__pyx_v_ksqr * __pyx_v_q) + __pyx_v_k) + __pyx_v_q);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5336, __pyx_L1_error)
  }
  __pyx_v_denom = (1.0 / __pyx_t_1);

  /* "pysndlib/clm.pyx":5337
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 */
  __pyx_v_b1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.0)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5338
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom             # <<<<<<<<<<<<<<
 * 
 *     cdef cython.double a0 = k * denom
 */
  __pyx_v_b2 = ((((__pyx_v_ksqr * __pyx_v_q) - __pyx_v_k) + __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5340
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 *     cdef cython.double a0 = k * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = 0.0
 *     cdef cython.double a2 = -a0
 */
  __pyx_v_a0 = (__pyx_v_k * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5341
 * 
 *     cdef cython.double a0 = k * denom
 *     cdef cython.double a1 = 0.0             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = -a0
 * 
 */
  __pyx_v_a1 = 0.0;

  /* "pysndlib/clm.pyx":5342
 *     cdef cython.double a0 = k * denom
 *     cdef cython.double a1 = 0.0
 *     cdef cython.double a2 = -a0             # <<<<<<<<<<<<<<
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_a2 = (-__pyx_v_a0);

  /* "pysndlib/clm.pyx":5344
 *     cdef cython.double a2 = -a0
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5332
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_577make_biquad_band_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_577make_biquad_band_pass = {"make_biquad_band_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_577make_biquad_band_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_577make_biquad_band_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_q;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_band_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_q,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5332, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5332, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_band_pass", 1, 2, 2, 1); __PYX_ERR(0, 5332, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_band_pass") < 0)) __PYX_ERR(0, 5332, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5332, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5332, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_band_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5332, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_576make_biquad_band_pass(__pyx_self, __pyx_v_fc, __pyx_v_q);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_576make_biquad_band_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_band_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_band_pass(__pyx_v_fc, __pyx_v_q, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5346
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_579make_biquad_band_reject(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_band_reject(double __pyx_v_fc, double __pyx_v_q, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_k;
  double __pyx_v_ksqr;
  double __pyx_v_denom;
  double __pyx_v_b1;
  double __pyx_v_b2;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_band_reject", 1);

  /* "pysndlib/clm.pyx":5347
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5347, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5348
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "pysndlib/clm.pyx":5349
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k             # <<<<<<<<<<<<<<
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 */
  __pyx_v_ksqr = (__pyx_v_k * __pyx_v_k);

  /* "pysndlib/clm.pyx":5350
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 */
  __pyx_t_1 = (((__pyx_v_ksqr * __pyx_v_q) + __pyx_v_k) + __pyx_v_q);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5350, __pyx_L1_error)
  }
  __pyx_v_denom = (1.0 / __pyx_t_1);

  /* "pysndlib/clm.pyx":5351
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 */
  __pyx_v_b1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.0)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5352
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom             # <<<<<<<<<<<<<<
 * 
 *     cdef cython.double a0 = q * (ksqr + 1.) * denom
 */
  __pyx_v_b2 = ((((__pyx_v_ksqr * __pyx_v_q) - __pyx_v_k) + __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5354
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 *     cdef cython.double a0 = q * (ksqr + 1.) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = 2.0 * q * (ksqr - 1.) * denom
 *     cdef cython.double a2 = a0
 */
  __pyx_v_a0 = ((__pyx_v_q * (__pyx_v_ksqr + 1.)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5355
 * 
 *     cdef cython.double a0 = q * (ksqr + 1.) * denom
 *     cdef cython.double a1 = 2.0 * q * (ksqr - 1.) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = a0
 * 
 */
  __pyx_v_a1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5356
 *     cdef cython.double a0 = q * (ksqr + 1.) * denom
 *     cdef cython.double a1 = 2.0 * q * (ksqr - 1.) * denom
 *     cdef cython.double a2 = a0             # <<<<<<<<<<<<<<
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_a2 = __pyx_v_a0;

  /* "pysndlib/clm.pyx":5358
 *     cdef cython.double a2 = a0
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5346
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_reject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_579make_biquad_band_reject(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_579make_biquad_band_reject = {"make_biquad_band_reject", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_579make_biquad_band_reject, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_579make_biquad_band_reject(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_q;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_band_reject (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_q,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5346, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5346, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_band_reject", 1, 2, 2, 1); __PYX_ERR(0, 5346, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_band_reject") < 0)) __PYX_ERR(0, 5346, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5346, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5346, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_band_reject", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5346, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_reject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_578make_biquad_band_reject(__pyx_self, __pyx_v_fc, __pyx_v_q);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_578make_biquad_band_reject(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_band_reject", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_band_reject(__pyx_v_fc, __pyx_v_q, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_band_reject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5360
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_581make_biquad_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_f_8pysndlib_3clm_make_biquad_all_pass(double __pyx_v_fc, double __pyx_v_q, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_sr;
  double __pyx_v_k;
  double __pyx_v_ksqr;
  double __pyx_v_denom;
  double __pyx_v_b1;
  double __pyx_v_b2;
  double __pyx_v_a0;
  double __pyx_v_a1;
  double __pyx_v_a2;
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_all_pass", 1);

  /* "pysndlib/clm.pyx":5361
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5361, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5362
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)             # <<<<<<<<<<<<<<
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "pysndlib/clm.pyx":5363
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k             # <<<<<<<<<<<<<<
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 */
  __pyx_v_ksqr = (__pyx_v_k * __pyx_v_k);

  /* "pysndlib/clm.pyx":5364
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)             # <<<<<<<<<<<<<<
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 */
  __pyx_t_1 = (((__pyx_v_ksqr * __pyx_v_q) + __pyx_v_k) + __pyx_v_q);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5364, __pyx_L1_error)
  }
  __pyx_v_denom = (1.0 / __pyx_t_1);

  /* "pysndlib/clm.pyx":5365
 *     cdef cython.double ksqr = k * k
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom             # <<<<<<<<<<<<<<
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 */
  __pyx_v_b1 = (((2.0 * __pyx_v_q) * (__pyx_v_ksqr - 1.0)) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5366
 *     cdef cython.double denom = 1.0 / (ksqr * q + k + q)
 *     cdef cython.double b1 = 2 * q * (ksqr - 1) * denom
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom             # <<<<<<<<<<<<<<
 * 
 *     cdef cython.double a0 = b2
 */
  __pyx_v_b2 = ((((__pyx_v_ksqr * __pyx_v_q) - __pyx_v_k) + __pyx_v_q) * __pyx_v_denom);

  /* "pysndlib/clm.pyx":5368
 *     cdef cython.double b2 = (ksqr * q - k + q) * denom
 * 
 *     cdef cython.double a0 = b2             # <<<<<<<<<<<<<<
 *     cdef cython.double a1 = b1
 *     cdef cython.double a2 = 1.
 */
  __pyx_v_a0 = __pyx_v_b2;

  /* "pysndlib/clm.pyx":5369
 * 
 *     cdef cython.double a0 = b2
 *     cdef cython.double a1 = b1             # <<<<<<<<<<<<<<
 *     cdef cython.double a2 = 1.
 * 
 */
  __pyx_v_a1 = __pyx_v_b1;

  /* "pysndlib/clm.pyx":5370
 *     cdef cython.double a0 = b2
 *     cdef cython.double a1 = b1
 *     cdef cython.double a2 = 1.             # <<<<<<<<<<<<<<
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)
 */
  __pyx_v_a2 = 1.;

  /* "pysndlib/clm.pyx":5372
 *     cdef cython.double a2 = 1.
 * 
 *     return make_biquad(a0, a1, a2, b1, b2)             # <<<<<<<<<<<<<<
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad(__pyx_v_a0, __pyx_v_a1, __pyx_v_a2, __pyx_v_b1, __pyx_v_b2, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5360
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_581make_biquad_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_581make_biquad_all_pass = {"make_biquad_all_pass", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_581make_biquad_all_pass, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_581make_biquad_all_pass(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_fc;
  double __pyx_v_q;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_biquad_all_pass (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fc,&__pyx_n_s_q,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5360, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5360, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("make_biquad_all_pass", 1, 2, 2, 1); __PYX_ERR(0, 5360, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_biquad_all_pass") < 0)) __PYX_ERR(0, 5360, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5360, __pyx_L3_error)
    __pyx_v_q = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_q == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5360, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_biquad_all_pass", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5360, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_580make_biquad_all_pass(__pyx_self, __pyx_v_fc, __pyx_v_q);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_580make_biquad_all_pass(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fc, double __pyx_v_q) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_biquad_all_pass", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_biquad_all_pass(__pyx_v_fc, __pyx_v_q, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_biquad_all_pass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5374
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius
 */

static PyObject *__pyx_pw_8pysndlib_3clm_583biquad_set_resonance(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_biquad_set_resonance(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fc, double __pyx_v_radius, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance *__pyx_optional_args) {
  int __pyx_v_normalize = ((int)0);
  double __pyx_v_sr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("biquad_set_resonance", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_normalize = __pyx_optional_args->normalize;
    }
  }

  /* "pysndlib/clm.pyx":5375
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):
 *     cdef cython.double sr = get_srate()             # <<<<<<<<<<<<<<
 *     gen.mus_ycoeffs[2] = radius * radius
 *     gen.mus_ycoeffs[1] = -2.0 * radius * math.cos((np.pi*2) * fc / sr)
 */
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5375, __pyx_L1_error)
  __pyx_v_sr = __pyx_t_1;

  /* "pysndlib/clm.pyx":5376
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius             # <<<<<<<<<<<<<<
 *     gen.mus_ycoeffs[1] = -2.0 * radius * math.cos((np.pi*2) * fc / sr)
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_radius * __pyx_v_radius)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 2, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5377
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius
 *     gen.mus_ycoeffs[1] = -2.0 * radius * math.cos((np.pi*2) * fc / sr)             # <<<<<<<<<<<<<<
 * 
 *     if normalize:
 */
  __pyx_t_2 = PyFloat_FromDouble((-2.0 * __pyx_v_radius)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pi); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_MultiplyObjC(__pyx_t_6, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_fc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_sr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":5379
 *     gen.mus_ycoeffs[1] = -2.0 * radius * math.cos((np.pi*2) * fc / sr)
 * 
 *     if normalize:             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[0] = .5 - .5 * gen.mus_ycoeffs[2]
 *         gen.mus_xcoeffs[1] = 0.0
 */
  if (__pyx_v_normalize) {

    /* "pysndlib/clm.pyx":5380
 * 
 *     if normalize:
 *         gen.mus_xcoeffs[0] = .5 - .5 * gen.mus_ycoeffs[2]             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[1] = 0.0
 *         gen.mus_xcoeffs[2] = -gen.mus_xcoeffs[0]
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_float__5, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyFloat_SubtractCObj(__pyx_float__5, __pyx_t_5, .5, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_5, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5380, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5381
 *     if normalize:
 *         gen.mus_xcoeffs[0] = .5 - .5 * gen.mus_ycoeffs[2]
 *         gen.mus_xcoeffs[1] = 0.0             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[2] = -gen.mus_xcoeffs[0]
 *     else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_float_0_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5381, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5382
 *         gen.mus_xcoeffs[0] = .5 - .5 * gen.mus_ycoeffs[2]
 *         gen.mus_xcoeffs[1] = 0.0
 *         gen.mus_xcoeffs[2] = -gen.mus_xcoeffs[0]             # <<<<<<<<<<<<<<
 *     else:
 *         gen.mus_xcoeffs[0] = 1.0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Negative(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_5, 2, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5382, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5379
 *     gen.mus_ycoeffs[1] = -2.0 * radius * math.cos((np.pi*2) * fc / sr)
 * 
 *     if normalize:             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[0] = .5 - .5 * gen.mus_ycoeffs[2]
 *         gen.mus_xcoeffs[1] = 0.0
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":5384
 *         gen.mus_xcoeffs[2] = -gen.mus_xcoeffs[0]
 *     else:
 *         gen.mus_xcoeffs[0] = 1.0             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[1] = 0.0
 *         gen.mus_xcoeffs[2] = 0.0
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 0, __pyx_float_1_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5384, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5385
 *     else:
 *         gen.mus_xcoeffs[0] = 1.0
 *         gen.mus_xcoeffs[1] = 0.0             # <<<<<<<<<<<<<<
 *         gen.mus_xcoeffs[2] = 0.0
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_float_0_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5385, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5386
 *         gen.mus_xcoeffs[0] = 1.0
 *         gen.mus_xcoeffs[1] = 0.0
 *         gen.mus_xcoeffs[2] = 0.0             # <<<<<<<<<<<<<<
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((__Pyx_SetItemInt(__pyx_t_3, 2, __pyx_float_0_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5386, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":5374
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_resonance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_583biquad_set_resonance(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_583biquad_set_resonance = {"biquad_set_resonance", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_583biquad_set_resonance, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_583biquad_set_resonance(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  double __pyx_v_fc;
  double __pyx_v_radius;
  int __pyx_v_normalize;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("biquad_set_resonance (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_fc,&__pyx_n_s_radius,&__pyx_n_s_normalize,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("biquad_set_resonance", 0, 3, 4, 1); __PYX_ERR(0, 5374, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_radius)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("biquad_set_resonance", 0, 3, 4, 2); __PYX_ERR(0, 5374, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_normalize);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "biquad_set_resonance") < 0)) __PYX_ERR(0, 5374, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
    __pyx_v_fc = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_normalize = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_normalize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5374, __pyx_L3_error)
    } else {
      __pyx_v_normalize = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("biquad_set_resonance", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 5374, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_resonance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5374, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_582biquad_set_resonance(__pyx_self, __pyx_v_gen, __pyx_v_fc, __pyx_v_radius, __pyx_v_normalize);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_582biquad_set_resonance(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, double __pyx_v_fc, double __pyx_v_radius, int __pyx_v_normalize) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("biquad_set_resonance", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.normalize = __pyx_v_normalize;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_biquad_set_resonance(__pyx_v_gen, __pyx_v_fc, __pyx_v_radius, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_resonance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5388
 *         gen.mus_xcoeffs[2] = 0.0
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0
 */

static PyObject *__pyx_pw_8pysndlib_3clm_585biquad_set_equal_gain_zeroes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_biquad_set_equal_gain_zeroes(struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("biquad_set_equal_gain_zeroes", 1);

  /* "pysndlib/clm.pyx":5389
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):
 *     gen.mus_xcoeffs[0] = 1.0             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[1] = 0.0
 *     gen.mus_xcoeffs[2] = -1.0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((__Pyx_SetItemInt(__pyx_t_1, 0, __pyx_float_1_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5390
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[2] = -1.0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((__Pyx_SetItemInt(__pyx_t_1, 1, __pyx_float_0_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5391
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0
 *     gen.mus_xcoeffs[2] = -1.0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_gen), __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((__Pyx_SetItemInt(__pyx_t_1, 2, __pyx_float_neg_1_0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 5391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5388
 *         gen.mus_xcoeffs[2] = 0.0
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_equal_gain_zeroes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_585biquad_set_equal_gain_zeroes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_585biquad_set_equal_gain_zeroes = {"biquad_set_equal_gain_zeroes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_585biquad_set_equal_gain_zeroes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_585biquad_set_equal_gain_zeroes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("biquad_set_equal_gain_zeroes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5388, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "biquad_set_equal_gain_zeroes") < 0)) __PYX_ERR(0, 5388, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("biquad_set_equal_gain_zeroes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5388, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_equal_gain_zeroes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_mus_any, 1, "gen", 0))) __PYX_ERR(0, 5388, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_584biquad_set_equal_gain_zeroes(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_584biquad_set_equal_gain_zeroes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_mus_any *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("biquad_set_equal_gain_zeroes", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_biquad_set_equal_gain_zeroes(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.biquad_set_equal_gain_zeroes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5394
 * 
 * 
 * def convert_frequency(gen):             # <<<<<<<<<<<<<<
 *     gen.frequency = hz2radians(gen.frequency)
 *     return gen
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_587convert_frequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_587convert_frequency = {"convert_frequency", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_587convert_frequency, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_587convert_frequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_frequency (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5394, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convert_frequency") < 0)) __PYX_ERR(0, 5394, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_frequency", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5394, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.convert_frequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_586convert_frequency(__pyx_self, __pyx_v_gen);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_586convert_frequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  double __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_frequency", 1);

  /* "pysndlib/clm.pyx":5395
 * 
 * def convert_frequency(gen):
 *     gen.frequency = hz2radians(gen.frequency)             # <<<<<<<<<<<<<<
 *     return gen
 * #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_hz2radians(__pyx_t_2, 0); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5395, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_gen, __pyx_n_s_frequency, __pyx_t_1) < 0) __PYX_ERR(0, 5395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5396
 * def convert_frequency(gen):
 *     gen.frequency = hz2radians(gen.frequency)
 *     return gen             # <<<<<<<<<<<<<<
 * #
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_gen);
  __pyx_r = __pyx_v_gen;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5394
 * 
 * 
 * def convert_frequency(gen):             # <<<<<<<<<<<<<<
 *     gen.frequency = hz2radians(gen.frequency)
 *     return gen
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.convert_frequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5408
 *     cdef float _val
 * 
 *     def __init__(self, arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *         check_ndim(arr, 2)
 *         self._arr = arr
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_chan = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_direction = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_chan,&__pyx_n_s_start,&__pyx_n_s_direction,0};
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0));
    values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0));
    values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_1));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5408, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5408, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5408, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5408, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 5408, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_chan = values[1];
    __pyx_v_start = values[2];
    __pyx_v_direction = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 5408, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen___init__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self), __pyx_v_arr, __pyx_v_chan, __pyx_v_start, __pyx_v_direction);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_16array_readin_gen___init__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_start, PyObject *__pyx_v_direction) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_check_ndim __pyx_t_2;
  int __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysndlib/clm.pyx":5409
 * 
 *     def __init__(self, arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):
 *         check_ndim(arr, 2)             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._chan = chan
 */
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dim = __pyx_int_2;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_check_ndim(__pyx_v_arr, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5410
 *     def __init__(self, arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):
 *         check_ndim(arr, 2)
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._chan = chan
 *         self._start = start
 */
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 5410, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_arr);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_arr);
  __pyx_v_self->_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5411
 *         check_ndim(arr, 2)
 *         self._arr = arr
 *         self._chan = chan             # <<<<<<<<<<<<<<
 *         self._start = start
 *         self._direction = direction
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_chan); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5411, __pyx_L1_error)
  __pyx_v_self->_chan = __pyx_t_3;

  /* "pysndlib/clm.pyx":5412
 *         self._arr = arr
 *         self._chan = chan
 *         self._start = start             # <<<<<<<<<<<<<<
 *         self._direction = direction
 *         self._location = self._start
 */
  __pyx_t_4 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_start); if (unlikely((__pyx_t_4 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5412, __pyx_L1_error)
  __pyx_v_self->_start = __pyx_t_4;

  /* "pysndlib/clm.pyx":5413
 *         self._chan = chan
 *         self._start = start
 *         self._direction = direction             # <<<<<<<<<<<<<<
 *         self._location = self._start
 *         self._length = np.shape(arr)[1]
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_direction); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5413, __pyx_L1_error)
  __pyx_v_self->_direction = __pyx_t_3;

  /* "pysndlib/clm.pyx":5414
 *         self._start = start
 *         self._direction = direction
 *         self._location = self._start             # <<<<<<<<<<<<<<
 *         self._length = np.shape(arr)[1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_start;
  __pyx_v_self->_location = __pyx_t_4;

  /* "pysndlib/clm.pyx":5415
 *         self._direction = direction
 *         self._location = self._start
 *         self._length = np.shape(arr)[1]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_3 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_3 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_arr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_6); if (unlikely((__pyx_t_4 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_self->_length = __pyx_t_4;

  /* "pysndlib/clm.pyx":5408
 *     cdef float _val
 * 
 *     def __init__(self, arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *         check_ndim(arr, 2)
 *         self._arr = arr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5417
 *         self._length = np.shape(arr)[1]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channel(self):
 *         return self._chan
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_11mus_channel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_11mus_channel_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_11mus_channel___get__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_11mus_channel___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":5419
 *     @property
 *     def mus_channel(self):
 *         return self._chan             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_chan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5417
 *         self._length = np.shape(arr)[1]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_channel(self):
 *         return self._chan
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_channel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5421
 *         return self._chan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_location(self):
 *         return self._location
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location___get__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":5423
 *     @property
 *     def mus_location(self):
 *         return self._location             # <<<<<<<<<<<<<<
 * 
 *     @mus_location.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5421
 *         return self._chan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_location(self):
 *         return self._location
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_location.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5425
 *         return self._location
 * 
 *     @mus_location.setter             # <<<<<<<<<<<<<<
 *     def mus_location(self, v: int):
 *        self._location = v
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), (&PyInt_Type), 0, "v", 1))) __PYX_ERR(0, 5426, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location_2__set__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self), ((PyObject*)__pyx_v_v));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_16array_readin_gen_12mus_location_2__set__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":5427
 *     @mus_location.setter
 *     def mus_location(self, v: int):
 *        self._location = v             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_v); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5427, __pyx_L1_error)
  __pyx_v_self->_location = __pyx_t_1;

  /* "pysndlib/clm.pyx":5425
 *         return self._location
 * 
 *     @mus_location.setter             # <<<<<<<<<<<<<<
 *     def mus_location(self, v: int):
 *        self._location = v
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_location.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5429
 *        self._location = v
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_increment(self):
 *         return self._direction
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment___get__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":5431
 *     @property
 *     def mus_increment(self):
 *         return self._direction             # <<<<<<<<<<<<<<
 * 
 *     @mus_increment.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_direction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5429
 *        self._location = v
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_increment(self):
 *         return self._direction
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_increment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5433
 *         return self._direction
 * 
 *     @mus_increment.setter             # <<<<<<<<<<<<<<
 *     def mus_increment(self, v: int):
 *         self._direction = v
 */

/* Python wrapper */
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static int __pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), (&PyInt_Type), 0, "v", 1))) __PYX_ERR(0, 5434, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment_2__set__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self), ((PyObject*)__pyx_v_v));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8pysndlib_3clm_16array_readin_gen_13mus_increment_2__set__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v_v) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysndlib/clm.pyx":5435
 *     @mus_increment.setter
 *     def mus_increment(self, v: int):
 *         self._direction = v             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_v); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5435, __pyx_L1_error)
  __pyx_v_self->_direction = __pyx_t_1;

  /* "pysndlib/clm.pyx":5433
 *         return self._direction
 * 
 *     @mus_increment.setter             # <<<<<<<<<<<<<<
 *     def mus_increment(self, v: int):
 *         self._direction = v
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_increment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5437
 *         self._direction = v
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_length(self):
 *         return self._length
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_10mus_length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_10mus_length_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_10mus_length___get__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_10mus_length___get__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysndlib/clm.pyx":5439
 *     @property
 *     def mus_length(self):
 *         return self._length             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5437
 *         self._direction = v
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mus_length(self):
 *         return self._length
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.mus_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5441
 *         return self._length
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         self._location = max(0, min(self._location, self._length-1))
 *         self._val = self._arr[self._chan][self._location]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__call__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_2__call__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_2__call__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  int __pyx_t_4;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  float __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 1);

  /* "pysndlib/clm.pyx":5442
 * 
 *     def __call__(self):
 *         self._location = max(0, min(self._location, self._length-1))             # <<<<<<<<<<<<<<
 *         self._val = self._arr[self._chan][self._location]
 *         self._location += self._direction
 */
  __pyx_t_1 = (__pyx_v_self->_length - 1);
  __pyx_t_2 = __pyx_v_self->_location;
  __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_4) {
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_5 = 0;
  __pyx_t_4 = (__pyx_t_1 > __pyx_t_5);
  if (__pyx_t_4) {
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_5;
  }
  __pyx_v_self->_location = __pyx_t_3;

  /* "pysndlib/clm.pyx":5443
 *     def __call__(self):
 *         self._location = max(0, min(self._location, self._length-1))
 *         self._val = self._arr[self._chan][self._location]             # <<<<<<<<<<<<<<
 *         self._location += self._direction
 *         return self._val
 */
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_arr), __pyx_v_self->_chan, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_self->_location, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_self->_val = __pyx_t_8;

  /* "pysndlib/clm.pyx":5444
 *         self._location = max(0, min(self._location, self._length-1))
 *         self._val = self._arr[self._chan][self._location]
 *         self._location += self._direction             # <<<<<<<<<<<<<<
 *         return self._val
 * 
 */
  __pyx_v_self->_location = (__pyx_v_self->_location + __pyx_v_self->_direction);

  /* "pysndlib/clm.pyx":5445
 *         self._val = self._arr[self._chan][self._location]
 *         self._location += self._direction
 *         return self._val             # <<<<<<<<<<<<<<
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5441
 *         return self._length
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         self._location = max(0, min(self._location, self._length-1))
 *         self._val = self._arr[self._chan][self._location]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_4__reduce_cython__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_4__reduce_cython__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._arr, self._chan, self._direction, self._length, self._location, self._start, self._val)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_chan); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_direction); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->_location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_arr);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->_arr);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self->_arr))) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._arr, self._chan, self._direction, self._length, self._location, self._start, self._val)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_7 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v__dict = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":7
 *     state = (self._arr, self._chan, self._direction, self._length, self._location, self._start, self._val)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_8 = (__pyx_v__dict != Py_None);
  if (__pyx_t_8) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._arr is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._arr, self._chan, self._direction, self._length, self._location, self._start, self._val)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._arr is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, None), state
 */
  /*else*/ {
    __pyx_t_8 = (((PyObject *)__pyx_v_self->_arr) != Py_None);
    __pyx_v_use_setstate = __pyx_t_8;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._arr is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._arr is not None
 *     if use_setstate:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_array_readin_gen); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_185414130);
    __Pyx_GIVEREF(__pyx_int_185414130);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_185414130)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._arr is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, None), state
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_array_readin_gen); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_185414130);
    __Pyx_GIVEREF(__pyx_int_185414130);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_185414130)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_16array_readin_gen_6__setstate_cython__(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_16array_readin_gen_6__setstate_cython__(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_8pysndlib_3clm___pyx_unpickle_array_readin_gen__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin_gen.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5447
 *         return self._val
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_589make_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_f_8pysndlib_3clm_make_array_readin(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_array_readin *__pyx_optional_args) {
  PyObject *__pyx_v_chan = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_start = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_direction = ((PyObject *)__pyx_int_1);
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_array_readin", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_chan = __pyx_optional_args->chan;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_start = __pyx_optional_args->start;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_direction = __pyx_optional_args->direction;
        }
      }
    }
  }

  /* "pysndlib/clm.pyx":5448
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):
 *     return array_readin_gen(arr, chan, start, direction)             # <<<<<<<<<<<<<<
 * 
 * cpdef array_readin(gen: array_readin_gen):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr)) __PYX_ERR(0, 5448, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_chan);
  __Pyx_GIVEREF(__pyx_v_chan);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_chan)) __PYX_ERR(0, 5448, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_start)) __PYX_ERR(0, 5448, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_direction);
  __Pyx_GIVEREF(__pyx_v_direction);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_direction)) __PYX_ERR(0, 5448, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8pysndlib_3clm_array_readin_gen), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5447
 *         return self._val
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.make_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_589make_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_589make_array_readin = {"make_array_readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_589make_array_readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_589make_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_chan = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_direction = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_array_readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_chan,&__pyx_n_s_start,&__pyx_n_s_direction,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_1));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5447, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5447, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5447, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5447, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "make_array_readin") < 0)) __PYX_ERR(0, 5447, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_chan = values[1];
    __pyx_v_start = values[2];
    __pyx_v_direction = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_array_readin", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 5447, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.make_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_588make_array_readin(__pyx_self, __pyx_v_arr, __pyx_v_chan, __pyx_v_start, __pyx_v_direction);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_588make_array_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_start, PyObject *__pyx_v_direction) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8pysndlib_3clm_make_array_readin __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_array_readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.chan = __pyx_v_chan;
  __pyx_t_2.start = __pyx_v_start;
  __pyx_t_2.direction = __pyx_v_direction;
  __pyx_t_1 = ((PyObject *)__pyx_f_8pysndlib_3clm_make_array_readin(__pyx_v_arr, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.make_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5450
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 * cpdef array_readin(gen: array_readin_gen):             # <<<<<<<<<<<<<<
 *     return gen()
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_591array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_array_readin(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_readin", 1);

  /* "pysndlib/clm.pyx":5451
 * 
 * cpdef array_readin(gen: array_readin_gen):
 *     return gen()             # <<<<<<<<<<<<<<
 * 
 * cpdef is_array_readin(gen):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gen);
  __pyx_t_2 = ((PyObject *)__pyx_v_gen); __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5450
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 * cpdef array_readin(gen: array_readin_gen):             # <<<<<<<<<<<<<<
 *     return gen()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_591array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_591array_readin = {"array_readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_591array_readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_591array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5450, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "array_readin") < 0)) __PYX_ERR(0, 5450, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = ((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_readin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5450, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gen), __pyx_ptype_8pysndlib_3clm_array_readin_gen, 0, "gen", 0))) __PYX_ERR(0, 5450, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_590array_readin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_590array_readin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_array_readin(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5453
 *     return gen()
 * 
 * cpdef is_array_readin(gen):             # <<<<<<<<<<<<<<
 *     return isinstance(gen, array_readin_gen)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_593is_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_8pysndlib_3clm_is_array_readin(PyObject *__pyx_v_gen, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array_readin", 1);

  /* "pysndlib/clm.pyx":5454
 * 
 * cpdef is_array_readin(gen):
 *     return isinstance(gen, array_readin_gen)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_gen, __pyx_ptype_8pysndlib_3clm_array_readin_gen); 
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5453
 *     return gen()
 * 
 * cpdef is_array_readin(gen):             # <<<<<<<<<<<<<<
 *     return isinstance(gen, array_readin_gen)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.is_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_593is_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_593is_array_readin = {"is_array_readin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_593is_array_readin, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_593is_array_readin(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_gen = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_array_readin (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5453, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_array_readin") < 0)) __PYX_ERR(0, 5453, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_gen = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_array_readin", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5453, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.is_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_592is_array_readin(__pyx_self, __pyx_v_gen);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_592is_array_readin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array_readin", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_is_array_readin(__pyx_v_gen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysndlib.clm.is_array_readin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5488
 * 
 * 
 * def clamp(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_595clamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_595clamp = {"clamp", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_595clamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_595clamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_lo = 0;
  PyObject *__pyx_v_hi = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_lo,&__pyx_n_s_hi,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5488, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lo)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5488, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("clamp", 1, 3, 3, 1); __PYX_ERR(0, 5488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hi)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5488, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("clamp", 1, 3, 3, 2); __PYX_ERR(0, 5488, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clamp") < 0)) __PYX_ERR(0, 5488, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_lo = values[1];
    __pyx_v_hi = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clamp", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5488, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.clamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_594clamp(__pyx_self, __pyx_v_x, __pyx_v_lo, __pyx_v_hi);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_594clamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clamp", 1);

  /* "pysndlib/clm.pyx":5489
 * 
 * def clamp(x, lo, hi):
 *     return max(min(x, hi),lo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_lo);
  __pyx_t_1 = __pyx_v_lo;
  __Pyx_INCREF(__pyx_v_hi);
  __pyx_t_2 = __pyx_v_hi;
  __Pyx_INCREF(__pyx_v_x);
  __pyx_t_3 = __pyx_v_x;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5489, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5489, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = __pyx_t_1;
  } else {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5488
 * 
 * 
 * def clamp(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm.clamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5494
 * 
 * 
 * def _clip(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_597_clip(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_597_clip = {"_clip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_597_clip, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_597_clip(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_lo = 0;
  PyObject *__pyx_v_hi = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_clip (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_lo,&__pyx_n_s_hi,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5494, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lo)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5494, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_clip", 1, 3, 3, 1); __PYX_ERR(0, 5494, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hi)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5494, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_clip", 1, 3, 3, 2); __PYX_ERR(0, 5494, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_clip") < 0)) __PYX_ERR(0, 5494, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_lo = values[1];
    __pyx_v_hi = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_clip", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5494, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm._clip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_596_clip(__pyx_self, __pyx_v_x, __pyx_v_lo, __pyx_v_hi);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_596_clip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_clip", 1);

  /* "pysndlib/clm.pyx":5495
 * 
 * def _clip(x, lo, hi):
 *     return max(min(x, hi),lo)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_lo);
  __pyx_t_1 = __pyx_v_lo;
  __Pyx_INCREF(__pyx_v_hi);
  __pyx_t_2 = __pyx_v_hi;
  __Pyx_INCREF(__pyx_v_x);
  __pyx_t_3 = __pyx_v_x;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5495, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5495, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = __pyx_t_1;
  } else {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5494
 * 
 * 
 * def _clip(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysndlib.clm._clip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5498
 * 
 * 
 * def _wrap(x, lo, hi):             # <<<<<<<<<<<<<<
 *     r = hi-lo
 *     if x >= lo and x <= hi:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_599_wrap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_599_wrap = {"_wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_599_wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_599_wrap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_lo = 0;
  PyObject *__pyx_v_hi = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_wrap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_lo,&__pyx_n_s_hi,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5498, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lo)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5498, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_wrap", 1, 3, 3, 1); __PYX_ERR(0, 5498, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hi)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5498, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_wrap", 1, 3, 3, 2); __PYX_ERR(0, 5498, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_wrap") < 0)) __PYX_ERR(0, 5498, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_lo = values[1];
    __pyx_v_hi = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_wrap", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5498, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm._wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_598_wrap(__pyx_self, __pyx_v_x, __pyx_v_lo, __pyx_v_hi);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_598_wrap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_lo, PyObject *__pyx_v_hi) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_wrap", 1);

  /* "pysndlib/clm.pyx":5499
 * 
 * def _wrap(x, lo, hi):
 *     r = hi-lo             # <<<<<<<<<<<<<<
 *     if x >= lo and x <= hi:
 *         return x
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_hi, __pyx_v_lo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_r = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5500
 * def _wrap(x, lo, hi):
 *     r = hi-lo
 *     if x >= lo and x <= hi:             # <<<<<<<<<<<<<<
 *         return x
 *     if x < lo:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_v_lo, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5500, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_v_hi, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5500, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5501
 *     r = hi-lo
 *     if x >= lo and x <= hi:
 *         return x             # <<<<<<<<<<<<<<
 *     if x < lo:
 *         return hi + (math.fmod((x-lo), r))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_x);
    __pyx_r = __pyx_v_x;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5500
 * def _wrap(x, lo, hi):
 *     r = hi-lo
 *     if x >= lo and x <= hi:             # <<<<<<<<<<<<<<
 *         return x
 *     if x < lo:
 */
  }

  /* "pysndlib/clm.pyx":5502
 *     if x >= lo and x <= hi:
 *         return x
 *     if x < lo:             # <<<<<<<<<<<<<<
 *         return hi + (math.fmod((x-lo), r))
 *     if x > hi:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_v_lo, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5502, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5503
 *         return x
 *     if x < lo:
 *         return hi + (math.fmod((x-lo), r))             # <<<<<<<<<<<<<<
 *     if x > hi:
 *         return lo + (math.fmod((x-hi), r))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fmod); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Subtract(__pyx_v_x, __pyx_v_lo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_r};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = PyNumber_Add(__pyx_v_hi, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5502
 *     if x >= lo and x <= hi:
 *         return x
 *     if x < lo:             # <<<<<<<<<<<<<<
 *         return hi + (math.fmod((x-lo), r))
 *     if x > hi:
 */
  }

  /* "pysndlib/clm.pyx":5504
 *     if x < lo:
 *         return hi + (math.fmod((x-lo), r))
 *     if x > hi:             # <<<<<<<<<<<<<<
 *         return lo + (math.fmod((x-hi), r))
 * 
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_x, __pyx_v_hi, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5504, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":5505
 *         return hi + (math.fmod((x-lo), r))
 *     if x > hi:
 *         return lo + (math.fmod((x-hi), r))             # <<<<<<<<<<<<<<
 * 
 * def array_reader(arr, chan, loop=False):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fmod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_x, __pyx_v_hi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_r};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = PyNumber_Add(__pyx_v_lo, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pysndlib/clm.pyx":5504
 *     if x < lo:
 *         return hi + (math.fmod((x-lo), r))
 *     if x > hi:             # <<<<<<<<<<<<<<
 *         return lo + (math.fmod((x-hi), r))
 * 
 */
  }

  /* "pysndlib/clm.pyx":5498
 * 
 * 
 * def _wrap(x, lo, hi):             # <<<<<<<<<<<<<<
 *     r = hi-lo
 *     if x >= lo and x <= hi:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm._wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_601array_reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_601array_reader = {"array_reader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_601array_reader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_601array_reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_chan = 0;
  PyObject *__pyx_v_loop = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_reader (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_chan,&__pyx_n_s_loop,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5507, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5507, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("array_reader", 0, 2, 3, 1); __PYX_ERR(0, 5507, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5507, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "array_reader") < 0)) __PYX_ERR(0, 5507, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_chan = values[1];
    __pyx_v_loop = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_reader", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_600array_reader(__pyx_self, __pyx_v_arr, __pyx_v_chan, __pyx_v_loop);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5513
 *     length = get_length(arr)
 *     if loop:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_12array_reader_1reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_12array_reader_1reader = {"reader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_12array_reader_1reader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_12array_reader_1reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_direction = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reader (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_direction,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5513, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reader") < 0)) __PYX_ERR(0, 5513, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_direction = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reader", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5513, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_reader.reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_12array_reader_reader(__pyx_self, __pyx_v_direction);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_12array_reader_reader(PyObject *__pyx_self, PyObject *__pyx_v_direction) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_outer_scope;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reader", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":5515
 *         def reader(direction):
 *             nonlocal ind
 *             v = arr[chan][ind]             # <<<<<<<<<<<<<<
 *             ind += direction
 *             ind = _wrap(ind, 0, length-1)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_arr)) { __Pyx_RaiseClosureNameError("arr"); __PYX_ERR(0, 5515, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_chan)) { __Pyx_RaiseClosureNameError("chan"); __PYX_ERR(0, 5515, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_arr, __pyx_cur_scope->__pyx_v_chan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_ind)) { __Pyx_RaiseClosureNameError("ind"); __PYX_ERR(0, 5515, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_ind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5516
 *             nonlocal ind
 *             v = arr[chan][ind]
 *             ind += direction             # <<<<<<<<<<<<<<
 *             ind = _wrap(ind, 0, length-1)
 *             return v
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ind)) { __Pyx_RaiseClosureNameError("ind"); __PYX_ERR(0, 5516, __pyx_L1_error) }
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_ind, __pyx_v_direction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_ind);
  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_ind, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5517
 *             v = arr[chan][ind]
 *             ind += direction
 *             ind = _wrap(ind, 0, length-1)             # <<<<<<<<<<<<<<
 *             return v
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_wrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_length - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_ind, __pyx_int_0, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ind);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ind, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5518
 *             ind += direction
 *             ind = _wrap(ind, 0, length-1)
 *             return v             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_v);
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5513
 *     length = get_length(arr)
 *     if loop:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.array_reader.reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5521
 * 
 *     else:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_12array_reader_3reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_12array_reader_3reader = {"reader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_12array_reader_3reader, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_12array_reader_3reader(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_direction = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reader (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_direction,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5521, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reader") < 0)) __PYX_ERR(0, 5521, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_direction = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reader", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5521, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_reader.reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_12array_reader_2reader(__pyx_self, __pyx_v_direction);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_12array_reader_2reader(PyObject *__pyx_self, PyObject *__pyx_v_direction) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_outer_scope;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reader", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":5523
 *         def reader(direction):
 *             nonlocal ind
 *             v = arr[chan][ind]             # <<<<<<<<<<<<<<
 *             ind += direction
 *             ind = _clip(ind, 0, length-1)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_arr)) { __Pyx_RaiseClosureNameError("arr"); __PYX_ERR(0, 5523, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_chan)) { __Pyx_RaiseClosureNameError("chan"); __PYX_ERR(0, 5523, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_arr, __pyx_cur_scope->__pyx_v_chan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_ind)) { __Pyx_RaiseClosureNameError("ind"); __PYX_ERR(0, 5523, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_ind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5524
 *             nonlocal ind
 *             v = arr[chan][ind]
 *             ind += direction             # <<<<<<<<<<<<<<
 *             ind = _clip(ind, 0, length-1)
 *             return v
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ind)) { __Pyx_RaiseClosureNameError("ind"); __PYX_ERR(0, 5524, __pyx_L1_error) }
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_ind, __pyx_v_direction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_ind);
  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_ind, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5525
 *             v = arr[chan][ind]
 *             ind += direction
 *             ind = _clip(ind, 0, length-1)             # <<<<<<<<<<<<<<
 *             return v
 *     return reader
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_length - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_ind, __pyx_int_0, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ind);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ind, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysndlib/clm.pyx":5526
 *             ind += direction
 *             ind = _clip(ind, 0, length-1)
 *             return v             # <<<<<<<<<<<<<<
 *     return reader
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_v);
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5521
 * 
 *     else:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.array_reader.reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */

static PyObject *__pyx_pf_8pysndlib_3clm_600array_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_chan, PyObject *__pyx_v_loop) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_cur_scope;
  PyObject *__pyx_v_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_5_array_reader(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5507, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_arr = __pyx_v_arr;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arr);
  __pyx_cur_scope->__pyx_v_chan = __pyx_v_chan;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_chan);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_chan);

  /* "pysndlib/clm.pyx":5508
 * 
 * def array_reader(arr, chan, loop=False):
 *     ind = 0             # <<<<<<<<<<<<<<
 *     if chan > (get_channels(arr)):
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_cur_scope->__pyx_v_ind = __pyx_int_0;

  /* "pysndlib/clm.pyx":5509
 * def array_reader(arr, chan, loop=False):
 *     ind = 0
 *     if chan > (get_channels(arr)):             # <<<<<<<<<<<<<<
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 *     length = get_length(arr)
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_arr;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_chan, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "pysndlib/clm.pyx":5510
 *     ind = 0
 *     if chan > (get_channels(arr)):
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')             # <<<<<<<<<<<<<<
 *     length = get_length(arr)
 *     if loop:
 */
    __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_6 = 127;
    __Pyx_INCREF(__pyx_kp_u_array_has);
    __pyx_t_5 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_array_has);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_array_has);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_arr;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_channels(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_From_long(__pyx_t_2, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_channels_but);
    __pyx_t_5 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_channels_but);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_channels_but);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_chan, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_asked_for);
    __pyx_t_5 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_asked_for);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_asked_for);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 5510, __pyx_L1_error)

    /* "pysndlib/clm.pyx":5509
 * def array_reader(arr, chan, loop=False):
 *     ind = 0
 *     if chan > (get_channels(arr)):             # <<<<<<<<<<<<<<
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 *     length = get_length(arr)
 */
  }

  /* "pysndlib/clm.pyx":5511
 *     if chan > (get_channels(arr)):
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 *     length = get_length(arr)             # <<<<<<<<<<<<<<
 *     if loop:
 *         def reader(direction):
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_arr;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_2 = __pyx_f_8pysndlib_3clm_get_length(__pyx_t_3, 0); if (unlikely(__pyx_t_2 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_cur_scope->__pyx_v_length = __pyx_t_2;

  /* "pysndlib/clm.pyx":5512
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 *     length = get_length(arr)
 *     if loop:             # <<<<<<<<<<<<<<
 *         def reader(direction):
 *             nonlocal ind
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_loop); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 5512, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "pysndlib/clm.pyx":5513
 *     length = get_length(arr)
 *     if loop:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */
    __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_12array_reader_1reader, 0, __pyx_n_s_array_reader_locals_reader, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_reader = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5512
 *         raise ValueError(f'array has {get_channels(arr)} channels but {chan} asked for')
 *     length = get_length(arr)
 *     if loop:             # <<<<<<<<<<<<<<
 *         def reader(direction):
 *             nonlocal ind
 */
    goto __pyx_L4;
  }

  /* "pysndlib/clm.pyx":5521
 * 
 *     else:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_12array_reader_3reader, 0, __pyx_n_s_array_reader_locals_reader, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_reader = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "pysndlib/clm.pyx":5527
 *             ind = _clip(ind, 0, length-1)
 *             return v
 *     return reader             # <<<<<<<<<<<<<<
 * 
 * def sndplay(file):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_reader);
  __pyx_r = __pyx_v_reader;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.array_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5529
 *     return reader
 * 
 * def sndplay(file):             # <<<<<<<<<<<<<<
 *     subprocess.run([default.player,file])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_603sndplay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_603sndplay = {"sndplay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_603sndplay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_603sndplay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sndplay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_file)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5529, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sndplay") < 0)) __PYX_ERR(0, 5529, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_file = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sndplay", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5529, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.sndplay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_602sndplay(__pyx_self, __pyx_v_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_602sndplay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sndplay", 1);

  /* "pysndlib/clm.pyx":5530
 * 
 * def sndplay(file):
 *     subprocess.run([default.player,file])             # <<<<<<<<<<<<<<
 * 
 * #decorator for reverbs.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_run); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_player); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 5530, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_file)) __PYX_ERR(0, 5530, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5529
 *     return reader
 * 
 * def sndplay(file):             # <<<<<<<<<<<<<<
 *     subprocess.run([default.player,file])
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.sndplay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_605clm_reverb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_605clm_reverb = {"clm_reverb", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_605clm_reverb, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_605clm_reverb(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_func = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clm_reverb (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5533, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clm_reverb") < 0)) __PYX_ERR(0, 5533, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_func = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clm_reverb", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5533, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.clm_reverb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_604clm_reverb(__pyx_self, __pyx_v_func);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5534
 * #decorator for reverbs.
 * def clm_reverb(func):
 *     @functools.wraps(func)             # <<<<<<<<<<<<<<
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_10clm_reverb_1call(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_10clm_reverb_1call = {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pysndlib_3clm_10clm_reverb_1call, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_10clm_reverb_1call(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("call (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "call", 1))) return NULL;
  if (unlikely(__pyx_kwds)) {
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_8pysndlib_3clm_10clm_reverb_call(__pyx_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_10clm_reverb_call(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *__pyx_cur_scope;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("call", 1);
  __pyx_outer_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pysndlib/clm.pyx":5536
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)             # <<<<<<<<<<<<<<
 *     return call
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 5536, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_func)) __PYX_ERR(0, 5536, __pyx_L1_error);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5534
 * #decorator for reverbs.
 * def clm_reverb(func):
 *     @functools.wraps(func)             # <<<<<<<<<<<<<<
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.clm_reverb.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */

static PyObject *__pyx_pf_8pysndlib_3clm_604clm_reverb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *__pyx_cur_scope;
  PyObject *__pyx_v_call = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clm_reverb", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5533, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_func = __pyx_v_func;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);

  /* "pysndlib/clm.pyx":5534
 * #decorator for reverbs.
 * def clm_reverb(func):
 *     @functools.wraps(func)             # <<<<<<<<<<<<<<
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_func};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_10clm_reverb_1call, 0, __pyx_n_s_clm_reverb_locals_call, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_call = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5537
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)
 *     return call             # <<<<<<<<<<<<<<
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_call);
  __pyx_r = __pyx_v_call;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.clm_reverb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_call);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5539
 *     return call
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)
 */

static PyObject *__pyx_pf_8pysndlib_3clm_631__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_interp_type);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_interp_type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_interp_type)) __PYX_ERR(0, 5539, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 5539, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 5539, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_607array_resample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_607array_resample = {"array_resample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_607array_resample, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_607array_resample(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_new_length = 0;
  PyObject *__pyx_v_interp_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_resample (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_new_length,&__pyx_n_s_interp_type,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_interp_type);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5539, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_length)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5539, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("array_resample", 0, 2, 3, 1); __PYX_ERR(0, 5539, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interp_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5539, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "array_resample") < 0)) __PYX_ERR(0, 5539, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_new_length = values[1];
    __pyx_v_interp_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_resample", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5539, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.array_resample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_606array_resample(__pyx_self, __pyx_v_arr, __pyx_v_new_length, __pyx_v_interp_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_606array_resample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_new_length, PyObject *__pyx_v_interp_type) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_inp = NULL;
  PyObject *__pyx_v_orig_length = NULL;
  PyObject *__pyx_v_indices = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  enum __pyx_t_8pysndlib_3clm_Interp __pyx_t_8;
  double __pyx_t_9;
  double __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_resample", 1);

  /* "pysndlib/clm.pyx":5540
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):
 *     res = np.zeros(new_length)             # <<<<<<<<<<<<<<
 *     inp = np.array(arr)
 *     orig_length = len(arr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_new_length};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5541
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)             # <<<<<<<<<<<<<<
 *     orig_length = len(arr)
 *     indices = np.linspace(0, orig_length-1,new_length)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_arr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_inp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5542
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)
 *     orig_length = len(arr)             # <<<<<<<<<<<<<<
 *     indices = np.linspace(0, orig_length-1,new_length)
 *     for i in range(new_length):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5542, __pyx_L1_error)
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_orig_length = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5543
 *     inp = np.array(arr)
 *     orig_length = len(arr)
 *     indices = np.linspace(0, orig_length-1,new_length)             # <<<<<<<<<<<<<<
 *     for i in range(new_length):
 *         res[i] = mus_interpolate(interp_type, indices[i], inp)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linspace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_orig_length, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_int_0, __pyx_t_2, __pyx_v_new_length};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_indices = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysndlib/clm.pyx":5544
 *     orig_length = len(arr)
 *     indices = np.linspace(0, orig_length-1,new_length)
 *     for i in range(new_length):             # <<<<<<<<<<<<<<
 *         res[i] = mus_interpolate(interp_type, indices[i], inp)
 *     return res
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_new_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5544, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5544, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5544, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5544, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5544, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5544, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5545
 *     indices = np.linspace(0, orig_length-1,new_length)
 *     for i in range(new_length):
 *         res[i] = mus_interpolate(interp_type, indices[i], inp)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
    __pyx_t_8 = ((enum __pyx_t_8pysndlib_3clm_Interp)__Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_v_interp_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5545, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_indices, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_inp) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_inp, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 5545, __pyx_L1_error)
    __pyx_t_10 = __pyx_f_8pysndlib_3clm_mus_interpolate(__pyx_t_8, __pyx_t_9, ((PyArrayObject *)__pyx_v_inp), 0, NULL); if (unlikely(__pyx_t_10 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5545, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyObject_SetItem(__pyx_v_res, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 5545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5544
 *     orig_length = len(arr)
 *     indices = np.linspace(0, orig_length-1,new_length)
 *     for i in range(new_length):             # <<<<<<<<<<<<<<
 *         res[i] = mus_interpolate(interp_type, indices[i], inp)
 *     return res
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysndlib/clm.pyx":5546
 *     for i in range(new_length):
 *         res[i] = mus_interpolate(interp_type, indices[i], inp)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5539
 *     return call
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysndlib.clm.array_resample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_inp);
  __Pyx_XDECREF(__pyx_v_orig_length);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5549
 * 
 * 
 * def phase_delay(gen, freq):             # <<<<<<<<<<<<<<
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_609phase_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_609phase_delay = {"phase_delay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_609phase_delay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_609phase_delay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_v_freq = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("phase_delay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gen,&__pyx_n_s_freq,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_gen)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5549, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_freq)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5549, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("phase_delay", 1, 2, 2, 1); __PYX_ERR(0, 5549, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "phase_delay") < 0)) __PYX_ERR(0, 5549, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_gen = values[0];
    __pyx_v_freq = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phase_delay", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5549, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.phase_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_608phase_delay(__pyx_self, __pyx_v_gen, __pyx_v_freq);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_608phase_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen, PyObject *__pyx_v_freq) {
  PyObject *__pyx_v_omega_t = NULL;
  PyObject *__pyx_v_real = NULL;
  PyObject *__pyx_v_imag = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_phase = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phase_delay", 1);

  /* "pysndlib/clm.pyx":5550
 * 
 * def phase_delay(gen, freq):
 *     omega_t = 2 * np.pi * freq / get_srate()             # <<<<<<<<<<<<<<
 *     real = 0.
 *     imag = 0.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_t_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_freq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_f_8pysndlib_3clm_get_srate(0, NULL); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5550, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_omega_t = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":5551
 * def phase_delay(gen, freq):
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.             # <<<<<<<<<<<<<<
 *     imag = 0.
 *     for i in range(len(gen.mus_xcoeffs)):
 */
  __Pyx_INCREF(__pyx_float_0_);
  __pyx_v_real = __pyx_float_0_;

  /* "pysndlib/clm.pyx":5552
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.
 *     imag = 0.             # <<<<<<<<<<<<<<
 *     for i in range(len(gen.mus_xcoeffs)):
 *         real += gen.mus_xcoeffs[i] * math.cos(i * omega_t)
 */
  __Pyx_INCREF(__pyx_float_0_);
  __pyx_v_imag = __pyx_float_0_;

  /* "pysndlib/clm.pyx":5553
 *     real = 0.
 *     imag = 0.
 *     for i in range(len(gen.mus_xcoeffs)):             # <<<<<<<<<<<<<<
 *         real += gen.mus_xcoeffs[i] * math.cos(i * omega_t)
 *         imag -= gen.mus_xcoeffs[i] * math.sin(i * omega_t)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5553, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5553, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5553, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5553, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5553, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5553, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5554
 *     imag = 0.
 *     for i in range(len(gen.mus_xcoeffs)):
 *         real += gen.mus_xcoeffs[i] * math.cos(i * omega_t)             # <<<<<<<<<<<<<<
 *         imag -= gen.mus_xcoeffs[i] * math.sin(i * omega_t)
 *    # print(gen.mus_xcoeffs[0])
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_v_i, __pyx_v_omega_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5554, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_real, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_real, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5555
 *     for i in range(len(gen.mus_xcoeffs)):
 *         real += gen.mus_xcoeffs[i] * math.cos(i * omega_t)
 *         imag -= gen.mus_xcoeffs[i] * math.sin(i * omega_t)             # <<<<<<<<<<<<<<
 *    # print(gen.mus_xcoeffs[0])
 *     real *= gen.mus_xcoeffs[0]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Multiply(__pyx_v_i, __pyx_v_omega_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_imag, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_imag, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysndlib/clm.pyx":5553
 *     real = 0.
 *     imag = 0.
 *     for i in range(len(gen.mus_xcoeffs)):             # <<<<<<<<<<<<<<
 *         real += gen.mus_xcoeffs[i] * math.cos(i * omega_t)
 *         imag -= gen.mus_xcoeffs[i] * math.sin(i * omega_t)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":5557
 *         imag -= gen.mus_xcoeffs[i] * math.sin(i * omega_t)
 *    # print(gen.mus_xcoeffs[0])
 *     real *= gen.mus_xcoeffs[0]             # <<<<<<<<<<<<<<
 *     imag *= gen.mus_xcoeffs[0]
 *     phase = math.atan2(imag, real)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_real, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_real, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":5558
 *    # print(gen.mus_xcoeffs[0])
 *     real *= gen.mus_xcoeffs[0]
 *     imag *= gen.mus_xcoeffs[0]             # <<<<<<<<<<<<<<
 *     phase = math.atan2(imag, real)
 *     real = 0.
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_xcoeffs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_imag, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_imag, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":5559
 *     real *= gen.mus_xcoeffs[0]
 *     imag *= gen.mus_xcoeffs[0]
 *     phase = math.atan2(imag, real)             # <<<<<<<<<<<<<<
 *     real = 0.
 *     imag = 0.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_atan2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_imag, __pyx_v_real};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_phase = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pysndlib/clm.pyx":5560
 *     imag *= gen.mus_xcoeffs[0]
 *     phase = math.atan2(imag, real)
 *     real = 0.             # <<<<<<<<<<<<<<
 *     imag = 0.
 *     if not is_fir_filter(gen):
 */
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_DECREF_SET(__pyx_v_real, __pyx_float_0_);

  /* "pysndlib/clm.pyx":5561
 *     phase = math.atan2(imag, real)
 *     real = 0.
 *     imag = 0.             # <<<<<<<<<<<<<<
 *     if not is_fir_filter(gen):
 *         for i in range(len(gen.mus_ycoeffs)):
 */
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_DECREF_SET(__pyx_v_imag, __pyx_float_0_);

  /* "pysndlib/clm.pyx":5562
 *     real = 0.
 *     imag = 0.
 *     if not is_fir_filter(gen):             # <<<<<<<<<<<<<<
 *         for i in range(len(gen.mus_ycoeffs)):
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 */
  if (!(likely(((__pyx_v_gen) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_gen, __pyx_ptype_8pysndlib_3clm_mus_any))))) __PYX_ERR(0, 5562, __pyx_L1_error)
  __pyx_t_11 = __pyx_f_8pysndlib_3clm_is_fir_filter(((struct __pyx_obj_8pysndlib_3clm_mus_any *)__pyx_v_gen), 0); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5562, __pyx_L1_error)
  __pyx_t_12 = (!__pyx_t_11);
  if (__pyx_t_12) {

    /* "pysndlib/clm.pyx":5563
 *     imag = 0.
 *     if not is_fir_filter(gen):
 *         for i in range(len(gen.mus_ycoeffs)):             # <<<<<<<<<<<<<<
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5563, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5563, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5563, __pyx_L1_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5563, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 5563, __pyx_L1_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5563, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":5564
 *     if not is_fir_filter(gen):
 *         for i in range(len(gen.mus_ycoeffs)):
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)             # <<<<<<<<<<<<<<
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)
 *         phase -= math.atan2(imag, real)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_cos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_Multiply(__pyx_v_i, __pyx_v_omega_t); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_real, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_real, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":5565
 *         for i in range(len(gen.mus_ycoeffs)):
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)             # <<<<<<<<<<<<<<
 *         phase -= math.atan2(imag, real)
 *         phase = math.fmod(-phase, 2 * np.pi)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gen, __pyx_n_s_mus_ycoeffs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Multiply(__pyx_v_i, __pyx_v_omega_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_1};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = PyNumber_Multiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_v_imag, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_imag, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pysndlib/clm.pyx":5563
 *     imag = 0.
 *     if not is_fir_filter(gen):
 *         for i in range(len(gen.mus_ycoeffs)):             # <<<<<<<<<<<<<<
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysndlib/clm.pyx":5566
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)
 *         phase -= math.atan2(imag, real)             # <<<<<<<<<<<<<<
 *         phase = math.fmod(-phase, 2 * np.pi)
 *     return phase / omega_t
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_atan2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_imag, __pyx_v_real};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_v_phase, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_phase, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":5567
 *             imag -= gen.mus_ycoeffs[i] * math.sin(i * omega_t)
 *         phase -= math.atan2(imag, real)
 *         phase = math.fmod(-phase, 2 * np.pi)             # <<<<<<<<<<<<<<
 *     return phase / omega_t
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fmod); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Negative(__pyx_v_phase); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_t_1, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_4, __pyx_t_2};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_phase, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pysndlib/clm.pyx":5562
 *     real = 0.
 *     imag = 0.
 *     if not is_fir_filter(gen):             # <<<<<<<<<<<<<<
 *         for i in range(len(gen.mus_ycoeffs)):
 *             real += gen.mus_ycoeffs[i] * math.cos(i * omega_t)
 */
  }

  /* "pysndlib/clm.pyx":5568
 *         phase -= math.atan2(imag, real)
 *         phase = math.fmod(-phase, 2 * np.pi)
 *     return phase / omega_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_phase, __pyx_v_omega_t); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5549
 * 
 * 
 * def phase_delay(gen, freq):             # <<<<<<<<<<<<<<
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysndlib.clm.phase_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_omega_t);
  __Pyx_XDECREF(__pyx_v_real);
  __Pyx_XDECREF(__pyx_v_imag);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_phase);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_8pysndlib_3clm_612generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pysndlib/clm.pyx":5572
 * 
 * 
 * def impulse_generator(arr):             # <<<<<<<<<<<<<<
 *     n = 0
 *     num = len(arr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_611impulse_generator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_611impulse_generator = {"impulse_generator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_611impulse_generator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_611impulse_generator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("impulse_generator (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5572, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "impulse_generator") < 0)) __PYX_ERR(0, 5572, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_arr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("impulse_generator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5572, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.impulse_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_610impulse_generator(__pyx_self, __pyx_v_arr);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_610impulse_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("impulse_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5572, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_arr = __pyx_v_arr;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arr);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8pysndlib_3clm_612generator, __pyx_codeobj__69, (PyObject *) __pyx_cur_scope, __pyx_n_s_impulse_generator, __pyx_n_s_impulse_generator, __pyx_n_s_pysndlib_clm); if (unlikely(!gen)) __PYX_ERR(0, 5572, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysndlib.clm.impulse_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_8pysndlib_3clm_612generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *__pyx_cur_scope = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("impulse_generator", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5572, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5573
 * 
 * def impulse_generator(arr):
 *     n = 0             # <<<<<<<<<<<<<<
 *     num = len(arr)
 *     while n < num:
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_cur_scope->__pyx_v_n = __pyx_int_0;

  /* "pysndlib/clm.pyx":5574
 * def impulse_generator(arr):
 *     n = 0
 *     num = len(arr)             # <<<<<<<<<<<<<<
 *     while n < num:
 *         yield arr[n]
 */
  __pyx_t_1 = PyObject_Length(__pyx_cur_scope->__pyx_v_arr); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5574, __pyx_L1_error)
  __pyx_cur_scope->__pyx_v_num = __pyx_t_1;

  /* "pysndlib/clm.pyx":5575
 *     n = 0
 *     num = len(arr)
 *     while n < num:             # <<<<<<<<<<<<<<
 *         yield arr[n]
 *         n += 1
 */
  while (1) {
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_cur_scope->__pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_n, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5575, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 5575, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_4) break;

    /* "pysndlib/clm.pyx":5576
 *     num = len(arr)
 *     while n < num:
 *         yield arr[n]             # <<<<<<<<<<<<<<
 *         n += 1
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_arr, __pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5576, __pyx_L1_error)

    /* "pysndlib/clm.pyx":5577
 *     while n < num:
 *         yield arr[n]
 *         n += 1             # <<<<<<<<<<<<<<
 * 
 * #
 */
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_n, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_n);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_n, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pysndlib/clm.pyx":5572
 * 
 * 
 * def impulse_generator(arr):             # <<<<<<<<<<<<<<
 *     n = 0
 *     num = len(arr)
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("impulse_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5584
 * from math import fabs, sqrt, exp
 * 
 * cpdef cython.double bes_i0(cython.double x):             # <<<<<<<<<<<<<<
 *     cdef cython.double ax
 *     cdef cython.double ans
 */

static PyObject *__pyx_pw_8pysndlib_3clm_614bes_i0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_i0(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_ax;
  double __pyx_v_ans;
  double __pyx_v_y;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  double __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_i0", 1);

  /* "pysndlib/clm.pyx":5588
 *     cdef cython.double ans
 *     cdef cython.double y
 *     ax = fabs(x)             # <<<<<<<<<<<<<<
 *     if  ax < 3.75:
 *         y = x/3.75
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fabs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ax = __pyx_t_6;

  /* "pysndlib/clm.pyx":5589
 *     cdef cython.double y
 *     ax = fabs(x)
 *     if  ax < 3.75:             # <<<<<<<<<<<<<<
 *         y = x/3.75
 *         y *= y
 */
  __pyx_t_7 = (__pyx_v_ax < 3.75);
  if (__pyx_t_7) {

    /* "pysndlib/clm.pyx":5590
 *     ax = fabs(x)
 *     if  ax < 3.75:
 *         y = x/3.75             # <<<<<<<<<<<<<<
 *         y *= y
 *         ans = 1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492+y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))))
 */
    __pyx_v_y = (__pyx_v_x / 3.75);

    /* "pysndlib/clm.pyx":5591
 *     if  ax < 3.75:
 *         y = x/3.75
 *         y *= y             # <<<<<<<<<<<<<<
 *         ans = 1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492+y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))))
 *     else:
 */
    __pyx_v_y = (__pyx_v_y * __pyx_v_y);

    /* "pysndlib/clm.pyx":5592
 *         y = x/3.75
 *         y *= y
 *         ans = 1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492+y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))))             # <<<<<<<<<<<<<<
 *     else:
 *         y=3.75/ax;
 */
    __pyx_v_ans = (1.0 + (__pyx_v_y * (3.5156229 + (__pyx_v_y * (3.0899424 + (__pyx_v_y * (1.2067492 + (__pyx_v_y * (0.2659732 + (__pyx_v_y * (0.360768e-1 + (__pyx_v_y * 0.45813e-2))))))))))));

    /* "pysndlib/clm.pyx":5589
 *     cdef cython.double y
 *     ax = fabs(x)
 *     if  ax < 3.75:             # <<<<<<<<<<<<<<
 *         y = x/3.75
 *         y *= y
 */
    goto __pyx_L3;
  }

  /* "pysndlib/clm.pyx":5594
 *         ans = 1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492+y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))))
 *     else:
 *         y=3.75/ax;             # <<<<<<<<<<<<<<
 *         ans=(exp(ax)/sqrt(ax))*(0.39894228+y*(0.1328592e-1+y*(0.225319e-2+y*(-0.157565e-2+y*(0.916281e-2+
 *         y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1+
 */
  /*else*/ {
    if (unlikely(__pyx_v_ax == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 5594, __pyx_L1_error)
    }
    __pyx_v_y = (3.75 / __pyx_v_ax);

    /* "pysndlib/clm.pyx":5595
 *     else:
 *         y=3.75/ax;
 *         ans=(exp(ax)/sqrt(ax))*(0.39894228+y*(0.1328592e-1+y*(0.225319e-2+y*(-0.157565e-2+y*(0.916281e-2+             # <<<<<<<<<<<<<<
 *         y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1+
 *         y*0.392377e-2))))))))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ax); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ax); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysndlib/clm.pyx":5596
 *         y=3.75/ax;
 *         ans=(exp(ax)/sqrt(ax))*(0.39894228+y*(0.1328592e-1+y*(0.225319e-2+y*(-0.157565e-2+y*(0.916281e-2+
 *         y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1+             # <<<<<<<<<<<<<<
 *         y*0.392377e-2))))))))
 *     return ans
 */
    __pyx_t_2 = PyFloat_FromDouble((0.39894228 + (__pyx_v_y * (0.1328592e-1 + (__pyx_v_y * (0.225319e-2 + (__pyx_v_y * (-0.157565e-2 + (__pyx_v_y * (0.916281e-2 + (__pyx_v_y * (-0.2057706e-1 + (__pyx_v_y * (0.2635537e-1 + (__pyx_v_y * (-0.1647633e-1 + (__pyx_v_y * 0.392377e-2))))))))))))))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pysndlib/clm.pyx":5595
 *     else:
 *         y=3.75/ax;
 *         ans=(exp(ax)/sqrt(ax))*(0.39894228+y*(0.1328592e-1+y*(0.225319e-2+y*(-0.157565e-2+y*(0.916281e-2+             # <<<<<<<<<<<<<<
 *         y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1+
 *         y*0.392377e-2))))))))
 */
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ans = __pyx_t_6;
  }
  __pyx_L3:;

  /* "pysndlib/clm.pyx":5598
 *         y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1+
 *         y*0.392377e-2))))))))
 *     return ans             # <<<<<<<<<<<<<<
 * 
 * from pysndlib.cmath_sf cimport j0, j1, jn, y0, y1, yn
 */
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5584
 * from math import fabs, sqrt, exp
 * 
 * cpdef cython.double bes_i0(cython.double x):             # <<<<<<<<<<<<<<
 *     cdef cython.double ax
 *     cdef cython.double ans
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysndlib.clm.bes_i0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_614bes_i0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_614bes_i0 = {"bes_i0", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_614bes_i0, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_614bes_i0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_i0 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5584, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_i0") < 0)) __PYX_ERR(0, 5584, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5584, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_i0", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5584, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_i0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_613bes_i0(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_613bes_i0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_i0", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_i0(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5584, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_i0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5602
 * from pysndlib.cmath_sf cimport j0, j1, jn, y0, y1, yn
 * 
 * cpdef cython.double bes_j0(cython.double x):             # <<<<<<<<<<<<<<
 *     return j0(x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_616bes_j0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_j0(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5603
 * 
 * cpdef cython.double bes_j0(cython.double x):
 *     return j0(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_j1(cython.double x):
 */
  __pyx_r = j0(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5602
 * from pysndlib.cmath_sf cimport j0, j1, jn, y0, y1, yn
 * 
 * cpdef cython.double bes_j0(cython.double x):             # <<<<<<<<<<<<<<
 *     return j0(x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_616bes_j0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_616bes_j0 = {"bes_j0", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_616bes_j0, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_616bes_j0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_j0 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5602, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_j0") < 0)) __PYX_ERR(0, 5602, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5602, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_j0", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5602, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_j0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_615bes_j0(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_615bes_j0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_j0", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_j0(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5602, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_j0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5605
 *     return j0(x)
 * 
 * cpdef cython.double bes_j1(cython.double x):             # <<<<<<<<<<<<<<
 *     return j1(x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_618bes_j1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_j1(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5606
 * 
 * cpdef cython.double bes_j1(cython.double x):
 *     return j1(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):
 */
  __pyx_r = j1(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5605
 *     return j0(x)
 * 
 * cpdef cython.double bes_j1(cython.double x):             # <<<<<<<<<<<<<<
 *     return j1(x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_618bes_j1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_618bes_j1 = {"bes_j1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_618bes_j1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_618bes_j1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_j1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5605, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_j1") < 0)) __PYX_ERR(0, 5605, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5605, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_j1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5605, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_j1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_617bes_j1(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_617bes_j1(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_j1", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_j1(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5605, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_j1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5608
 *     return j1(x)
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return jn(n, x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_620bes_jn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_jn(int __pyx_v_n, double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5609
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):
 *     return jn(n, x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_y0(cython.double x):
 */
  __pyx_r = jn(__pyx_v_n, __pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5608
 *     return j1(x)
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return jn(n, x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_620bes_jn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_620bes_jn = {"bes_jn", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_620bes_jn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_620bes_jn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_n;
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_jn (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("bes_jn", 1, 2, 2, 1); __PYX_ERR(0, 5608, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_jn") < 0)) __PYX_ERR(0, 5608, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_n = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L3_error)
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_jn", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5608, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_jn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_619bes_jn(__pyx_self, __pyx_v_n, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_619bes_jn(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_jn", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_jn(__pyx_v_n, __pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_jn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5611
 *     return jn(n, x)
 * 
 * cpdef cython.double bes_y0(cython.double x):             # <<<<<<<<<<<<<<
 *     return y0(x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_622bes_y0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_y0(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5612
 * 
 * cpdef cython.double bes_y0(cython.double x):
 *     return y0(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_y1(cython.double x):
 */
  __pyx_r = y0(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5611
 *     return jn(n, x)
 * 
 * cpdef cython.double bes_y0(cython.double x):             # <<<<<<<<<<<<<<
 *     return y0(x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_622bes_y0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_622bes_y0 = {"bes_y0", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_622bes_y0, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_622bes_y0(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_y0 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5611, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_y0") < 0)) __PYX_ERR(0, 5611, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5611, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_y0", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5611, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_y0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_621bes_y0(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_621bes_y0(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_y0", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_y0(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5611, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_y0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5614
 *     return y0(x)
 * 
 * cpdef cython.double bes_y1(cython.double x):             # <<<<<<<<<<<<<<
 *     return y1(x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_624bes_y1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_y1(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5615
 * 
 * cpdef cython.double bes_y1(cython.double x):
 *     return y1(x)             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):
 */
  __pyx_r = y1(__pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5614
 *     return y0(x)
 * 
 * cpdef cython.double bes_y1(cython.double x):             # <<<<<<<<<<<<<<
 *     return y1(x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_624bes_y1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_624bes_y1 = {"bes_y1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_624bes_y1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_624bes_y1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_y1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5614, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_y1") < 0)) __PYX_ERR(0, 5614, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5614, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_y1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5614, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_y1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_623bes_y1(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_623bes_y1(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_y1", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_y1(__pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5614, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_y1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5617
 *     return y1(x)
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return yn(n, x)
 * 
 */

static PyObject *__pyx_pw_8pysndlib_3clm_626bes_yn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_8pysndlib_3clm_bes_yn(int __pyx_v_n, double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;

  /* "pysndlib/clm.pyx":5618
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):
 *     return yn(n, x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = yn(__pyx_v_n, __pyx_v_x);
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5617
 *     return y1(x)
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return yn(n, x)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_626bes_yn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_626bes_yn = {"bes_yn", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_626bes_yn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_626bes_yn(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_n;
  double __pyx_v_x;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bes_yn (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("bes_yn", 1, 2, 2, 1); __PYX_ERR(0, 5617, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bes_yn") < 0)) __PYX_ERR(0, 5617, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_n = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L3_error)
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bes_yn", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5617, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.bes_yn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_625bes_yn(__pyx_self, __pyx_v_n, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_625bes_yn(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bes_yn", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_bes_yn(__pyx_v_n, __pyx_v_x, 0); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysndlib.clm.bes_yn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysndlib/clm.pyx":5621
 * 
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):             # <<<<<<<<<<<<<<
 *     if size is None:
 *         size = len(data)
 */

static PyObject *__pyx_pw_8pysndlib_3clm_628edot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static __pyx_t_double_complex __pyx_f_8pysndlib_3clm_edot_product(__pyx_t_double_complex __pyx_v_freq, PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_edot_product *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_v_c = NULL;
  __pyx_t_double_complex __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __pyx_t_double_complex __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edot_product", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  __Pyx_INCREF(__pyx_v_size);

  /* "pysndlib/clm.pyx":5622
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):
 *     if size is None:             # <<<<<<<<<<<<<<
 *         size = len(data)
 *     c = np.exp(np.arange(size) * freq) * data
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  if (__pyx_t_1) {

    /* "pysndlib/clm.pyx":5623
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):
 *     if size is None:
 *         size = len(data)             # <<<<<<<<<<<<<<
 *     c = np.exp(np.arange(size) * freq) * data
 *     return np.sum(c)
 */
    __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5623, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysndlib/clm.pyx":5622
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):
 *     if size is None:             # <<<<<<<<<<<<<<
 *         size = len(data)
 *     c = np.exp(np.arange(size) * freq) * data
 */
  }

  /* "pysndlib/clm.pyx":5624
 *     if size is None:
 *         size = len(data)
 *     c = np.exp(np.arange(size) * freq) * data             # <<<<<<<<<<<<<<
 *     return np.sum(c)
 * #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_arange); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_size};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_freq); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_c = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysndlib/clm.pyx":5625
 *         size = len(data)
 *     c = np.exp(np.arange(size) * freq) * data
 *     return np.sum(c)             # <<<<<<<<<<<<<<
 * #
 * # print(edot_product(complex(.2,.4), np.array([1,3,6])))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_c};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_9;
  goto __pyx_L0;

  /* "pysndlib/clm.pyx":5621
 * 
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):             # <<<<<<<<<<<<<<
 *     if size is None:
 *         size = len(data)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysndlib.clm.edot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = __pyx_t_double_complex_from_parts(0, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_628edot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_628edot_product = {"edot_product", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_628edot_product, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_628edot_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __pyx_t_double_complex __pyx_v_freq;
  PyArrayObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("edot_product (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_freq,&__pyx_n_s_data,&__pyx_n_s_size,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_freq)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5621, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5621, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("edot_product", 0, 2, 3, 1); __PYX_ERR(0, 5621, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5621, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "edot_product") < 0)) __PYX_ERR(0, 5621, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_freq = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5621, __pyx_L3_error)
    __pyx_v_data = ((PyArrayObject *)values[1]);
    __pyx_v_size = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("edot_product", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5621, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.edot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 5621, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pysndlib_3clm_627edot_product(__pyx_self, __pyx_v_freq, __pyx_v_data, __pyx_v_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_627edot_product(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_double_complex __pyx_v_freq, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_double_complex __pyx_t_1;
  struct __pyx_opt_args_8pysndlib_3clm_edot_product __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edot_product", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_f_8pysndlib_3clm_edot_product(__pyx_v_freq, __pyx_v_data, 0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5621, __pyx_L1_error)
  __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysndlib.clm.edot_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_array_readin_gen(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_8pysndlib_3clm_630__pyx_unpickle_array_readin_gen(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_8pysndlib_3clm_630__pyx_unpickle_array_readin_gen = {"__pyx_unpickle_array_readin_gen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_630__pyx_unpickle_array_readin_gen, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8pysndlib_3clm_630__pyx_unpickle_array_readin_gen(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_array_readin_gen (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_readin_gen", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_readin_gen", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_array_readin_gen") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_readin_gen", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysndlib.clm.__pyx_unpickle_array_readin_gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8pysndlib_3clm_629__pyx_unpickle_array_readin_gen(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8pysndlib_3clm_629__pyx_unpickle_array_readin_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_array_readin_gen", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb0d31f2, 0x2f51b3c, 0xdd47448):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__70, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb0d31f2, 0x2f51b3c, 0xdd47448):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb0d31f2, 0x2f51b3c, 0xdd47448):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb0d31f2, 0x2f51b3c, 0xdd47448):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_8pysndlib_3clm_array_readin_gen), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_8pysndlib_3clm___pyx_unpickle_array_readin_gen__set_state(((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 *     __pyx_result = array_readin_gen.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_array_readin_gen(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysndlib.clm.__pyx_unpickle_array_readin_gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_8pysndlib_3clm___pyx_unpickle_array_readin_gen__set_state(struct __pyx_obj_8pysndlib_3clm_array_readin_gen *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  float __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_array_readin_gen__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_arr);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_arr);
  __pyx_v___pyx_result->_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_chan = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_direction = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_length = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_location = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_start = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_val = __pyx_t_4;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 > 7);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "(tree fragment)":14
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    __pyx_t_2 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_2 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_array_readin_gen__set_state(<array_readin_gen> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_array_readin_gen__set_state(array_readin_gen __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._arr = __pyx_state[0]; __pyx_result._chan = __pyx_state[1]; __pyx_result._direction = __pyx_state[2]; __pyx_result._length = __pyx_state[3]; __pyx_result._location = __pyx_state[4]; __pyx_result._start = __pyx_state[5]; __pyx_result._val = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysndlib.clm.__pyx_unpickle_array_readin_gen__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_8pysndlib_3clm_mus_any __pyx_vtable_8pysndlib_3clm_mus_any;

static PyObject *__pyx_tp_new_8pysndlib_3clm_mus_any(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)o);
  p->__pyx_vtab = __pyx_vtabptr_8pysndlib_3clm_mus_any;
  p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_data = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_xcoeffs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_ycoeffs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_pv_amp_increments = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_pv_amps = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_pv_freqs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_pv_phases = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_pv_phase_increments = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_8pysndlib_3clm_7mus_any_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_8pysndlib_3clm_mus_any(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm_mus_any *p = (struct __pyx_obj_8pysndlib_3clm_mus_any *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm_mus_any) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_8pysndlib_3clm_7mus_any_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_cache);
  Py_CLEAR(p->_data);
  Py_CLEAR(p->_xcoeffs);
  Py_CLEAR(p->_ycoeffs);
  Py_CLEAR(p->_pv_amp_increments);
  Py_CLEAR(p->_pv_amps);
  Py_CLEAR(p->_pv_freqs);
  Py_CLEAR(p->_pv_phases);
  Py_CLEAR(p->_pv_phase_increments);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_8pysndlib_3clm_mus_any(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm_mus_any *p = (struct __pyx_obj_8pysndlib_3clm_mus_any *)o;
  if (p->_cache) {
    e = (*v)(p->_cache, a); if (e) return e;
  }
  if (p->_data) {
    e = (*v)(((PyObject *)p->_data), a); if (e) return e;
  }
  if (p->_xcoeffs) {
    e = (*v)(((PyObject *)p->_xcoeffs), a); if (e) return e;
  }
  if (p->_ycoeffs) {
    e = (*v)(((PyObject *)p->_ycoeffs), a); if (e) return e;
  }
  if (p->_pv_amp_increments) {
    e = (*v)(((PyObject *)p->_pv_amp_increments), a); if (e) return e;
  }
  if (p->_pv_amps) {
    e = (*v)(((PyObject *)p->_pv_amps), a); if (e) return e;
  }
  if (p->_pv_freqs) {
    e = (*v)(((PyObject *)p->_pv_freqs), a); if (e) return e;
  }
  if (p->_pv_phases) {
    e = (*v)(((PyObject *)p->_pv_phases), a); if (e) return e;
  }
  if (p->_pv_phase_increments) {
    e = (*v)(((PyObject *)p->_pv_phase_increments), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm_mus_any(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm_mus_any *p = (struct __pyx_obj_8pysndlib_3clm_mus_any *)o;
  tmp = ((PyObject*)p->_cache);
  p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_data);
  p->_data = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_xcoeffs);
  p->_xcoeffs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ycoeffs);
  p->_ycoeffs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pv_amp_increments);
  p->_pv_amp_increments = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pv_amps);
  p->_pv_amps = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pv_freqs);
  p->_pv_freqs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pv_phases);
  p->_pv_phases = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pv_phase_increments);
  p->_pv_phase_increments = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_frequency(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_frequency(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_13mus_frequency_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_phase(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_phase(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_9mus_phase_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_length_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_increment(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_increment(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_13mus_increment_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_location(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_12mus_location_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_channels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_12mus_channels_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_interp_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_15mus_interp_type_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_9mus_width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_order(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_9mus_order_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_scaler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_scaler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_10mus_scaler_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_feedback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_feedback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_12mus_feedback_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_feedforward(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_feedforward(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_15mus_feedforward_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_hop(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_hop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_7mus_hop_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_ramp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_ramp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_8mus_ramp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_channel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_11mus_channel_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_7mus_any_mus_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_7mus_any_8mus_data_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_xcoeffs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_11mus_xcoeffs_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_ycoeffs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_11mus_ycoeffs_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_7mus_any_mus_file_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_7mus_any_13mus_file_name_1__get__(o);
}

static PyMethodDef __pyx_methods_8pysndlib_3clm_mus_any[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_7mus_any_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8pysndlib_3clm_mus_any[] = {
  {(char *)"mus_frequency", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_frequency, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_frequency, (char *)PyDoc_STR("\n        frequency (hz), float\n        "), 0},
  {(char *)"mus_phase", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_phase, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_phase, (char *)PyDoc_STR("\n        phase (radians), float\n        "), 0},
  {(char *)"mus_length", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_length, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_length, (char *)PyDoc_STR("\n        data length, int\n        "), 0},
  {(char *)"mus_increment", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_increment, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_increment, (char *)PyDoc_STR("\n        various increments, int\n        "), 0},
  {(char *)"mus_location", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_location, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_location, (char *)PyDoc_STR("\n        sample location for reads/write, int\n        "), 0},
  {(char *)"mus_offset", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_offset, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_offset, (char *)0, 0},
  {(char *)"mus_channels", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_channels, 0, (char *)PyDoc_STR("\n        channels open, int\n        "), 0},
  {(char *)"mus_interp_type", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_interp_type, 0, (char *)PyDoc_STR("\n        interpolation type (inter.linear, etc), interp\n        not setable\n        "), 0},
  {(char *)"mus_width", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_width, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_width, (char *)PyDoc_STR("\n        width of interpolation tables, etc, int\n        "), 0},
  {(char *)"mus_order", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_order, 0, (char *)PyDoc_STR("\n        filter order, int\n        "), 0},
  {(char *)"mus_scaler", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_scaler, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_scaler, (char *)PyDoc_STR("\n        scaler, normally on an amplitude, float\n        "), 0},
  {(char *)"mus_feedback", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_feedback, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_feedback, (char *)PyDoc_STR("\n        feedback coefficient, float\n        "), 0},
  {(char *)"mus_feedforward", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_feedforward, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_feedforward, (char *)PyDoc_STR("\n        feedforward coefficient, float\n        "), 0},
  {(char *)"mus_hop", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_hop, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_hop, (char *)PyDoc_STR("\n        hop size for block processing, int\n        "), 0},
  {(char *)"mus_ramp", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_ramp, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_ramp, (char *)PyDoc_STR("\n        granulate grain envelope ramp setting, int\n        "), 0},
  {(char *)"mus_channel", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_channel, 0, (char *)PyDoc_STR("\n        channel being read/written, int\n        "), 0},
  {(char *)"mus_data", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_data, __pyx_setprop_8pysndlib_3clm_7mus_any_mus_data, (char *)PyDoc_STR("\n        array of data, np.ndarray\n        "), 0},
  {(char *)"mus_xcoeffs", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_xcoeffs, 0, (char *)PyDoc_STR("\n        x (input) coefficient, np.ndarray\n        not setable\n        "), 0},
  {(char *)"mus_ycoeffs", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_ycoeffs, 0, (char *)PyDoc_STR("\n        y (output, feedback) coefficient, np.ndarray\n        not setable\n        "), 0},
  {(char *)"mus_file_name", __pyx_getprop_8pysndlib_3clm_7mus_any_mus_file_name, 0, (char *)PyDoc_STR("\n        file being read/written\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm_mus_any_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm_mus_any},
  {Py_tp_call, (void *)__pyx_pw_8pysndlib_3clm_7mus_any_19__call__},
  {Py_tp_str, (void *)__pyx_pw_8pysndlib_3clm_7mus_any_21__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    a wrapper class for mus_any pointers in c\n    \n    instances of this class have the following properties, which may be \n    used if supported by the type of generator used to make the instance:\n    \n    \n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm_mus_any},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm_mus_any},
  {Py_tp_methods, (void *)__pyx_methods_8pysndlib_3clm_mus_any},
  {Py_tp_getset, (void *)__pyx_getsets_8pysndlib_3clm_mus_any},
  {Py_tp_init, (void *)__pyx_pw_8pysndlib_3clm_7mus_any_5__init__},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm_mus_any},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm_mus_any_spec = {
  "pysndlib.clm.mus_any",
  sizeof(struct __pyx_obj_8pysndlib_3clm_mus_any),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_8pysndlib_3clm_mus_any_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm_mus_any = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""mus_any", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm_mus_any), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm_mus_any, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_8pysndlib_3clm_7mus_any_19__call__, /*tp_call*/
  __pyx_pw_8pysndlib_3clm_7mus_any_21__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    a wrapper class for mus_any pointers in c\n    \n    instances of this class have the following properties, which may be \n    used if supported by the type of generator used to make the instance:\n    \n    \n    "), /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm_mus_any, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm_mus_any, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8pysndlib_3clm_mus_any, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8pysndlib_3clm_mus_any, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_8pysndlib_3clm_7mus_any_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm_mus_any, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_8pysndlib_3clm_mus_any_array __pyx_vtable_8pysndlib_3clm_mus_any_array;

static PyObject *__pyx_tp_new_8pysndlib_3clm_mus_any_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_8pysndlib_3clm_mus_any_array *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_8pysndlib_3clm_mus_any_array *)o);
  p->__pyx_vtab = __pyx_vtabptr_8pysndlib_3clm_mus_any_array;
  if (unlikely(__pyx_pw_8pysndlib_3clm_13mus_any_array_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_8pysndlib_3clm_mus_any_array(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm_mus_any_array) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_8pysndlib_3clm_13mus_any_array_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static PyMethodDef __pyx_methods_8pysndlib_3clm_mus_any_array[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13mus_any_array_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_13mus_any_array_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm_mus_any_array_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm_mus_any_array},
  {Py_sq_length, (void *)__pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__},
  {Py_mp_length, (void *)__pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__},
  {Py_tp_str, (void *)__pyx_pw_8pysndlib_3clm_13mus_any_array_7__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    a wrapper class arrays of mus_any objects\n    :meta private:\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_8pysndlib_3clm_mus_any_array},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm_mus_any_array},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm_mus_any_array_spec = {
  "pysndlib.clm.mus_any_array",
  sizeof(struct __pyx_obj_8pysndlib_3clm_mus_any_array),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_8pysndlib_3clm_mus_any_array_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_mus_any_array = {
  __pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_mus_any_array = {
  __pyx_pw_8pysndlib_3clm_13mus_any_array_5__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_8pysndlib_3clm_mus_any_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""mus_any_array", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm_mus_any_array), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm_mus_any_array, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_mus_any_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_mus_any_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_8pysndlib_3clm_13mus_any_array_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    a wrapper class arrays of mus_any objects\n    :meta private:\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8pysndlib_3clm_mus_any_array, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm_mus_any_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_8pysndlib_3clm_array_readin_gen(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)o);
  p->_arr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm_array_readin_gen(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *p = (struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm_array_readin_gen) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_arr);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_8pysndlib_3clm_array_readin_gen(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *p = (struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)o;
  if (p->_arr) {
    e = (*v)(((PyObject *)p->_arr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm_array_readin_gen(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm_array_readin_gen *p = (struct __pyx_obj_8pysndlib_3clm_array_readin_gen *)o;
  tmp = ((PyObject*)p->_arr);
  p->_arr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_channel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_16array_readin_gen_11mus_channel_1__get__(o);
}

static PyObject *__pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_location(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_16array_readin_gen_mus_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_16array_readin_gen_12mus_location_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_increment(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_1__get__(o);
}

static int __pyx_setprop_8pysndlib_3clm_16array_readin_gen_mus_increment(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8pysndlib_3clm_16array_readin_gen_13mus_increment_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8pysndlib_3clm_16array_readin_gen_10mus_length_1__get__(o);
}

static PyMethodDef __pyx_methods_8pysndlib_3clm_array_readin_gen[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8pysndlib_3clm_array_readin_gen[] = {
  {(char *)"mus_channel", __pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_channel, 0, (char *)0, 0},
  {(char *)"mus_location", __pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_location, __pyx_setprop_8pysndlib_3clm_16array_readin_gen_mus_location, (char *)0, 0},
  {(char *)"mus_increment", __pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_increment, __pyx_setprop_8pysndlib_3clm_16array_readin_gen_mus_increment, (char *)0, 0},
  {(char *)"mus_length", __pyx_getprop_8pysndlib_3clm_16array_readin_gen_mus_length, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm_array_readin_gen_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm_array_readin_gen},
  {Py_tp_call, (void *)__pyx_pw_8pysndlib_3clm_16array_readin_gen_3__call__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm_array_readin_gen},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm_array_readin_gen},
  {Py_tp_methods, (void *)__pyx_methods_8pysndlib_3clm_array_readin_gen},
  {Py_tp_getset, (void *)__pyx_getsets_8pysndlib_3clm_array_readin_gen},
  {Py_tp_init, (void *)__pyx_pw_8pysndlib_3clm_16array_readin_gen_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm_array_readin_gen},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm_array_readin_gen_spec = {
  "pysndlib.clm.array_readin_gen",
  sizeof(struct __pyx_obj_8pysndlib_3clm_array_readin_gen),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_8pysndlib_3clm_array_readin_gen_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm_array_readin_gen = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""array_readin_gen", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm_array_readin_gen), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm_array_readin_gen, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_8pysndlib_3clm_16array_readin_gen_3__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm_array_readin_gen, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm_array_readin_gen, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8pysndlib_3clm_array_readin_gen, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8pysndlib_3clm_array_readin_gen, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_8pysndlib_3clm_16array_readin_gen_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm_array_readin_gen, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct__genexpr[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct__genexpr = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct__genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct__genexpr[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct__genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct__genexpr(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct__genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_j);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct__genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct__genexpr[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr *)o;
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_j) {
    e = (*v)(p->__pyx_v_j, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct__genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct__genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct__genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr_spec = {
  "pysndlib.clm.__pyx_scope_struct__genexpr",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct__genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct__genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct__genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct__genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct__genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_1_make_src[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_1_make_src = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_1_make_src(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_1_make_src > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_1_make_src[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_1_make_src];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_1_make_src(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_1_make_src) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_inp);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_1_make_src < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_1_make_src[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_1_make_src++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_1_make_src(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)o;
  if (p->__pyx_v_inp) {
    e = (*v)(p->__pyx_v_inp, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_1_make_src(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src *)o;
  tmp = ((PyObject*)p->__pyx_v_inp);
  p->__pyx_v_inp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_1_make_src},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_1_make_src},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_1_make_src},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_1_make_src},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src_spec = {
  "pysndlib.clm.__pyx_scope_struct_1_make_src",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_1_make_src", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_1_make_src), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_1_make_src, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_1_make_src, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_1_make_src, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_1_make_src, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_2_make_convolve[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_2_make_convolve = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_2_make_convolve > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_2_make_convolve[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_2_make_convolve];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_2_make_convolve) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_inp);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_2_make_convolve < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_2_make_convolve[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_2_make_convolve++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)o;
  if (p->__pyx_v_inp) {
    e = (*v)(p->__pyx_v_inp, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_2_make_convolve(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve *)o;
  tmp = ((PyObject*)p->__pyx_v_inp);
  p->__pyx_v_inp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_2_make_convolve},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_2_make_convolve},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_2_make_convolve},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_2_make_convolve},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve_spec = {
  "pysndlib.clm.__pyx_scope_struct_2_make_convolve",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_2_make_convolve", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_2_make_convolve), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_2_make_convolve, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_2_make_convolve, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_2_make_convolve, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_2_make_convolve, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_3_make_granulate[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_3_make_granulate = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_3_make_granulate > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_3_make_granulate[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_3_make_granulate];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_3_make_granulate) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_edit);
  Py_CLEAR(p->__pyx_v_inp);
  Py_CLEAR(p->__pyx_v_res);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_3_make_granulate < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_3_make_granulate[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_3_make_granulate++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)o;
  if (p->__pyx_v_edit) {
    e = (*v)(p->__pyx_v_edit, a); if (e) return e;
  }
  if (p->__pyx_v_inp) {
    e = (*v)(p->__pyx_v_inp, a); if (e) return e;
  }
  if (p->__pyx_v_res) {
    e = (*v)(((PyObject *)p->__pyx_v_res), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_3_make_granulate(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate *)o;
  tmp = ((PyObject*)p->__pyx_v_edit);
  p->__pyx_v_edit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_inp);
  p->__pyx_v_inp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_res);
  p->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_3_make_granulate},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_3_make_granulate},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_3_make_granulate},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_3_make_granulate},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate_spec = {
  "pysndlib.clm.__pyx_scope_struct_3_make_granulate",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_3_make_granulate", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_3_make_granulate), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_3_make_granulate, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_3_make_granulate, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_3_make_granulate, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_3_make_granulate, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_analyze);
  Py_CLEAR(p->__pyx_v_edit);
  Py_CLEAR(p->__pyx_v_inp);
  Py_CLEAR(p->__pyx_v_res);
  Py_CLEAR(p->__pyx_v_synthesize);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)o;
  if (p->__pyx_v_analyze) {
    e = (*v)(p->__pyx_v_analyze, a); if (e) return e;
  }
  if (p->__pyx_v_edit) {
    e = (*v)(p->__pyx_v_edit, a); if (e) return e;
  }
  if (p->__pyx_v_inp) {
    e = (*v)(p->__pyx_v_inp, a); if (e) return e;
  }
  if (p->__pyx_v_res) {
    e = (*v)(((PyObject *)p->__pyx_v_res), a); if (e) return e;
  }
  if (p->__pyx_v_synthesize) {
    e = (*v)(p->__pyx_v_synthesize, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder *)o;
  tmp = ((PyObject*)p->__pyx_v_analyze);
  p->__pyx_v_analyze = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_edit);
  p->__pyx_v_edit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_inp);
  p->__pyx_v_inp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_res);
  p->__pyx_v_res = ((struct __pyx_obj_8pysndlib_3clm_mus_any *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_synthesize);
  p->__pyx_v_synthesize = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder_spec = {
  "pysndlib.clm.__pyx_scope_struct_4_make_phase_vocoder",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_4_make_phase_vocoder", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_5_array_reader[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_5_array_reader = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_5_array_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_5_array_reader > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_5_array_reader[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_5_array_reader];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_5_array_reader(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_5_array_reader) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arr);
  Py_CLEAR(p->__pyx_v_chan);
  Py_CLEAR(p->__pyx_v_ind);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_5_array_reader < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_5_array_reader[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_5_array_reader++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_5_array_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)o;
  if (p->__pyx_v_arr) {
    e = (*v)(p->__pyx_v_arr, a); if (e) return e;
  }
  if (p->__pyx_v_chan) {
    e = (*v)(p->__pyx_v_chan, a); if (e) return e;
  }
  if (p->__pyx_v_ind) {
    e = (*v)(p->__pyx_v_ind, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_5_array_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_arr);
  p->__pyx_v_arr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_chan);
  p->__pyx_v_chan = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ind);
  p->__pyx_v_ind = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_5_array_reader},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_5_array_reader},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_5_array_reader},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_5_array_reader},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader_spec = {
  "pysndlib.clm.__pyx_scope_struct_5_array_reader",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_5_array_reader", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_5_array_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_5_array_reader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_5_array_reader, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_5_array_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_5_array_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_func);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)o;
  if (p->__pyx_v_func) {
    e = (*v)(p->__pyx_v_func, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb *)o;
  tmp = ((PyObject*)p->__pyx_v_func);
  p->__pyx_v_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb},
  {Py_tp_clear, (void *)__pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb_spec = {
  "pysndlib.clm.__pyx_scope_struct_6_clm_reverb",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_6_clm_reverb", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb, /*tp_traverse*/
  __pyx_tp_clear_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator[8];
static int __pyx_freecount_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator = 0;

static PyObject *__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator)))) {
    o = (PyObject*)__pyx_freelist_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator[--__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator];
    memset(o, 0, sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator(PyObject *o) {
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arr);
  Py_CLEAR(p->__pyx_v_n);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator)))) {
    __pyx_freelist_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator[__pyx_freecount_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator++] = ((struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *p = (struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator *)o;
  if (p->__pyx_v_arr) {
    e = (*v)(p->__pyx_v_arr, a); if (e) return e;
  }
  if (p->__pyx_v_n) {
    e = (*v)(p->__pyx_v_n, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator},
  {Py_tp_new, (void *)__pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator},
  {0, 0},
};
static PyType_Spec __pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator_spec = {
  "pysndlib.clm.__pyx_scope_struct_7_impulse_generator",
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator_slots,
};
#else

static PyTypeObject __pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__pyx_scope_struct_7_impulse_generator", /*tp_name*/
  sizeof(struct __pyx_obj_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static int __pyx_tp_traverse___Pyx_EnumMeta(PyObject *o, visitproc v, void *a) {
  int e;
  if (!(&PyType_Type)->tp_traverse); else { e = (&PyType_Type)->tp_traverse(o,v,a); if (e) return e; }
  return 0;
}

static int __pyx_tp_clear___Pyx_EnumMeta(PyObject *o) {
  if (!(&PyType_Type)->tp_clear); else (&PyType_Type)->tp_clear(o);
  return 0;
}
static PyObject *__pyx_sq_item___Pyx_EnumMeta(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyMethodDef __pyx_methods___Pyx_EnumMeta[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __Pyx_EnumMeta_slots[] = {
  {Py_sq_item, (void *)__pyx_sq_item___Pyx_EnumMeta},
  {Py_mp_subscript, (void *)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_5__getitem__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse___Pyx_EnumMeta},
  {Py_tp_clear, (void *)__pyx_tp_clear___Pyx_EnumMeta},
  {Py_tp_iter, (void *)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_3__iter__},
  {Py_tp_methods, (void *)__pyx_methods___Pyx_EnumMeta},
  {Py_tp_init, (void *)__pyx_pw_8EnumBase_14__Pyx_EnumMeta_1__init__},
  {0, 0},
};
static PyType_Spec __Pyx_EnumMeta_spec = {
  "pysndlib.clm.__Pyx_EnumMeta",
  sizeof(struct __pyx_obj___Pyx_EnumMeta),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __Pyx_EnumMeta_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence___Pyx_EnumMeta = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item___Pyx_EnumMeta, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___Pyx_EnumMeta = {
  0, /*mp_length*/
  __pyx_pw_8EnumBase_14__Pyx_EnumMeta_5__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __Pyx_EnumMeta = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""__Pyx_EnumMeta", /*tp_name*/
  sizeof(struct __pyx_obj___Pyx_EnumMeta), /*tp_basicsize*/
  0, /*tp_itemsize*/
  0, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence___Pyx_EnumMeta, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___Pyx_EnumMeta, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse___Pyx_EnumMeta, /*tp_traverse*/
  __pyx_tp_clear___Pyx_EnumMeta, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_8EnumBase_14__Pyx_EnumMeta_3__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods___Pyx_EnumMeta, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_8EnumBase_14__Pyx_EnumMeta_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  0, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_array___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}
static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_array = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_array_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
  {Py_sq_length, (void *)__pyx_array___len__},
  {Py_sq_item, (void *)__pyx_sq_item_array},
  {Py_mp_length, (void *)__pyx_array___len__},
  {Py_mp_subscript, (void *)__pyx_array___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
  {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
  #endif
  {Py_tp_methods, (void *)__pyx_methods_array},
  {Py_tp_getset, (void *)__pyx_getsets_array},
  {Py_tp_new, (void *)__pyx_tp_new_array},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_array_spec = {
  "pysndlib.clm.array",
  sizeof(struct __pyx_array_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_array_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_MemviewEnum___repr__(self);
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
  {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
  {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
  {Py_tp_methods, (void *)__pyx_methods_Enum},
  {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
  {Py_tp_new, (void *)__pyx_tp_new_Enum},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
  "pysndlib.clm.Enum",
  sizeof(struct __pyx_MemviewEnum_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_MemviewEnum_slots,
};
#else

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_MemviewEnum___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryview___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  Py_CLEAR(p->_array_interface);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->_array_interface) {
    e = (*v)(p->_array_interface, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_array_interface);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}
static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_memoryview___repr__(self);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
  {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
  {Py_tp_repr, (void *)__pyx_memoryview___repr__},
  {Py_sq_length, (void *)__pyx_memoryview___len__},
  {Py_sq_item, (void *)__pyx_sq_item_memoryview},
  {Py_mp_length, (void *)__pyx_memoryview___len__},
  {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
  {Py_tp_str, (void *)__pyx_memoryview___str__},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
  #endif
  {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
  {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
  {Py_tp_methods, (void *)__pyx_methods_memoryview},
  {Py_tp_getset, (void *)__pyx_getsets_memoryview},
  {Py_tp_new, (void *)__pyx_tp_new_memoryview},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryview_spec = {
  "pysndlib.clm.memoryview",
  sizeof(struct __pyx_memoryview_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_memoryview_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_memoryview, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryviewslice___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
  {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
  {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
  {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
  {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
  "pysndlib.clm._memoryviewslice",
  sizeof(struct __pyx_memoryviewslice_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_memoryviewslice_slots,
};
#else

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysndlib.clm.""_memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
  PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new__memoryviewslice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
    {&__pyx_kp_u_0_8f, __pyx_k_0_8f, sizeof(__pyx_k_0_8f), 0, 1, 0, 0},
    {&__pyx_n_s_ADC, __pyx_k_ADC, sizeof(__pyx_k_ADC), 0, 0, 1, 1},
    {&__pyx_n_s_ADF, __pyx_k_ADF, sizeof(__pyx_k_ADF), 0, 0, 1, 1},
    {&__pyx_n_s_AIFC, __pyx_k_AIFC, sizeof(__pyx_k_AIFC), 0, 0, 1, 1},
    {&__pyx_n_s_AIFF, __pyx_k_AIFF, sizeof(__pyx_k_AIFF), 0, 0, 1, 1},
    {&__pyx_n_s_AKAI4, __pyx_k_AKAI4, sizeof(__pyx_k_AKAI4), 0, 0, 1, 1},
    {&__pyx_n_s_ALAW, __pyx_k_ALAW, sizeof(__pyx_k_ALAW), 0, 0, 1, 1},
    {&__pyx_n_s_ALL_PASS, __pyx_k_ALL_PASS, sizeof(__pyx_k_ALL_PASS), 0, 0, 1, 1},
    {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
    {&__pyx_n_s_ASF, __pyx_k_ASF, sizeof(__pyx_k_ASF), 0, 0, 1, 1},
    {&__pyx_n_s_AVI, __pyx_k_AVI, sizeof(__pyx_k_AVI), 0, 0, 1, 1},
    {&__pyx_n_s_AVR, __pyx_k_AVR, sizeof(__pyx_k_AVR), 0, 0, 1, 1},
    {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
    {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
    {&__pyx_n_s_B24INT, __pyx_k_B24INT, sizeof(__pyx_k_B24INT), 0, 0, 1, 1},
    {&__pyx_n_s_BARTLETT, __pyx_k_BARTLETT, sizeof(__pyx_k_BARTLETT), 0, 0, 1, 1},
    {&__pyx_n_s_BARTLETT_HANN, __pyx_k_BARTLETT_HANN, sizeof(__pyx_k_BARTLETT_HANN), 0, 0, 1, 1},
    {&__pyx_n_s_BDOUBLE, __pyx_k_BDOUBLE, sizeof(__pyx_k_BDOUBLE), 0, 0, 1, 1},
    {&__pyx_n_s_BDOUBLE_UNSCALED, __pyx_k_BDOUBLE_UNSCALED, sizeof(__pyx_k_BDOUBLE_UNSCALED), 0, 0, 1, 1},
    {&__pyx_n_s_BEZIER, __pyx_k_BEZIER, sizeof(__pyx_k_BEZIER), 0, 0, 1, 1},
    {&__pyx_n_s_BFLOAT, __pyx_k_BFLOAT, sizeof(__pyx_k_BFLOAT), 0, 0, 1, 1},
    {&__pyx_n_s_BFLOAT_UNSCALED, __pyx_k_BFLOAT_UNSCALED, sizeof(__pyx_k_BFLOAT_UNSCALED), 0, 0, 1, 1},
    {&__pyx_n_s_BICSF, __pyx_k_BICSF, sizeof(__pyx_k_BICSF), 0, 0, 1, 1},
    {&__pyx_n_s_BINT, __pyx_k_BINT, sizeof(__pyx_k_BINT), 0, 0, 1, 1},
    {&__pyx_n_s_BINTN, __pyx_k_BINTN, sizeof(__pyx_k_BINTN), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN10, __pyx_k_BLACKMAN10, sizeof(__pyx_k_BLACKMAN10), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN2, __pyx_k_BLACKMAN2, sizeof(__pyx_k_BLACKMAN2), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN3, __pyx_k_BLACKMAN3, sizeof(__pyx_k_BLACKMAN3), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN4, __pyx_k_BLACKMAN4, sizeof(__pyx_k_BLACKMAN4), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN5, __pyx_k_BLACKMAN5, sizeof(__pyx_k_BLACKMAN5), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN6, __pyx_k_BLACKMAN6, sizeof(__pyx_k_BLACKMAN6), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN7, __pyx_k_BLACKMAN7, sizeof(__pyx_k_BLACKMAN7), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN8, __pyx_k_BLACKMAN8, sizeof(__pyx_k_BLACKMAN8), 0, 0, 1, 1},
    {&__pyx_n_s_BLACKMAN9, __pyx_k_BLACKMAN9, sizeof(__pyx_k_BLACKMAN9), 0, 0, 1, 1},
    {&__pyx_n_s_BOHMAN, __pyx_k_BOHMAN, sizeof(__pyx_k_BOHMAN), 0, 0, 1, 1},
    {&__pyx_n_s_BOTH_KINDS, __pyx_k_BOTH_KINDS, sizeof(__pyx_k_BOTH_KINDS), 0, 0, 1, 1},
    {&__pyx_n_s_BSHORT, __pyx_k_BSHORT, sizeof(__pyx_k_BSHORT), 0, 0, 1, 1},
    {&__pyx_n_s_BYTE, __pyx_k_BYTE, sizeof(__pyx_k_BYTE), 0, 0, 1, 1},
    {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
    {&__pyx_n_s_CAFF, __pyx_k_CAFF, sizeof(__pyx_k_CAFF), 0, 0, 1, 1},
    {&__pyx_n_s_CAUCHY, __pyx_k_CAUCHY, sizeof(__pyx_k_CAUCHY), 0, 0, 1, 1},
    {&__pyx_n_s_CFUNCTYPE, __pyx_k_CFUNCTYPE, sizeof(__pyx_k_CFUNCTYPE), 0, 0, 1, 1},
    {&__pyx_n_s_COMDISCO, __pyx_k_COMDISCO, sizeof(__pyx_k_COMDISCO), 0, 0, 1, 1},
    {&__pyx_n_s_CONNES, __pyx_k_CONNES, sizeof(__pyx_k_CONNES), 0, 0, 1, 1},
    {&__pyx_n_s_COVOX, __pyx_k_COVOX, sizeof(__pyx_k_COVOX), 0, 0, 1, 1},
    {&__pyx_n_s_CSL, __pyx_k_CSL, sizeof(__pyx_k_CSL), 0, 0, 1, 1},
    {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
    {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
    {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
    {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
    {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
    {&__pyx_n_s_DEFAULT_FILE_NAME, __pyx_k_DEFAULT_FILE_NAME, sizeof(__pyx_k_DEFAULT_FILE_NAME), 0, 0, 1, 1},
    {&__pyx_n_s_DEFAULT_FILE_PLAYER, __pyx_k_DEFAULT_FILE_PLAYER, sizeof(__pyx_k_DEFAULT_FILE_PLAYER), 0, 0, 1, 1},
    {&__pyx_n_s_DEFAULT_OUTPUT_CHANS, __pyx_k_DEFAULT_OUTPUT_CHANS, sizeof(__pyx_k_DEFAULT_OUTPUT_CHANS), 0, 0, 1, 1},
    {&__pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE, __pyx_k_DEFAULT_OUTPUT_HEADER_TYPE, sizeof(__pyx_k_DEFAULT_OUTPUT_HEADER_TYPE), 0, 0, 1, 1},
    {&__pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE, __pyx_k_DEFAULT_OUTPUT_SAMPLE_TYPE, sizeof(__pyx_k_DEFAULT_OUTPUT_SAMPLE_TYPE), 0, 0, 1, 1},
    {&__pyx_n_s_DEFAULT_OUTPUT_SRATE, __pyx_k_DEFAULT_OUTPUT_SRATE, sizeof(__pyx_k_DEFAULT_OUTPUT_SRATE), 0, 0, 1, 1},
    {&__pyx_n_s_DELUSION, __pyx_k_DELUSION, sizeof(__pyx_k_DELUSION), 0, 0, 1, 1},
    {&__pyx_n_s_DIAMONDWARE, __pyx_k_DIAMONDWARE, sizeof(__pyx_k_DIAMONDWARE), 0, 0, 1, 1},
    {&__pyx_n_s_DIGIPLAYER, __pyx_k_DIGIPLAYER, sizeof(__pyx_k_DIGIPLAYER), 0, 0, 1, 1},
    {&__pyx_n_s_DOLPH_CHEBYSHEV, __pyx_k_DOLPH_CHEBYSHEV, sizeof(__pyx_k_DOLPH_CHEBYSHEV), 0, 0, 1, 1},
    {&__pyx_n_s_DPSS, __pyx_k_DPSS, sizeof(__pyx_k_DPSS), 0, 0, 1, 1},
    {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
    {&__pyx_n_s_EITHER_KIND, __pyx_k_EITHER_KIND, sizeof(__pyx_k_EITHER_KIND), 0, 0, 1, 1},
    {&__pyx_n_s_ESPS, __pyx_k_ESPS, sizeof(__pyx_k_ESPS), 0, 0, 1, 1},
    {&__pyx_n_s_EXPONENTIAL, __pyx_k_EXPONENTIAL, sizeof(__pyx_k_EXPONENTIAL), 0, 0, 1, 1},
    {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
    {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
    {&__pyx_n_s_EnumBase, __pyx_k_EnumBase, sizeof(__pyx_k_EnumBase), 0, 0, 1, 1},
    {&__pyx_n_s_EnumType, __pyx_k_EnumType, sizeof(__pyx_k_EnumType), 0, 0, 1, 1},
    {&__pyx_n_s_FARANDOLE, __pyx_k_FARANDOLE, sizeof(__pyx_k_FARANDOLE), 0, 0, 1, 1},
    {&__pyx_n_s_FILE_SAMP, __pyx_k_FILE_SAMP, sizeof(__pyx_k_FILE_SAMP), 0, 0, 1, 1},
    {&__pyx_n_s_FIRST_KIND, __pyx_k_FIRST_KIND, sizeof(__pyx_k_FIRST_KIND), 0, 0, 1, 1},
    {&__pyx_n_s_FLAC, __pyx_k_FLAC, sizeof(__pyx_k_FLAC), 0, 0, 1, 1},
    {&__pyx_n_s_FLAT_TOP, __pyx_k_FLAT_TOP, sizeof(__pyx_k_FLAT_TOP), 0, 0, 1, 1},
    {&__pyx_n_s_FileNotFoundError, __pyx_k_FileNotFoundError, sizeof(__pyx_k_FileNotFoundError), 0, 0, 1, 1},
    {&__pyx_kp_u_Filter_needs_values_for_a0_a1_a2, __pyx_k_Filter_needs_values_for_a0_a1_a2, sizeof(__pyx_k_Filter_needs_values_for_a0_a1_a2), 0, 1, 0, 0},
    {&__pyx_kp_u_Filter_needs_values_for_a0_b1_b2, __pyx_k_Filter_needs_values_for_a0_b1_b2, sizeof(__pyx_k_Filter_needs_values_for_a0_b1_b2), 0, 1, 0, 0},
    {&__pyx_n_s_GAUSSIAN, __pyx_k_GAUSSIAN, sizeof(__pyx_k_GAUSSIAN), 0, 0, 1, 1},
    {&__pyx_n_s_GOLDWAVE, __pyx_k_GOLDWAVE, sizeof(__pyx_k_GOLDWAVE), 0, 0, 1, 1},
    {&__pyx_n_s_GRAVIS, __pyx_k_GRAVIS, sizeof(__pyx_k_GRAVIS), 0, 0, 1, 1},
    {&__pyx_n_s_GeneratorType, __pyx_k_GeneratorType, sizeof(__pyx_k_GeneratorType), 0, 0, 1, 1},
    {&__pyx_n_s_HAMMING, __pyx_k_HAMMING, sizeof(__pyx_k_HAMMING), 0, 0, 1, 1},
    {&__pyx_n_s_HANN, __pyx_k_HANN, sizeof(__pyx_k_HANN), 0, 0, 1, 1},
    {&__pyx_n_s_HANN_POISSON, __pyx_k_HANN_POISSON, sizeof(__pyx_k_HANN_POISSON), 0, 0, 1, 1},
    {&__pyx_n_s_HCOM, __pyx_k_HCOM, sizeof(__pyx_k_HCOM), 0, 0, 1, 1},
    {&__pyx_n_s_HERMITE, __pyx_k_HERMITE, sizeof(__pyx_k_HERMITE), 0, 0, 1, 1},
    {&__pyx_n_s_Header, __pyx_k_Header, sizeof(__pyx_k_Header), 0, 0, 1, 1},
    {&__pyx_n_s_IEEE, __pyx_k_IEEE, sizeof(__pyx_k_IEEE), 0, 0, 1, 1},
    {&__pyx_n_s_IMPULSETRACKER, __pyx_k_IMPULSETRACKER, sizeof(__pyx_k_IMPULSETRACKER), 0, 0, 1, 1},
    {&__pyx_n_s_INRS, __pyx_k_INRS, sizeof(__pyx_k_INRS), 0, 0, 1, 1},
    {&__pyx_n_s_IN_DB, __pyx_k_IN_DB, sizeof(__pyx_k_IN_DB), 0, 0, 1, 1},
    {&__pyx_n_s_IRCAM, __pyx_k_IRCAM, sizeof(__pyx_k_IRCAM), 0, 0, 1, 1},
    {&__pyx_kp_u_If_not_specifying_coeffs_must_pr, __pyx_k_If_not_specifying_coeffs_must_pr, sizeof(__pyx_k_If_not_specifying_coeffs_must_pr), 0, 1, 0, 0},
    {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0},
    {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
    {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
    {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
    {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
    {&__pyx_n_s_IntFlag, __pyx_k_IntFlag, sizeof(__pyx_k_IntFlag), 0, 0, 1, 1},
    {&__pyx_n_s_Interp, __pyx_k_Interp, sizeof(__pyx_k_Interp), 0, 0, 1, 1},
    {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
    {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
    {&__pyx_n_s_KAISER, __pyx_k_KAISER, sizeof(__pyx_k_KAISER), 0, 0, 1, 1},
    {&__pyx_n_s_KORG, __pyx_k_KORG, sizeof(__pyx_k_KORG), 0, 0, 1, 1},
    {&__pyx_n_s_KURZWEIL_2000, __pyx_k_KURZWEIL_2000, sizeof(__pyx_k_KURZWEIL_2000), 0, 0, 1, 1},
    {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
    {&__pyx_n_s_L24INT, __pyx_k_L24INT, sizeof(__pyx_k_L24INT), 0, 0, 1, 1},
    {&__pyx_n_s_LAGRANGE, __pyx_k_LAGRANGE, sizeof(__pyx_k_LAGRANGE), 0, 0, 1, 1},
    {&__pyx_n_s_LDOUBLE, __pyx_k_LDOUBLE, sizeof(__pyx_k_LDOUBLE), 0, 0, 1, 1},
    {&__pyx_n_s_LDOUBLE_UNSCALED, __pyx_k_LDOUBLE_UNSCALED, sizeof(__pyx_k_LDOUBLE_UNSCALED), 0, 0, 1, 1},
    {&__pyx_n_s_LFLOAT, __pyx_k_LFLOAT, sizeof(__pyx_k_LFLOAT), 0, 0, 1, 1},
    {&__pyx_n_s_LFLOAT_UNSCALED, __pyx_k_LFLOAT_UNSCALED, sizeof(__pyx_k_LFLOAT_UNSCALED), 0, 0, 1, 1},
    {&__pyx_n_s_LINEAR, __pyx_k_LINEAR, sizeof(__pyx_k_LINEAR), 0, 0, 1, 1},
    {&__pyx_n_s_LINT, __pyx_k_LINT, sizeof(__pyx_k_LINT), 0, 0, 1, 1},
    {&__pyx_n_s_LINTN, __pyx_k_LINTN, sizeof(__pyx_k_LINTN), 0, 0, 1, 1},
    {&__pyx_n_s_LSHORT, __pyx_k_LSHORT, sizeof(__pyx_k_LSHORT), 0, 0, 1, 1},
    {&__pyx_n_s_MATLAB, __pyx_k_MATLAB, sizeof(__pyx_k_MATLAB), 0, 0, 1, 1},
    {&__pyx_n_s_MAUD, __pyx_k_MAUD, sizeof(__pyx_k_MAUD), 0, 0, 1, 1},
    {&__pyx_n_s_MAUI, __pyx_k_MAUI, sizeof(__pyx_k_MAUI), 0, 0, 1, 1},
    {&__pyx_n_s_MIDI, __pyx_k_MIDI, sizeof(__pyx_k_MIDI), 0, 0, 1, 1},
    {&__pyx_n_s_MIDI_SAMPLE_DUMP, __pyx_k_MIDI_SAMPLE_DUMP, sizeof(__pyx_k_MIDI_SAMPLE_DUMP), 0, 0, 1, 1},
    {&__pyx_n_s_MLT_SINE, __pyx_k_MLT_SINE, sizeof(__pyx_k_MLT_SINE), 0, 0, 1, 1},
    {&__pyx_n_s_MPEG, __pyx_k_MPEG, sizeof(__pyx_k_MPEG), 0, 0, 1, 1},
    {&__pyx_n_s_MULAW, __pyx_k_MULAW, sizeof(__pyx_k_MULAW), 0, 0, 1, 1},
    {&__pyx_n_s_MUS10, __pyx_k_MUS10, sizeof(__pyx_k_MUS10), 0, 0, 1, 1},
    {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
    {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
    {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
    {&__pyx_n_s_NEXT, __pyx_k_NEXT, sizeof(__pyx_k_NEXT), 0, 0, 1, 1},
    {&__pyx_n_s_NIST, __pyx_k_NIST, sizeof(__pyx_k_NIST), 0, 0, 1, 1},
    {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
    {&__pyx_n_s_NORMALIZED, __pyx_k_NORMALIZED, sizeof(__pyx_k_NORMALIZED), 0, 0, 1, 1},
    {&__pyx_n_s_NUM_HEADERS, __pyx_k_NUM_HEADERS, sizeof(__pyx_k_NUM_HEADERS), 0, 0, 1, 1},
    {&__pyx_n_s_NUM_SAMPLES, __pyx_k_NUM_SAMPLES, sizeof(__pyx_k_NUM_SAMPLES), 0, 0, 1, 1},
    {&__pyx_n_s_NVF, __pyx_k_NVF, sizeof(__pyx_k_NVF), 0, 0, 1, 1},
    {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
    {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
    {&__pyx_n_s_OGG, __pyx_k_OGG, sizeof(__pyx_k_OGG), 0, 0, 1, 1},
    {&__pyx_n_s_OMF, __pyx_k_OMF, sizeof(__pyx_k_OMF), 0, 0, 1, 1},
    {&__pyx_kp_s_Optional_float, __pyx_k_Optional_float, sizeof(__pyx_k_Optional_float), 0, 0, 1, 0},
    {&__pyx_kp_s_Optional_int, __pyx_k_Optional_int, sizeof(__pyx_k_Optional_int), 0, 0, 1, 0},
    {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
    {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
    {&__pyx_n_s_PAF, __pyx_k_PAF, sizeof(__pyx_k_PAF), 0, 0, 1, 1},
    {&__pyx_n_s_PAPOULIS, __pyx_k_PAPOULIS, sizeof(__pyx_k_PAPOULIS), 0, 0, 1, 1},
    {&__pyx_n_s_PARZEN, __pyx_k_PARZEN, sizeof(__pyx_k_PARZEN), 0, 0, 1, 1},
    {&__pyx_n_s_POISSON, __pyx_k_POISSON, sizeof(__pyx_k_POISSON), 0, 0, 1, 1},
    {&__pyx_n_s_PSION, __pyx_k_PSION, sizeof(__pyx_k_PSION), 0, 0, 1, 1},
    {&__pyx_n_s_PVF, __pyx_k_PVF, sizeof(__pyx_k_PVF), 0, 0, 1, 1},
    {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
    {&__pyx_n_s_Polynomial, __pyx_k_Polynomial, sizeof(__pyx_k_Polynomial), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumBase, __pyx_k_Pyx_EnumBase, sizeof(__pyx_k_Pyx_EnumBase), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumBase___new, __pyx_k_Pyx_EnumBase___new, sizeof(__pyx_k_Pyx_EnumBase___new), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumBase___repr, __pyx_k_Pyx_EnumBase___repr, sizeof(__pyx_k_Pyx_EnumBase___repr), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumBase___str, __pyx_k_Pyx_EnumBase___str, sizeof(__pyx_k_Pyx_EnumBase___str), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumMeta___reduce_cython, __pyx_k_Pyx_EnumMeta___reduce_cython, sizeof(__pyx_k_Pyx_EnumMeta___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_EnumMeta___setstate_cython, __pyx_k_Pyx_EnumMeta___setstate_cython, sizeof(__pyx_k_Pyx_EnumMeta___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_FlagBase, __pyx_k_Pyx_FlagBase, sizeof(__pyx_k_Pyx_FlagBase), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_FlagBase___new, __pyx_k_Pyx_FlagBase___new, sizeof(__pyx_k_Pyx_FlagBase___new), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_FlagBase___repr, __pyx_k_Pyx_FlagBase___repr, sizeof(__pyx_k_Pyx_FlagBase___repr), 0, 0, 1, 1},
    {&__pyx_n_s_Pyx_FlagBase___str, __pyx_k_Pyx_FlagBase___str, sizeof(__pyx_k_Pyx_FlagBase___str), 0, 0, 1, 1},
    {&__pyx_n_s_QUICKTIME, __pyx_k_QUICKTIME, sizeof(__pyx_k_QUICKTIME), 0, 0, 1, 1},
    {&__pyx_n_s_RAW, __pyx_k_RAW, sizeof(__pyx_k_RAW), 0, 0, 1, 1},
    {&__pyx_n_s_RECTANGULAR, __pyx_k_RECTANGULAR, sizeof(__pyx_k_RECTANGULAR), 0, 0, 1, 1},
    {&__pyx_n_s_RF64, __pyx_k_RF64, sizeof(__pyx_k_RF64), 0, 0, 1, 1},
    {&__pyx_n_s_RIEMANN, __pyx_k_RIEMANN, sizeof(__pyx_k_RIEMANN), 0, 0, 1, 1},
    {&__pyx_n_s_RIFF, __pyx_k_RIFF, sizeof(__pyx_k_RIFF), 0, 0, 1, 1},
    {&__pyx_n_s_RV2, __pyx_k_RV2, sizeof(__pyx_k_RV2), 0, 0, 1, 1},
    {&__pyx_n_s_RV3, __pyx_k_RV3, sizeof(__pyx_k_RV3), 0, 0, 1, 1},
    {&__pyx_n_s_RV4, __pyx_k_RV4, sizeof(__pyx_k_RV4), 0, 0, 1, 1},
    {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
    {&__pyx_n_s_SAMARAKI, __pyx_k_SAMARAKI, sizeof(__pyx_k_SAMARAKI), 0, 0, 1, 1},
    {&__pyx_n_s_SAMPLE_DUMP, __pyx_k_SAMPLE_DUMP, sizeof(__pyx_k_SAMPLE_DUMP), 0, 0, 1, 1},
    {&__pyx_n_s_SBSTUDIOII, __pyx_k_SBSTUDIOII, sizeof(__pyx_k_SBSTUDIOII), 0, 0, 1, 1},
    {&__pyx_n_s_SD1, __pyx_k_SD1, sizeof(__pyx_k_SD1), 0, 0, 1, 1},
    {&__pyx_n_s_SDIF, __pyx_k_SDIF, sizeof(__pyx_k_SDIF), 0, 0, 1, 1},
    {&__pyx_n_s_SECOND_KIND, __pyx_k_SECOND_KIND, sizeof(__pyx_k_SECOND_KIND), 0, 0, 1, 1},
    {&__pyx_n_s_SHORTEN, __pyx_k_SHORTEN, sizeof(__pyx_k_SHORTEN), 0, 0, 1, 1},
    {&__pyx_n_s_SINC, __pyx_k_SINC, sizeof(__pyx_k_SINC), 0, 0, 1, 1},
    {&__pyx_n_s_SINUSOIDAL, __pyx_k_SINUSOIDAL, sizeof(__pyx_k_SINUSOIDAL), 0, 0, 1, 1},
    {&__pyx_n_s_SMP, __pyx_k_SMP, sizeof(__pyx_k_SMP), 0, 0, 1, 1},
    {&__pyx_n_s_SNDLibError, __pyx_k_SNDLibError, sizeof(__pyx_k_SNDLibError), 0, 0, 1, 1},
    {&__pyx_n_s_SNDLibError____init, __pyx_k_SNDLibError____init, sizeof(__pyx_k_SNDLibError____init), 0, 0, 1, 1},
    {&__pyx_n_s_SNDT, __pyx_k_SNDT, sizeof(__pyx_k_SNDT), 0, 0, 1, 1},
    {&__pyx_n_s_SOUNDFONT, __pyx_k_SOUNDFONT, sizeof(__pyx_k_SOUNDFONT), 0, 0, 1, 1},
    {&__pyx_n_s_SOUNDFORGE, __pyx_k_SOUNDFORGE, sizeof(__pyx_k_SOUNDFORGE), 0, 0, 1, 1},
    {&__pyx_n_s_SOX, __pyx_k_SOX, sizeof(__pyx_k_SOX), 0, 0, 1, 1},
    {&__pyx_n_s_SPEEX, __pyx_k_SPEEX, sizeof(__pyx_k_SPEEX), 0, 0, 1, 1},
    {&__pyx_n_s_SPPACK, __pyx_k_SPPACK, sizeof(__pyx_k_SPPACK), 0, 0, 1, 1},
    {&__pyx_n_s_SRFS, __pyx_k_SRFS, sizeof(__pyx_k_SRFS), 0, 0, 1, 1},
    {&__pyx_n_s_SVX, __pyx_k_SVX, sizeof(__pyx_k_SVX), 0, 0, 1, 1},
    {&__pyx_n_s_Sample, __pyx_k_Sample, sizeof(__pyx_k_Sample), 0, 0, 1, 1},
    {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
    {&__pyx_n_s_SimpleNamespace, __pyx_k_SimpleNamespace, sizeof(__pyx_k_SimpleNamespace), 0, 0, 1, 1},
    {&__pyx_n_s_Sound, __pyx_k_Sound, sizeof(__pyx_k_Sound), 0, 0, 1, 1},
    {&__pyx_n_s_Sound___enter, __pyx_k_Sound___enter, sizeof(__pyx_k_Sound___enter), 0, 0, 1, 1},
    {&__pyx_n_s_Sound___exit, __pyx_k_Sound___exit, sizeof(__pyx_k_Sound___exit), 0, 0, 1, 1},
    {&__pyx_n_s_Sound___init, __pyx_k_Sound___init, sizeof(__pyx_k_Sound___init), 0, 0, 1, 1},
    {&__pyx_n_s_Spectrum, __pyx_k_Spectrum, sizeof(__pyx_k_Spectrum), 0, 0, 1, 1},
    {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
    {&__pyx_n_s_TTA, __pyx_k_TTA, sizeof(__pyx_k_TTA), 0, 0, 1, 1},
    {&__pyx_n_s_TUKEY, __pyx_k_TUKEY, sizeof(__pyx_k_TUKEY), 0, 0, 1, 1},
    {&__pyx_n_s_TWINVQ, __pyx_k_TWINVQ, sizeof(__pyx_k_TWINVQ), 0, 0, 1, 1},
    {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
    {&__pyx_n_s_UBSHORT, __pyx_k_UBSHORT, sizeof(__pyx_k_UBSHORT), 0, 0, 1, 1},
    {&__pyx_n_s_UBYTE, __pyx_k_UBYTE, sizeof(__pyx_k_UBYTE), 0, 0, 1, 1},
    {&__pyx_n_s_ULSHORT, __pyx_k_ULSHORT, sizeof(__pyx_k_ULSHORT), 0, 0, 1, 1},
    {&__pyx_n_s_ULTRASPHERICAL, __pyx_k_ULTRASPHERICAL, sizeof(__pyx_k_ULTRASPHERICAL), 0, 0, 1, 1},
    {&__pyx_n_s_ULTRATRACKER, __pyx_k_ULTRATRACKER, sizeof(__pyx_k_ULTRATRACKER), 0, 0, 1, 1},
    {&__pyx_n_s_UNKNOWN_HEADER, __pyx_k_UNKNOWN_HEADER, sizeof(__pyx_k_UNKNOWN_HEADER), 0, 0, 1, 1},
    {&__pyx_n_s_UNKNOWN_SAMPLE, __pyx_k_UNKNOWN_SAMPLE, sizeof(__pyx_k_UNKNOWN_SAMPLE), 0, 0, 1, 1},
    {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
    {&__pyx_kp_s_Unknown_enum_value_s, __pyx_k_Unknown_enum_value_s, sizeof(__pyx_k_Unknown_enum_value_s), 0, 0, 1, 0},
    {&__pyx_n_s_VOC, __pyx_k_VOC, sizeof(__pyx_k_VOC), 0, 0, 1, 1},
    {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
    {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
    {&__pyx_n_s_WAVPACK, __pyx_k_WAVPACK, sizeof(__pyx_k_WAVPACK), 0, 0, 1, 1},
    {&__pyx_n_s_WELCH, __pyx_k_WELCH, sizeof(__pyx_k_WELCH), 0, 0, 1, 1},
    {&__pyx_n_s_Window, __pyx_k_Window, sizeof(__pyx_k_Window), 0, 0, 1, 1},
    {&__pyx_n_s_YAMAHA_SY85, __pyx_k_YAMAHA_SY85, sizeof(__pyx_k_YAMAHA_SY85), 0, 0, 1, 1},
    {&__pyx_n_s_YAMAHA_SY99, __pyx_k_YAMAHA_SY99, sizeof(__pyx_k_YAMAHA_SY99), 0, 0, 1, 1},
    {&__pyx_n_s_YAMAHA_TX16W, __pyx_k_YAMAHA_TX16W, sizeof(__pyx_k_YAMAHA_TX16W), 0, 0, 1, 1},
    {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
    {&__pyx_n_s__137, __pyx_k__137, sizeof(__pyx_k__137), 0, 0, 1, 1},
    {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0},
    {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
    {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
    {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
    {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
    {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1},
    {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
    {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
    {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
    {&__pyx_kp_u__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 1, 0, 0},
    {&__pyx_n_s__630, __pyx_k__630, sizeof(__pyx_k__630), 0, 0, 1, 1},
    {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
    {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
    {&__pyx_n_s_a0, __pyx_k_a0, sizeof(__pyx_k_a0), 0, 0, 1, 1},
    {&__pyx_n_s_a1, __pyx_k_a1, sizeof(__pyx_k_a1), 0, 0, 1, 1},
    {&__pyx_kp_u_a1_2, __pyx_k_a1_2, sizeof(__pyx_k_a1_2), 0, 1, 0, 0},
    {&__pyx_kp_u_a2, __pyx_k_a2, sizeof(__pyx_k_a2), 0, 1, 0, 0},
    {&__pyx_n_s_a2_2, __pyx_k_a2_2, sizeof(__pyx_k_a2_2), 0, 0, 1, 1},
    {&__pyx_kp_u_a_valid_envelope_can_only_contai, __pyx_k_a_valid_envelope_can_only_contai, sizeof(__pyx_k_a_valid_envelope_can_only_contai), 0, 1, 0, 0},
    {&__pyx_kp_u_a_valid_envelope_needs_at_least, __pyx_k_a_valid_envelope_needs_at_least, sizeof(__pyx_k_a_valid_envelope_needs_at_least), 0, 1, 0, 0},
    {&__pyx_kp_u_a_valid_envelope_needs_even_numb, __pyx_k_a_valid_envelope_needs_even_numb, sizeof(__pyx_k_a_valid_envelope_needs_even_numb), 0, 1, 0, 0},
    {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
    {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1},
    {&__pyx_n_s_addressof, __pyx_k_addressof, sizeof(__pyx_k_addressof), 0, 0, 1, 1},
    {&__pyx_n_u_afplay, __pyx_k_afplay, sizeof(__pyx_k_afplay), 0, 1, 0, 1},
    {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
    {&__pyx_n_s_all_pass, __pyx_k_all_pass, sizeof(__pyx_k_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_all_pass_bank, __pyx_k_all_pass_bank, sizeof(__pyx_k_all_pass_bank), 0, 0, 1, 1},
    {&__pyx_n_s_all_passes, __pyx_k_all_passes, sizeof(__pyx_k_all_passes), 0, 0, 1, 1},
    {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
    {&__pyx_kp_u_allpass_list_contains_at_least_o, __pyx_k_allpass_list_contains_at_least_o, sizeof(__pyx_k_allpass_list_contains_at_least_o), 0, 1, 0, 0},
    {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1},
    {&__pyx_n_s_amax, __pyx_k_amax, sizeof(__pyx_k_amax), 0, 0, 1, 1},
    {&__pyx_n_s_amplitude, __pyx_k_amplitude, sizeof(__pyx_k_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_amplitude_modulate, __pyx_k_amplitude_modulate, sizeof(__pyx_k_amplitude_modulate), 0, 0, 1, 1},
    {&__pyx_n_s_amps, __pyx_k_amps, sizeof(__pyx_k_amps), 0, 0, 1, 1},
    {&__pyx_n_s_analyze, __pyx_k_analyze, sizeof(__pyx_k_analyze), 0, 0, 1, 1},
    {&__pyx_n_s_analyze_f, __pyx_k_analyze_f, sizeof(__pyx_k_analyze_f), 0, 0, 1, 1},
    {&__pyx_n_s_analyzecallback, __pyx_k_analyzecallback, sizeof(__pyx_k_analyzecallback), 0, 0, 1, 1},
    {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
    {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
    {&__pyx_n_u_aplay, __pyx_k_aplay, sizeof(__pyx_k_aplay), 0, 1, 0, 1},
    {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
    {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
    {&__pyx_n_s_arg1, __pyx_k_arg1, sizeof(__pyx_k_arg1), 0, 0, 1, 1},
    {&__pyx_n_s_arg2, __pyx_k_arg2, sizeof(__pyx_k_arg2), 0, 0, 1, 1},
    {&__pyx_n_s_argmax, __pyx_k_argmax, sizeof(__pyx_k_argmax), 0, 0, 1, 1},
    {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
    {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
    {&__pyx_n_s_arr1, __pyx_k_arr1, sizeof(__pyx_k_arr1), 0, 0, 1, 1},
    {&__pyx_n_s_arr2, __pyx_k_arr2, sizeof(__pyx_k_arr2), 0, 0, 1, 1},
    {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
    {&__pyx_kp_u_array_has, __pyx_k_array_has, sizeof(__pyx_k_array_has), 0, 1, 0, 0},
    {&__pyx_n_s_array_interp, __pyx_k_array_interp, sizeof(__pyx_k_array_interp), 0, 0, 1, 1},
    {&__pyx_n_s_array_reader, __pyx_k_array_reader, sizeof(__pyx_k_array_reader), 0, 0, 1, 1},
    {&__pyx_n_s_array_reader_locals_reader, __pyx_k_array_reader_locals_reader, sizeof(__pyx_k_array_reader_locals_reader), 0, 0, 1, 1},
    {&__pyx_n_s_array_readin, __pyx_k_array_readin, sizeof(__pyx_k_array_readin), 0, 0, 1, 1},
    {&__pyx_n_s_array_readin_gen, __pyx_k_array_readin_gen, sizeof(__pyx_k_array_readin_gen), 0, 0, 1, 1},
    {&__pyx_n_s_array_readin_gen___reduce_cython, __pyx_k_array_readin_gen___reduce_cython, sizeof(__pyx_k_array_readin_gen___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_array_readin_gen___setstate_cyth, __pyx_k_array_readin_gen___setstate_cyth, sizeof(__pyx_k_array_readin_gen___setstate_cyth), 0, 0, 1, 1},
    {&__pyx_n_s_array_resample, __pyx_k_array_resample, sizeof(__pyx_k_array_resample), 0, 0, 1, 1},
    {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
    {&__pyx_kp_u_asked_for, __pyx_k_asked_for, sizeof(__pyx_k_asked_for), 0, 1, 0, 0},
    {&__pyx_n_s_asymmetric_fm, __pyx_k_asymmetric_fm, sizeof(__pyx_k_asymmetric_fm), 0, 0, 1, 1},
    {&__pyx_n_s_asymmetric_fm_unmodulated, __pyx_k_asymmetric_fm_unmodulated, sizeof(__pyx_k_asymmetric_fm_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_n_s_atan2, __pyx_k_atan2, sizeof(__pyx_k_atan2), 0, 0, 1, 1},
    {&__pyx_n_s_autocorrelate, __pyx_k_autocorrelate, sizeof(__pyx_k_autocorrelate), 0, 0, 1, 1},
    {&__pyx_n_s_b1, __pyx_k_b1, sizeof(__pyx_k_b1), 0, 0, 1, 1},
    {&__pyx_kp_u_b1_2, __pyx_k_b1_2, sizeof(__pyx_k_b1_2), 0, 1, 0, 0},
    {&__pyx_kp_u_b2, __pyx_k_b2, sizeof(__pyx_k_b2), 0, 1, 0, 0},
    {&__pyx_n_s_b2_2, __pyx_k_b2_2, sizeof(__pyx_k_b2_2), 0, 0, 1, 1},
    {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
    {&__pyx_kp_u_before_scaling, __pyx_k_before_scaling, sizeof(__pyx_k_before_scaling), 0, 1, 0, 0},
    {&__pyx_n_s_beg, __pyx_k_beg, sizeof(__pyx_k_beg), 0, 0, 1, 1},
    {&__pyx_n_s_bes_i0, __pyx_k_bes_i0, sizeof(__pyx_k_bes_i0), 0, 0, 1, 1},
    {&__pyx_n_s_bes_j0, __pyx_k_bes_j0, sizeof(__pyx_k_bes_j0), 0, 0, 1, 1},
    {&__pyx_n_s_bes_j1, __pyx_k_bes_j1, sizeof(__pyx_k_bes_j1), 0, 0, 1, 1},
    {&__pyx_n_s_bes_jn, __pyx_k_bes_jn, sizeof(__pyx_k_bes_jn), 0, 0, 1, 1},
    {&__pyx_n_s_bes_y0, __pyx_k_bes_y0, sizeof(__pyx_k_bes_y0), 0, 0, 1, 1},
    {&__pyx_n_s_bes_y1, __pyx_k_bes_y1, sizeof(__pyx_k_bes_y1), 0, 0, 1, 1},
    {&__pyx_n_s_bes_yn, __pyx_k_bes_yn, sizeof(__pyx_k_bes_yn), 0, 0, 1, 1},
    {&__pyx_n_s_bessi0, __pyx_k_bessi0, sizeof(__pyx_k_bessi0), 0, 0, 1, 1},
    {&__pyx_n_s_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 0, 0, 1, 1},
    {&__pyx_n_s_biquad, __pyx_k_biquad, sizeof(__pyx_k_biquad), 0, 0, 1, 1},
    {&__pyx_n_s_biquad_set_equal_gain_zeroes, __pyx_k_biquad_set_equal_gain_zeroes, sizeof(__pyx_k_biquad_set_equal_gain_zeroes), 0, 0, 1, 1},
    {&__pyx_n_s_biquad_set_resonance, __pyx_k_biquad_set_resonance, sizeof(__pyx_k_biquad_set_resonance), 0, 0, 1, 1},
    {&__pyx_n_s_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 0, 1, 1},
    {&__pyx_n_u_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 1, 0, 1},
    {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
    {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
    {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
    {&__pyx_n_s_c_bool, __pyx_k_c_bool, sizeof(__pyx_k_c_bool), 0, 0, 1, 1},
    {&__pyx_n_s_c_double, __pyx_k_c_double, sizeof(__pyx_k_c_double), 0, 0, 1, 1},
    {&__pyx_n_s_c_int, __pyx_k_c_int, sizeof(__pyx_k_c_int), 0, 0, 1, 1},
    {&__pyx_n_s_c_longlong, __pyx_k_c_longlong, sizeof(__pyx_k_c_longlong), 0, 0, 1, 1},
    {&__pyx_n_s_c_void_p, __pyx_k_c_void_p, sizeof(__pyx_k_c_void_p), 0, 0, 1, 1},
    {&__pyx_n_s_cache_append, __pyx_k_cache_append, sizeof(__pyx_k_cache_append), 0, 0, 1, 1},
    {&__pyx_n_s_cache_extend, __pyx_k_cache_extend, sizeof(__pyx_k_cache_extend), 0, 0, 1, 1},
    {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
    {&__pyx_kp_u_cannot_be_converted_to_a_mus_fl, __pyx_k_cannot_be_converted_to_a_mus_fl, sizeof(__pyx_k_cannot_be_converted_to_a_mus_fl), 0, 1, 0, 0},
    {&__pyx_n_s_cepstrum, __pyx_k_cepstrum, sizeof(__pyx_k_cepstrum), 0, 0, 1, 1},
    {&__pyx_n_s_chan, __pyx_k_chan, sizeof(__pyx_k_chan), 0, 0, 1, 1},
    {&__pyx_n_u_chan, __pyx_k_chan, sizeof(__pyx_k_chan), 0, 1, 0, 1},
    {&__pyx_n_s_channel, __pyx_k_channel, sizeof(__pyx_k_channel), 0, 0, 1, 1},
    {&__pyx_n_s_channels, __pyx_k_channels, sizeof(__pyx_k_channels), 0, 0, 1, 1},
    {&__pyx_kp_u_channels_2, __pyx_k_channels_2, sizeof(__pyx_k_channels_2), 0, 1, 0, 0},
    {&__pyx_kp_u_channels_but, __pyx_k_channels_but, sizeof(__pyx_k_channels_but), 0, 1, 0, 0},
    {&__pyx_n_s_chans, __pyx_k_chans, sizeof(__pyx_k_chans), 0, 0, 1, 1},
    {&__pyx_n_s_chebyshev_t_sum, __pyx_k_chebyshev_t_sum, sizeof(__pyx_k_chebyshev_t_sum), 0, 0, 1, 1},
    {&__pyx_n_s_chebyshev_tu_sum, __pyx_k_chebyshev_tu_sum, sizeof(__pyx_k_chebyshev_tu_sum), 0, 0, 1, 1},
    {&__pyx_n_s_chebyshev_u_sum, __pyx_k_chebyshev_u_sum, sizeof(__pyx_k_chebyshev_u_sum), 0, 0, 1, 1},
    {&__pyx_n_s_check_ndim, __pyx_k_check_ndim, sizeof(__pyx_k_check_ndim), 0, 0, 1, 1},
    {&__pyx_n_s_check_range, __pyx_k_check_range, sizeof(__pyx_k_check_range), 0, 0, 1, 1},
    {&__pyx_n_s_clamp, __pyx_k_clamp, sizeof(__pyx_k_clamp), 0, 0, 1, 1},
    {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
    {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1},
    {&__pyx_n_s_clipped, __pyx_k_clipped, sizeof(__pyx_k_clipped), 0, 0, 1, 1},
    {&__pyx_n_s_clm_reverb, __pyx_k_clm_reverb, sizeof(__pyx_k_clm_reverb), 0, 0, 1, 1},
    {&__pyx_n_s_clm_reverb_locals_call, __pyx_k_clm_reverb_locals_call, sizeof(__pyx_k_clm_reverb_locals_call), 0, 0, 1, 1},
    {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
    {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
    {&__pyx_n_s_coeff, __pyx_k_coeff, sizeof(__pyx_k_coeff), 0, 0, 1, 1},
    {&__pyx_n_s_coeffs, __pyx_k_coeffs, sizeof(__pyx_k_coeffs), 0, 0, 1, 1},
    {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
    {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
    {&__pyx_n_s_comb, __pyx_k_comb, sizeof(__pyx_k_comb), 0, 0, 1, 1},
    {&__pyx_n_s_comb_bank, __pyx_k_comb_bank, sizeof(__pyx_k_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_combs, __pyx_k_combs, sizeof(__pyx_k_combs), 0, 0, 1, 1},
    {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
    {&__pyx_n_s_compare_shapes, __pyx_k_compare_shapes, sizeof(__pyx_k_compare_shapes), 0, 0, 1, 1},
    {&__pyx_kp_u_compute_ratio, __pyx_k_compute_ratio, sizeof(__pyx_k_compute_ratio), 0, 1, 0, 0},
    {&__pyx_kp_u_compute_time, __pyx_k_compute_time, sizeof(__pyx_k_compute_time), 0, 1, 0, 0},
    {&__pyx_n_s_connection_function, __pyx_k_connection_function, sizeof(__pyx_k_connection_function), 0, 0, 1, 1},
    {&__pyx_kp_s_context_manager_which_handles_c, __pyx_k_context_manager_which_handles_c, sizeof(__pyx_k_context_manager_which_handles_c), 0, 0, 1, 0},
    {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
    {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
    {&__pyx_n_s_continue_frample2file, __pyx_k_continue_frample2file, sizeof(__pyx_k_continue_frample2file), 0, 0, 1, 1},
    {&__pyx_n_s_continue_old_file, __pyx_k_continue_old_file, sizeof(__pyx_k_continue_old_file), 0, 0, 1, 1},
    {&__pyx_n_s_continue_sample2file, __pyx_k_continue_sample2file, sizeof(__pyx_k_continue_sample2file), 0, 0, 1, 1},
    {&__pyx_n_s_contrast_enhancement, __pyx_k_contrast_enhancement, sizeof(__pyx_k_contrast_enhancement), 0, 0, 1, 1},
    {&__pyx_n_s_convert_frequency, __pyx_k_convert_frequency, sizeof(__pyx_k_convert_frequency), 0, 0, 1, 1},
    {&__pyx_n_s_convolution, __pyx_k_convolution, sizeof(__pyx_k_convolution), 0, 0, 1, 1},
    {&__pyx_n_s_convolve, __pyx_k_convolve, sizeof(__pyx_k_convolve), 0, 0, 1, 1},
    {&__pyx_n_s_convolve_files, __pyx_k_convolve_files, sizeof(__pyx_k_convolve_files), 0, 0, 1, 1},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_copyto, __pyx_k_copyto, sizeof(__pyx_k_copyto), 0, 0, 1, 1},
    {&__pyx_n_s_correlate, __pyx_k_correlate, sizeof(__pyx_k_correlate), 0, 0, 1, 1},
    {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
    {&__pyx_kp_u_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 1, 0, 0},
    {&__pyx_n_s_count_2, __pyx_k_count_2, sizeof(__pyx_k_count_2), 0, 0, 1, 1},
    {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
    {&__pyx_n_s_cy_analyze_f_ptr, __pyx_k_cy_analyze_f_ptr, sizeof(__pyx_k_cy_analyze_f_ptr), 0, 0, 1, 1},
    {&__pyx_n_s_cy_edit_f_ptr, __pyx_k_cy_edit_f_ptr, sizeof(__pyx_k_cy_edit_f_ptr), 0, 0, 1, 1},
    {&__pyx_n_s_cy_inp_f_ptr, __pyx_k_cy_inp_f_ptr, sizeof(__pyx_k_cy_inp_f_ptr), 0, 0, 1, 1},
    {&__pyx_n_s_cy_input_f_ptr, __pyx_k_cy_input_f_ptr, sizeof(__pyx_k_cy_input_f_ptr), 0, 0, 1, 1},
    {&__pyx_n_s_cy_synthesize_f_ptr, __pyx_k_cy_synthesize_f_ptr, sizeof(__pyx_k_cy_synthesize_f_ptr), 0, 0, 1, 1},
    {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
    {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
    {&__pyx_n_u_darwin, __pyx_k_darwin, sizeof(__pyx_k_darwin), 0, 1, 0, 1},
    {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
    {&__pyx_n_s_data1, __pyx_k_data1, sizeof(__pyx_k_data1), 0, 0, 1, 1},
    {&__pyx_n_s_data2, __pyx_k_data2, sizeof(__pyx_k_data2), 0, 0, 1, 1},
    {&__pyx_n_s_db2linear, __pyx_k_db2linear, sizeof(__pyx_k_db2linear), 0, 0, 1, 1},
    {&__pyx_n_s_dcblock, __pyx_k_dcblock, sizeof(__pyx_k_dcblock), 0, 0, 1, 1},
    {&__pyx_n_s_dct, __pyx_k_dct, sizeof(__pyx_k_dct), 0, 0, 1, 1},
    {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
    {&__pyx_n_s_degree, __pyx_k_degree, sizeof(__pyx_k_degree), 0, 0, 1, 1},
    {&__pyx_n_s_degrees, __pyx_k_degrees, sizeof(__pyx_k_degrees), 0, 0, 1, 1},
    {&__pyx_n_s_degrees2radians, __pyx_k_degrees2radians, sizeof(__pyx_k_degrees2radians), 0, 0, 1, 1},
    {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1},
    {&__pyx_n_s_delay_tick, __pyx_k_delay_tick, sizeof(__pyx_k_delay_tick), 0, 0, 1, 1},
    {&__pyx_n_s_delay_unmodulated, __pyx_k_delay_unmodulated, sizeof(__pyx_k_delay_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_delete_reverb, __pyx_k_delete_reverb, sizeof(__pyx_k_delete_reverb), 0, 0, 1, 1},
    {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
    {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
    {&__pyx_kp_u_dimemsions_but_received, __pyx_k_dimemsions_but_received, sizeof(__pyx_k_dimemsions_but_received), 0, 1, 0, 0},
    {&__pyx_n_s_direction, __pyx_k_direction, sizeof(__pyx_k_direction), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1},
    {&__pyx_n_s_distribution, __pyx_k_distribution, sizeof(__pyx_k_distribution), 0, 0, 1, 1},
    {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
    {&__pyx_kp_u_does_not_exist, __pyx_k_does_not_exist, sizeof(__pyx_k_does_not_exist), 0, 1, 0, 0},
    {&__pyx_n_s_dot_product, __pyx_k_dot_product, sizeof(__pyx_k_dot_product), 0, 0, 1, 1},
    {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
    {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
    {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
    {&__pyx_kp_u_duration, __pyx_k_duration, sizeof(__pyx_k_duration), 0, 1, 0, 0},
    {&__pyx_n_s_duration_2, __pyx_k_duration_2, sizeof(__pyx_k_duration_2), 0, 0, 1, 1},
    {&__pyx_n_u_duration_2, __pyx_k_duration_2, sizeof(__pyx_k_duration_2), 0, 1, 0, 1},
    {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
    {&__pyx_n_s_edit, __pyx_k_edit, sizeof(__pyx_k_edit), 0, 0, 1, 1},
    {&__pyx_n_s_edit_f, __pyx_k_edit_f, sizeof(__pyx_k_edit_f), 0, 0, 1, 1},
    {&__pyx_n_s_editcallback, __pyx_k_editcallback, sizeof(__pyx_k_editcallback), 0, 0, 1, 1},
    {&__pyx_n_s_edot_product, __pyx_k_edot_product, sizeof(__pyx_k_edot_product), 0, 0, 1, 1},
    {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
    {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
    {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
    {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
    {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
    {&__pyx_kp_u_enum_class_Header_not_importable, __pyx_k_enum_class_Header_not_importable, sizeof(__pyx_k_enum_class_Header_not_importable), 0, 1, 0, 0},
    {&__pyx_kp_u_enum_class_Sample_not_importable, __pyx_k_enum_class_Sample_not_importable, sizeof(__pyx_k_enum_class_Sample_not_importable), 0, 1, 0, 0},
    {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
    {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1},
    {&__pyx_n_s_env_any, __pyx_k_env_any, sizeof(__pyx_k_env_any), 0, 0, 1, 1},
    {&__pyx_n_s_env_interp, __pyx_k_env_interp, sizeof(__pyx_k_env_interp), 0, 0, 1, 1},
    {&__pyx_n_s_env_rates, __pyx_k_env_rates, sizeof(__pyx_k_env_rates), 0, 0, 1, 1},
    {&__pyx_n_s_envelope, __pyx_k_envelope, sizeof(__pyx_k_envelope), 0, 0, 1, 1},
    {&__pyx_n_s_envelope_interp, __pyx_k_envelope_interp, sizeof(__pyx_k_envelope_interp), 0, 0, 1, 1},
    {&__pyx_n_s_envfunction, __pyx_k_envfunction, sizeof(__pyx_k_envfunction), 0, 0, 1, 1},
    {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
    {&__pyx_n_s_even_multiple, __pyx_k_even_multiple, sizeof(__pyx_k_even_multiple), 0, 0, 1, 1},
    {&__pyx_n_s_even_weight, __pyx_k_even_weight, sizeof(__pyx_k_even_weight), 0, 0, 1, 1},
    {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
    {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
    {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
    {&__pyx_n_s_expanduser, __pyx_k_expanduser, sizeof(__pyx_k_expanduser), 0, 0, 1, 1},
    {&__pyx_n_s_expansion, __pyx_k_expansion, sizeof(__pyx_k_expansion), 0, 0, 1, 1},
    {&__pyx_kp_u_expecting, __pyx_k_expecting, sizeof(__pyx_k_expecting), 0, 1, 0, 0},
    {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
    {&__pyx_n_s_fc, __pyx_k_fc, sizeof(__pyx_k_fc), 0, 0, 1, 1},
    {&__pyx_n_s_fcombs, __pyx_k_fcombs, sizeof(__pyx_k_fcombs), 0, 0, 1, 1},
    {&__pyx_n_s_feedback, __pyx_k_feedback, sizeof(__pyx_k_feedback), 0, 0, 1, 1},
    {&__pyx_n_s_feedforward, __pyx_k_feedforward, sizeof(__pyx_k_feedforward), 0, 0, 1, 1},
    {&__pyx_n_s_fft, __pyx_k_fft, sizeof(__pyx_k_fft), 0, 0, 1, 1},
    {&__pyx_n_s_fft_len, __pyx_k_fft_len, sizeof(__pyx_k_fft_len), 0, 0, 1, 1},
    {&__pyx_n_s_fft_size, __pyx_k_fft_size, sizeof(__pyx_k_fft_size), 0, 0, 1, 1},
    {&__pyx_kp_u_fft_size_must_be_a_positive_numb, __pyx_k_fft_size_must_be_a_positive_numb, sizeof(__pyx_k_fft_size_must_be_a_positive_numb), 0, 1, 0, 0},
    {&__pyx_kp_u_fft_size_must_be_a_positive_numb_2, __pyx_k_fft_size_must_be_a_positive_numb_2, sizeof(__pyx_k_fft_size_must_be_a_positive_numb_2), 0, 1, 0, 0},
    {&__pyx_kp_u_fft_size_must_be_power_of_2_not, __pyx_k_fft_size_must_be_power_of_2_not, sizeof(__pyx_k_fft_size_must_be_power_of_2_not), 0, 1, 0, 0},
    {&__pyx_kp_u_fft_size_too_large_cannot_alloca, __pyx_k_fft_size_too_large_cannot_alloca, sizeof(__pyx_k_fft_size_too_large_cannot_alloca), 0, 1, 0, 0},
    {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
    {&__pyx_n_s_file1, __pyx_k_file1, sizeof(__pyx_k_file1), 0, 0, 1, 1},
    {&__pyx_n_s_file2, __pyx_k_file2, sizeof(__pyx_k_file2), 0, 0, 1, 1},
    {&__pyx_kp_u_file2frample, __pyx_k_file2frample, sizeof(__pyx_k_file2frample), 0, 1, 0, 0},
    {&__pyx_n_s_file2frample_2, __pyx_k_file2frample_2, sizeof(__pyx_k_file2frample_2), 0, 0, 1, 1},
    {&__pyx_kp_u_file2ndarray, __pyx_k_file2ndarray, sizeof(__pyx_k_file2ndarray), 0, 1, 0, 0},
    {&__pyx_n_s_file2ndarray_2, __pyx_k_file2ndarray_2, sizeof(__pyx_k_file2ndarray_2), 0, 0, 1, 1},
    {&__pyx_kp_u_file2sample, __pyx_k_file2sample, sizeof(__pyx_k_file2sample), 0, 1, 0, 0},
    {&__pyx_n_s_file2sample_2, __pyx_k_file2sample_2, sizeof(__pyx_k_file2sample_2), 0, 0, 1, 1},
    {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
    {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
    {&__pyx_n_s_filt, __pyx_k_filt, sizeof(__pyx_k_filt), 0, 0, 1, 1},
    {&__pyx_n_s_filt_view, __pyx_k_filt_view, sizeof(__pyx_k_filt_view), 0, 0, 1, 1},
    {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
    {&__pyx_kp_u_filter_list_contains_at_least_on, __pyx_k_filter_list_contains_at_least_on, sizeof(__pyx_k_filter_list_contains_at_least_on), 0, 1, 0, 0},
    {&__pyx_kp_u_filter_list_contains_at_least_on_2, __pyx_k_filter_list_contains_at_least_on_2, sizeof(__pyx_k_filter_list_contains_at_least_on_2), 0, 1, 0, 0},
    {&__pyx_n_s_filter_size, __pyx_k_filter_size, sizeof(__pyx_k_filter_size), 0, 0, 1, 1},
    {&__pyx_n_s_filtered_comb, __pyx_k_filtered_comb, sizeof(__pyx_k_filtered_comb), 0, 0, 1, 1},
    {&__pyx_n_s_filtered_comb_bank, __pyx_k_filtered_comb_bank, sizeof(__pyx_k_filtered_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_filtered_comb_unmodulated, __pyx_k_filtered_comb_unmodulated, sizeof(__pyx_k_filtered_comb_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_filters, __pyx_k_filters, sizeof(__pyx_k_filters), 0, 0, 1, 1},
    {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1},
    {&__pyx_n_s_fir_filter, __pyx_k_fir_filter, sizeof(__pyx_k_fir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_firmant, __pyx_k_firmant, sizeof(__pyx_k_firmant), 0, 0, 1, 1},
    {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
    {&__pyx_n_s_fm, __pyx_k_fm, sizeof(__pyx_k_fm), 0, 0, 1, 1},
    {&__pyx_n_s_fm_index, __pyx_k_fm_index, sizeof(__pyx_k_fm_index), 0, 0, 1, 1},
    {&__pyx_n_s_fmod, __pyx_k_fmod, sizeof(__pyx_k_fmod), 0, 0, 1, 1},
    {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
    {&__pyx_n_s_formant, __pyx_k_formant, sizeof(__pyx_k_formant), 0, 0, 1, 1},
    {&__pyx_n_s_formant_bank, __pyx_k_formant_bank, sizeof(__pyx_k_formant_bank), 0, 0, 1, 1},
    {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
    {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
    {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
    {&__pyx_n_s_frample2file, __pyx_k_frample2file, sizeof(__pyx_k_frample2file), 0, 0, 1, 1},
    {&__pyx_n_s_freq, __pyx_k_freq, sizeof(__pyx_k_freq), 0, 0, 1, 1},
    {&__pyx_n_s_freqs, __pyx_k_freqs, sizeof(__pyx_k_freqs), 0, 0, 1, 1},
    {&__pyx_n_s_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 0, 1, 1},
    {&__pyx_n_u_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 1, 0, 1},
    {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
    {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_gen, __pyx_k_gen, sizeof(__pyx_k_gen), 0, 0, 1, 1},
    {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_gens, __pyx_k_gens, sizeof(__pyx_k_gens), 0, 0, 1, 1},
    {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
    {&__pyx_n_s_get_channels, __pyx_k_get_channels, sizeof(__pyx_k_get_channels), 0, 0, 1, 1},
    {&__pyx_n_s_get_framples, __pyx_k_get_framples, sizeof(__pyx_k_get_framples), 0, 0, 1, 1},
    {&__pyx_n_s_get_length, __pyx_k_get_length, sizeof(__pyx_k_get_length), 0, 0, 1, 1},
    {&__pyx_n_s_get_srate, __pyx_k_get_srate, sizeof(__pyx_k_get_srate), 0, 0, 1, 1},
    {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
    {&__pyx_n_s_gettempdir, __pyx_k_gettempdir, sizeof(__pyx_k_gettempdir), 0, 0, 1, 1},
    {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
    {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
    {&__pyx_n_s_granulate, __pyx_k_granulate, sizeof(__pyx_k_granulate), 0, 0, 1, 1},
    {&__pyx_n_s_harms, __pyx_k_harms, sizeof(__pyx_k_harms), 0, 0, 1, 1},
    {&__pyx_kp_u_has_no_meaningful_channels, __pyx_k_has_no_meaningful_channels, sizeof(__pyx_k_has_no_meaningful_channels), 0, 1, 0, 0},
    {&__pyx_kp_u_has_no_meaningful_framples, __pyx_k_has_no_meaningful_framples, sizeof(__pyx_k_has_no_meaningful_framples), 0, 1, 0, 0},
    {&__pyx_kp_u_has_no_meaningful_length, __pyx_k_has_no_meaningful_length, sizeof(__pyx_k_has_no_meaningful_length), 0, 1, 0, 0},
    {&__pyx_n_s_header_type, __pyx_k_header_type, sizeof(__pyx_k_header_type), 0, 0, 1, 1},
    {&__pyx_n_s_hi, __pyx_k_hi, sizeof(__pyx_k_hi), 0, 0, 1, 1},
    {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1},
    {&__pyx_n_s_hop, __pyx_k_hop, sizeof(__pyx_k_hop), 0, 0, 1, 1},
    {&__pyx_n_s_hz, __pyx_k_hz, sizeof(__pyx_k_hz), 0, 0, 1, 1},
    {&__pyx_n_s_hz2radians, __pyx_k_hz2radians, sizeof(__pyx_k_hz2radians), 0, 0, 1, 1},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
    {&__pyx_n_s_idat, __pyx_k_idat, sizeof(__pyx_k_idat), 0, 0, 1, 1},
    {&__pyx_n_s_iir_filter, __pyx_k_iir_filter, sizeof(__pyx_k_iir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_imag, __pyx_k_imag, sizeof(__pyx_k_imag), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_n_s_impulse_generator, __pyx_k_impulse_generator, sizeof(__pyx_k_impulse_generator), 0, 0, 1, 1},
    {&__pyx_n_s_in_any, __pyx_k_in_any, sizeof(__pyx_k_in_any), 0, 0, 1, 1},
    {&__pyx_n_s_ina, __pyx_k_ina, sizeof(__pyx_k_ina), 0, 0, 1, 1},
    {&__pyx_n_s_inb, __pyx_k_inb, sizeof(__pyx_k_inb), 0, 0, 1, 1},
    {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
    {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
    {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
    {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
    {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
    {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
    {&__pyx_n_s_initial_contents, __pyx_k_initial_contents, sizeof(__pyx_k_initial_contents), 0, 0, 1, 1},
    {&__pyx_n_s_initial_element, __pyx_k_initial_element, sizeof(__pyx_k_initial_element), 0, 0, 1, 1},
    {&__pyx_n_s_initial_phase, __pyx_k_initial_phase, sizeof(__pyx_k_initial_phase), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_inp, __pyx_k_inp, sizeof(__pyx_k_inp), 0, 0, 1, 1},
    {&__pyx_n_s_inp_f, __pyx_k_inp_f, sizeof(__pyx_k_inp_f), 0, 0, 1, 1},
    {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
    {&__pyx_kp_u_input_needs_to_be_a_clm_gen_or_a, __pyx_k_input_needs_to_be_a_clm_gen_or_a, sizeof(__pyx_k_input_needs_to_be_a_clm_gen_or_a), 0, 1, 0, 0},
    {&__pyx_kp_u_input_needs_to_be_a_clm_gen_or_f, __pyx_k_input_needs_to_be_a_clm_gen_or_f, sizeof(__pyx_k_input_needs_to_be_a_clm_gen_or_f), 0, 1, 0, 0},
    {&__pyx_n_s_inputcallback, __pyx_k_inputcallback, sizeof(__pyx_k_inputcallback), 0, 0, 1, 1},
    {&__pyx_n_s_inputs, __pyx_k_inputs, sizeof(__pyx_k_inputs), 0, 0, 1, 1},
    {&__pyx_n_s_insig, __pyx_k_insig, sizeof(__pyx_k_insig), 0, 0, 1, 1},
    {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
    {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1},
    {&__pyx_n_s_interp, __pyx_k_interp, sizeof(__pyx_k_interp), 0, 0, 1, 1},
    {&__pyx_n_s_interp_type, __pyx_k_interp_type, sizeof(__pyx_k_interp_type), 0, 0, 1, 1},
    {&__pyx_n_s_is_all_pass, __pyx_k_is_all_pass, sizeof(__pyx_k_is_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_is_all_pass_bank, __pyx_k_is_all_pass_bank, sizeof(__pyx_k_is_all_pass_bank), 0, 0, 1, 1},
    {&__pyx_n_s_is_array_readin, __pyx_k_is_array_readin, sizeof(__pyx_k_is_array_readin), 0, 0, 1, 1},
    {&__pyx_n_s_is_asymmetric_fm, __pyx_k_is_asymmetric_fm, sizeof(__pyx_k_is_asymmetric_fm), 0, 0, 1, 1},
    {&__pyx_n_s_is_biquad, __pyx_k_is_biquad, sizeof(__pyx_k_is_biquad), 0, 0, 1, 1},
    {&__pyx_n_s_is_comb, __pyx_k_is_comb, sizeof(__pyx_k_is_comb), 0, 0, 1, 1},
    {&__pyx_n_s_is_comb_bank, __pyx_k_is_comb_bank, sizeof(__pyx_k_is_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_is_convolve, __pyx_k_is_convolve, sizeof(__pyx_k_is_convolve), 0, 0, 1, 1},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_n_s_is_delay, __pyx_k_is_delay, sizeof(__pyx_k_is_delay), 0, 0, 1, 1},
    {&__pyx_n_s_is_env, __pyx_k_is_env, sizeof(__pyx_k_is_env), 0, 0, 1, 1},
    {&__pyx_n_s_is_even, __pyx_k_is_even, sizeof(__pyx_k_is_even), 0, 0, 1, 1},
    {&__pyx_n_s_is_file2frample, __pyx_k_is_file2frample, sizeof(__pyx_k_is_file2frample), 0, 0, 1, 1},
    {&__pyx_n_s_is_file2sample, __pyx_k_is_file2sample, sizeof(__pyx_k_is_file2sample), 0, 0, 1, 1},
    {&__pyx_n_s_is_filter, __pyx_k_is_filter, sizeof(__pyx_k_is_filter), 0, 0, 1, 1},
    {&__pyx_n_s_is_filtered_comb, __pyx_k_is_filtered_comb, sizeof(__pyx_k_is_filtered_comb), 0, 0, 1, 1},
    {&__pyx_n_s_is_filtered_comb_bank, __pyx_k_is_filtered_comb_bank, sizeof(__pyx_k_is_filtered_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_is_fir_filter, __pyx_k_is_fir_filter, sizeof(__pyx_k_is_fir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_is_firmant, __pyx_k_is_firmant, sizeof(__pyx_k_is_firmant), 0, 0, 1, 1},
    {&__pyx_n_s_is_formant, __pyx_k_is_formant, sizeof(__pyx_k_is_formant), 0, 0, 1, 1},
    {&__pyx_n_s_is_formant_bank, __pyx_k_is_formant_bank, sizeof(__pyx_k_is_formant_bank), 0, 0, 1, 1},
    {&__pyx_n_s_is_frample2file, __pyx_k_is_frample2file, sizeof(__pyx_k_is_frample2file), 0, 0, 1, 1},
    {&__pyx_n_s_is_granulate, __pyx_k_is_granulate, sizeof(__pyx_k_is_granulate), 0, 0, 1, 1},
    {&__pyx_n_s_is_iir_filter, __pyx_k_is_iir_filter, sizeof(__pyx_k_is_iir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_is_list_or_ndarray, __pyx_k_is_list_or_ndarray, sizeof(__pyx_k_is_list_or_ndarray), 0, 0, 1, 1},
    {&__pyx_n_s_is_locsig, __pyx_k_is_locsig, sizeof(__pyx_k_is_locsig), 0, 0, 1, 1},
    {&__pyx_n_s_is_moving_average, __pyx_k_is_moving_average, sizeof(__pyx_k_is_moving_average), 0, 0, 1, 1},
    {&__pyx_n_s_is_moving_max, __pyx_k_is_moving_max, sizeof(__pyx_k_is_moving_max), 0, 0, 1, 1},
    {&__pyx_n_s_is_moving_norm, __pyx_k_is_moving_norm, sizeof(__pyx_k_is_moving_norm), 0, 0, 1, 1},
    {&__pyx_n_s_is_ncos, __pyx_k_is_ncos, sizeof(__pyx_k_is_ncos), 0, 0, 1, 1},
    {&__pyx_n_s_is_notch, __pyx_k_is_notch, sizeof(__pyx_k_is_notch), 0, 0, 1, 1},
    {&__pyx_n_s_is_nrxycos, __pyx_k_is_nrxycos, sizeof(__pyx_k_is_nrxycos), 0, 0, 1, 1},
    {&__pyx_n_s_is_nrxysin, __pyx_k_is_nrxysin, sizeof(__pyx_k_is_nrxysin), 0, 0, 1, 1},
    {&__pyx_n_s_is_nsin, __pyx_k_is_nsin, sizeof(__pyx_k_is_nsin), 0, 0, 1, 1},
    {&__pyx_n_s_is_number, __pyx_k_is_number, sizeof(__pyx_k_is_number), 0, 0, 1, 1},
    {&__pyx_n_s_is_odd, __pyx_k_is_odd, sizeof(__pyx_k_is_odd), 0, 0, 1, 1},
    {&__pyx_n_s_is_one_pole, __pyx_k_is_one_pole, sizeof(__pyx_k_is_one_pole), 0, 0, 1, 1},
    {&__pyx_n_s_is_one_pole_all_pass, __pyx_k_is_one_pole_all_pass, sizeof(__pyx_k_is_one_pole_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_is_one_zero, __pyx_k_is_one_zero, sizeof(__pyx_k_is_one_zero), 0, 0, 1, 1},
    {&__pyx_n_s_is_oscil, __pyx_k_is_oscil, sizeof(__pyx_k_is_oscil), 0, 0, 1, 1},
    {&__pyx_n_s_is_oscil_bank, __pyx_k_is_oscil_bank, sizeof(__pyx_k_is_oscil_bank), 0, 0, 1, 1},
    {&__pyx_kp_u_is_out_of_range, __pyx_k_is_out_of_range, sizeof(__pyx_k_is_out_of_range), 0, 1, 0, 0},
    {&__pyx_n_s_is_phase_vocoder, __pyx_k_is_phase_vocoder, sizeof(__pyx_k_is_phase_vocoder), 0, 0, 1, 1},
    {&__pyx_n_s_is_polyshape, __pyx_k_is_polyshape, sizeof(__pyx_k_is_polyshape), 0, 0, 1, 1},
    {&__pyx_n_s_is_polywave, __pyx_k_is_polywave, sizeof(__pyx_k_is_polywave), 0, 0, 1, 1},
    {&__pyx_n_s_is_power_of_2, __pyx_k_is_power_of_2, sizeof(__pyx_k_is_power_of_2), 0, 0, 1, 1},
    {&__pyx_n_s_is_pulse_train, __pyx_k_is_pulse_train, sizeof(__pyx_k_is_pulse_train), 0, 0, 1, 1},
    {&__pyx_n_s_is_pulsed_env, __pyx_k_is_pulsed_env, sizeof(__pyx_k_is_pulsed_env), 0, 0, 1, 1},
    {&__pyx_n_s_is_rand, __pyx_k_is_rand, sizeof(__pyx_k_is_rand), 0, 0, 1, 1},
    {&__pyx_n_s_is_rand_interp, __pyx_k_is_rand_interp, sizeof(__pyx_k_is_rand_interp), 0, 0, 1, 1},
    {&__pyx_n_s_is_readin, __pyx_k_is_readin, sizeof(__pyx_k_is_readin), 0, 0, 1, 1},
    {&__pyx_n_s_is_rxykcos, __pyx_k_is_rxykcos, sizeof(__pyx_k_is_rxykcos), 0, 0, 1, 1},
    {&__pyx_n_s_is_rxyksin, __pyx_k_is_rxyksin, sizeof(__pyx_k_is_rxyksin), 0, 0, 1, 1},
    {&__pyx_n_s_is_sample2file, __pyx_k_is_sample2file, sizeof(__pyx_k_is_sample2file), 0, 0, 1, 1},
    {&__pyx_n_s_is_sawtooth_wave, __pyx_k_is_sawtooth_wave, sizeof(__pyx_k_is_sawtooth_wave), 0, 0, 1, 1},
    {&__pyx_n_s_is_square_wave, __pyx_k_is_square_wave, sizeof(__pyx_k_is_square_wave), 0, 0, 1, 1},
    {&__pyx_n_s_is_src, __pyx_k_is_src, sizeof(__pyx_k_is_src), 0, 0, 1, 1},
    {&__pyx_n_s_is_ssb_am, __pyx_k_is_ssb_am, sizeof(__pyx_k_is_ssb_am), 0, 0, 1, 1},
    {&__pyx_n_s_is_table_lookup, __pyx_k_is_table_lookup, sizeof(__pyx_k_is_table_lookup), 0, 0, 1, 1},
    {&__pyx_n_s_is_tap, __pyx_k_is_tap, sizeof(__pyx_k_is_tap), 0, 0, 1, 1},
    {&__pyx_n_s_is_triangle_wave, __pyx_k_is_triangle_wave, sizeof(__pyx_k_is_triangle_wave), 0, 0, 1, 1},
    {&__pyx_n_s_is_two_pole, __pyx_k_is_two_pole, sizeof(__pyx_k_is_two_pole), 0, 0, 1, 1},
    {&__pyx_n_s_is_two_zero, __pyx_k_is_two_zero, sizeof(__pyx_k_is_two_zero), 0, 0, 1, 1},
    {&__pyx_n_s_is_wave_train, __pyx_k_is_wave_train, sizeof(__pyx_k_is_wave_train), 0, 0, 1, 1},
    {&__pyx_n_s_is_zero, __pyx_k_is_zero, sizeof(__pyx_k_is_zero), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1},
    {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
    {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
    {&__pyx_n_s_jitter, __pyx_k_jitter, sizeof(__pyx_k_jitter), 0, 0, 1, 1},
    {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
    {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
    {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
    {&__pyx_kp_u_length_2, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 1, 0, 0},
    {&__pyx_n_s_linear2db, __pyx_k_linear2db, sizeof(__pyx_k_linear2db), 0, 0, 1, 1},
    {&__pyx_n_s_linspace, __pyx_k_linspace, sizeof(__pyx_k_linspace), 0, 0, 1, 1},
    {&__pyx_n_u_linux, __pyx_k_linux, sizeof(__pyx_k_linux), 0, 1, 0, 1},
    {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
    {&__pyx_n_s_lo, __pyx_k_lo, sizeof(__pyx_k_lo), 0, 0, 1, 1},
    {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
    {&__pyx_n_s_locsig, __pyx_k_locsig, sizeof(__pyx_k_locsig), 0, 0, 1, 1},
    {&__pyx_n_s_locsig_ref, __pyx_k_locsig_ref, sizeof(__pyx_k_locsig_ref), 0, 0, 1, 1},
    {&__pyx_n_s_locsig_reverb_ref, __pyx_k_locsig_reverb_ref, sizeof(__pyx_k_locsig_reverb_ref), 0, 0, 1, 1},
    {&__pyx_n_s_locsig_reverb_set, __pyx_k_locsig_reverb_set, sizeof(__pyx_k_locsig_reverb_set), 0, 0, 1, 1},
    {&__pyx_n_s_locsig_set, __pyx_k_locsig_set, sizeof(__pyx_k_locsig_set), 0, 0, 1, 1},
    {&__pyx_n_s_locsig_type, __pyx_k_locsig_type, sizeof(__pyx_k_locsig_type), 0, 0, 1, 1},
    {&__pyx_n_s_locsigdetourcallback, __pyx_k_locsigdetourcallback, sizeof(__pyx_k_locsigdetourcallback), 0, 0, 1, 1},
    {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
    {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
    {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1},
    {&__pyx_n_s_mabs, __pyx_k_mabs, sizeof(__pyx_k_mabs), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_make_all_pass, __pyx_k_make_all_pass, sizeof(__pyx_k_make_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_all_pass_bank, __pyx_k_make_all_pass_bank, sizeof(__pyx_k_make_all_pass_bank), 0, 0, 1, 1},
    {&__pyx_n_s_make_array_readin, __pyx_k_make_array_readin, sizeof(__pyx_k_make_array_readin), 0, 0, 1, 1},
    {&__pyx_n_s_make_asymmetric_fm, __pyx_k_make_asymmetric_fm, sizeof(__pyx_k_make_asymmetric_fm), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad, __pyx_k_make_biquad, sizeof(__pyx_k_make_biquad), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_all_pass, __pyx_k_make_biquad_all_pass, sizeof(__pyx_k_make_biquad_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_band_pass, __pyx_k_make_biquad_band_pass, sizeof(__pyx_k_make_biquad_band_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_band_reject, __pyx_k_make_biquad_band_reject, sizeof(__pyx_k_make_biquad_band_reject), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_high_pass, __pyx_k_make_biquad_high_pass, sizeof(__pyx_k_make_biquad_high_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_low_pass, __pyx_k_make_biquad_low_pass, sizeof(__pyx_k_make_biquad_low_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_biquad_notch, __pyx_k_make_biquad_notch, sizeof(__pyx_k_make_biquad_notch), 0, 0, 1, 1},
    {&__pyx_n_s_make_comb, __pyx_k_make_comb, sizeof(__pyx_k_make_comb), 0, 0, 1, 1},
    {&__pyx_n_s_make_comb_bank, __pyx_k_make_comb_bank, sizeof(__pyx_k_make_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_make_convolve, __pyx_k_make_convolve, sizeof(__pyx_k_make_convolve), 0, 0, 1, 1},
    {&__pyx_n_s_make_convolve_locals_inp_f, __pyx_k_make_convolve_locals_inp_f, sizeof(__pyx_k_make_convolve_locals_inp_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_dcblock, __pyx_k_make_dcblock, sizeof(__pyx_k_make_dcblock), 0, 0, 1, 1},
    {&__pyx_n_s_make_delay, __pyx_k_make_delay, sizeof(__pyx_k_make_delay), 0, 0, 1, 1},
    {&__pyx_n_s_make_env, __pyx_k_make_env, sizeof(__pyx_k_make_env), 0, 0, 1, 1},
    {&__pyx_n_s_make_fft_window, __pyx_k_make_fft_window, sizeof(__pyx_k_make_fft_window), 0, 0, 1, 1},
    {&__pyx_n_s_make_file2frample, __pyx_k_make_file2frample, sizeof(__pyx_k_make_file2frample), 0, 0, 1, 1},
    {&__pyx_n_s_make_file2sample, __pyx_k_make_file2sample, sizeof(__pyx_k_make_file2sample), 0, 0, 1, 1},
    {&__pyx_n_s_make_filter, __pyx_k_make_filter, sizeof(__pyx_k_make_filter), 0, 0, 1, 1},
    {&__pyx_n_s_make_filtered_comb, __pyx_k_make_filtered_comb, sizeof(__pyx_k_make_filtered_comb), 0, 0, 1, 1},
    {&__pyx_n_s_make_filtered_comb_bank, __pyx_k_make_filtered_comb_bank, sizeof(__pyx_k_make_filtered_comb_bank), 0, 0, 1, 1},
    {&__pyx_n_s_make_fir_coeffs, __pyx_k_make_fir_coeffs, sizeof(__pyx_k_make_fir_coeffs), 0, 0, 1, 1},
    {&__pyx_n_s_make_fir_filter, __pyx_k_make_fir_filter, sizeof(__pyx_k_make_fir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_make_firmant, __pyx_k_make_firmant, sizeof(__pyx_k_make_firmant), 0, 0, 1, 1},
    {&__pyx_n_s_make_formant, __pyx_k_make_formant, sizeof(__pyx_k_make_formant), 0, 0, 1, 1},
    {&__pyx_n_s_make_formant_bank, __pyx_k_make_formant_bank, sizeof(__pyx_k_make_formant_bank), 0, 0, 1, 1},
    {&__pyx_n_s_make_frample2file, __pyx_k_make_frample2file, sizeof(__pyx_k_make_frample2file), 0, 0, 1, 1},
    {&__pyx_n_s_make_granulate, __pyx_k_make_granulate, sizeof(__pyx_k_make_granulate), 0, 0, 1, 1},
    {&__pyx_n_s_make_granulate_locals_edit_f, __pyx_k_make_granulate_locals_edit_f, sizeof(__pyx_k_make_granulate_locals_edit_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_granulate_locals_inp_f, __pyx_k_make_granulate_locals_inp_f, sizeof(__pyx_k_make_granulate_locals_inp_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_iir_filter, __pyx_k_make_iir_filter, sizeof(__pyx_k_make_iir_filter), 0, 0, 1, 1},
    {&__pyx_n_s_make_locsig, __pyx_k_make_locsig, sizeof(__pyx_k_make_locsig), 0, 0, 1, 1},
    {&__pyx_n_s_make_moving_average, __pyx_k_make_moving_average, sizeof(__pyx_k_make_moving_average), 0, 0, 1, 1},
    {&__pyx_n_s_make_moving_max, __pyx_k_make_moving_max, sizeof(__pyx_k_make_moving_max), 0, 0, 1, 1},
    {&__pyx_n_s_make_moving_norm, __pyx_k_make_moving_norm, sizeof(__pyx_k_make_moving_norm), 0, 0, 1, 1},
    {&__pyx_n_s_make_ncos, __pyx_k_make_ncos, sizeof(__pyx_k_make_ncos), 0, 0, 1, 1},
    {&__pyx_n_s_make_notch, __pyx_k_make_notch, sizeof(__pyx_k_make_notch), 0, 0, 1, 1},
    {&__pyx_n_s_make_nrxycos, __pyx_k_make_nrxycos, sizeof(__pyx_k_make_nrxycos), 0, 0, 1, 1},
    {&__pyx_n_s_make_nrxysin, __pyx_k_make_nrxysin, sizeof(__pyx_k_make_nrxysin), 0, 0, 1, 1},
    {&__pyx_n_s_make_nsin, __pyx_k_make_nsin, sizeof(__pyx_k_make_nsin), 0, 0, 1, 1},
    {&__pyx_n_s_make_one_pole, __pyx_k_make_one_pole, sizeof(__pyx_k_make_one_pole), 0, 0, 1, 1},
    {&__pyx_n_s_make_one_pole_all_pass, __pyx_k_make_one_pole_all_pass, sizeof(__pyx_k_make_one_pole_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_make_one_zero, __pyx_k_make_one_zero, sizeof(__pyx_k_make_one_zero), 0, 0, 1, 1},
    {&__pyx_n_s_make_oscil, __pyx_k_make_oscil, sizeof(__pyx_k_make_oscil), 0, 0, 1, 1},
    {&__pyx_n_s_make_oscil_bank, __pyx_k_make_oscil_bank, sizeof(__pyx_k_make_oscil_bank), 0, 0, 1, 1},
    {&__pyx_n_s_make_phase_vocoder, __pyx_k_make_phase_vocoder, sizeof(__pyx_k_make_phase_vocoder), 0, 0, 1, 1},
    {&__pyx_n_s_make_phase_vocoder_locals_analyz, __pyx_k_make_phase_vocoder_locals_analyz, sizeof(__pyx_k_make_phase_vocoder_locals_analyz), 0, 0, 1, 1},
    {&__pyx_n_s_make_phase_vocoder_locals_edit_f, __pyx_k_make_phase_vocoder_locals_edit_f, sizeof(__pyx_k_make_phase_vocoder_locals_edit_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_phase_vocoder_locals_inp_f, __pyx_k_make_phase_vocoder_locals_inp_f, sizeof(__pyx_k_make_phase_vocoder_locals_inp_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_phase_vocoder_locals_synthe, __pyx_k_make_phase_vocoder_locals_synthe, sizeof(__pyx_k_make_phase_vocoder_locals_synthe), 0, 0, 1, 1},
    {&__pyx_n_s_make_polyshape, __pyx_k_make_polyshape, sizeof(__pyx_k_make_polyshape), 0, 0, 1, 1},
    {&__pyx_n_s_make_polywave, __pyx_k_make_polywave, sizeof(__pyx_k_make_polywave), 0, 0, 1, 1},
    {&__pyx_n_s_make_pulse_train, __pyx_k_make_pulse_train, sizeof(__pyx_k_make_pulse_train), 0, 0, 1, 1},
    {&__pyx_n_s_make_pulsed_env, __pyx_k_make_pulsed_env, sizeof(__pyx_k_make_pulsed_env), 0, 0, 1, 1},
    {&__pyx_n_s_make_rand, __pyx_k_make_rand, sizeof(__pyx_k_make_rand), 0, 0, 1, 1},
    {&__pyx_n_s_make_rand_interp, __pyx_k_make_rand_interp, sizeof(__pyx_k_make_rand_interp), 0, 0, 1, 1},
    {&__pyx_n_s_make_readin, __pyx_k_make_readin, sizeof(__pyx_k_make_readin), 0, 0, 1, 1},
    {&__pyx_n_s_make_rxykcos, __pyx_k_make_rxykcos, sizeof(__pyx_k_make_rxykcos), 0, 0, 1, 1},
    {&__pyx_n_s_make_rxyksin, __pyx_k_make_rxyksin, sizeof(__pyx_k_make_rxyksin), 0, 0, 1, 1},
    {&__pyx_n_s_make_sample2file, __pyx_k_make_sample2file, sizeof(__pyx_k_make_sample2file), 0, 0, 1, 1},
    {&__pyx_n_s_make_sawtooth_wave, __pyx_k_make_sawtooth_wave, sizeof(__pyx_k_make_sawtooth_wave), 0, 0, 1, 1},
    {&__pyx_n_s_make_square_wave, __pyx_k_make_square_wave, sizeof(__pyx_k_make_square_wave), 0, 0, 1, 1},
    {&__pyx_n_s_make_src, __pyx_k_make_src, sizeof(__pyx_k_make_src), 0, 0, 1, 1},
    {&__pyx_n_s_make_src_locals_inp_f, __pyx_k_make_src_locals_inp_f, sizeof(__pyx_k_make_src_locals_inp_f), 0, 0, 1, 1},
    {&__pyx_n_s_make_ssb_am, __pyx_k_make_ssb_am, sizeof(__pyx_k_make_ssb_am), 0, 0, 1, 1},
    {&__pyx_n_s_make_table_lookup, __pyx_k_make_table_lookup, sizeof(__pyx_k_make_table_lookup), 0, 0, 1, 1},
    {&__pyx_n_s_make_table_lookup_with_env, __pyx_k_make_table_lookup_with_env, sizeof(__pyx_k_make_table_lookup_with_env), 0, 0, 1, 1},
    {&__pyx_n_s_make_triangle_wave, __pyx_k_make_triangle_wave, sizeof(__pyx_k_make_triangle_wave), 0, 0, 1, 1},
    {&__pyx_n_s_make_two_pole, __pyx_k_make_two_pole, sizeof(__pyx_k_make_two_pole), 0, 0, 1, 1},
    {&__pyx_n_s_make_two_zero, __pyx_k_make_two_zero, sizeof(__pyx_k_make_two_zero), 0, 0, 1, 1},
    {&__pyx_n_s_make_wave_train, __pyx_k_make_wave_train, sizeof(__pyx_k_make_wave_train), 0, 0, 1, 1},
    {&__pyx_n_s_make_wave_train_with_env, __pyx_k_make_wave_train_with_env, sizeof(__pyx_k_make_wave_train_with_env), 0, 0, 1, 1},
    {&__pyx_kp_s_many_useful_windows, __pyx_k_many_useful_windows, sizeof(__pyx_k_many_useful_windows), 0, 0, 1, 0},
    {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
    {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
    {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
    {&__pyx_n_s_max_size, __pyx_k_max_size, sizeof(__pyx_k_max_size), 0, 0, 1, 1},
    {&__pyx_kp_u_maxamp, __pyx_k_maxamp, sizeof(__pyx_k_maxamp), 0, 1, 0, 0},
    {&__pyx_n_s_maxamp_2, __pyx_k_maxamp_2, sizeof(__pyx_k_maxamp_2), 0, 0, 1, 1},
    {&__pyx_n_s_maxamp_result, __pyx_k_maxamp_result, sizeof(__pyx_k_maxamp_result), 0, 0, 1, 1},
    {&__pyx_n_s_member_names, __pyx_k_member_names, sizeof(__pyx_k_member_names), 0, 0, 1, 1},
    {&__pyx_n_s_members, __pyx_k_members, sizeof(__pyx_k_members), 0, 0, 1, 1},
    {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
    {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
    {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
    {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1},
    {&__pyx_n_s_move_locsig, __pyx_k_move_locsig, sizeof(__pyx_k_move_locsig), 0, 0, 1, 1},
    {&__pyx_n_s_moving_average, __pyx_k_moving_average, sizeof(__pyx_k_moving_average), 0, 0, 1, 1},
    {&__pyx_n_s_moving_max, __pyx_k_moving_max, sizeof(__pyx_k_moving_max), 0, 0, 1, 1},
    {&__pyx_n_s_moving_norm, __pyx_k_moving_norm, sizeof(__pyx_k_moving_norm), 0, 0, 1, 1},
    {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any, __pyx_k_mus_any, sizeof(__pyx_k_mus_any), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any___reduce_cython, __pyx_k_mus_any___reduce_cython, sizeof(__pyx_k_mus_any___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any___setstate_cython, __pyx_k_mus_any___setstate_cython, sizeof(__pyx_k_mus_any___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_array, __pyx_k_mus_any_array, sizeof(__pyx_k_mus_any_array), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_array___reduce_cython, __pyx_k_mus_any_array___reduce_cython, sizeof(__pyx_k_mus_any_array___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_array___setstate_cython, __pyx_k_mus_any_array___setstate_cython, sizeof(__pyx_k_mus_any_array___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_cache_append, __pyx_k_mus_any_cache_append, sizeof(__pyx_k_mus_any_cache_append), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_cache_extend, __pyx_k_mus_any_cache_extend, sizeof(__pyx_k_mus_any_cache_extend), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_mus_reset, __pyx_k_mus_any_mus_reset, sizeof(__pyx_k_mus_any_mus_reset), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_next, __pyx_k_mus_any_next, sizeof(__pyx_k_mus_any_next), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_set_up_data, __pyx_k_mus_any_set_up_data, sizeof(__pyx_k_mus_any_set_up_data), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_set_up_pv_data, __pyx_k_mus_any_set_up_pv_data, sizeof(__pyx_k_mus_any_set_up_pv_data), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_set_up_xcoeffs, __pyx_k_mus_any_set_up_xcoeffs, sizeof(__pyx_k_mus_any_set_up_xcoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_mus_any_set_up_ycoeffs, __pyx_k_mus_any_set_up_ycoeffs, sizeof(__pyx_k_mus_any_set_up_ycoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_mus_autocorrelate, __pyx_k_mus_autocorrelate, sizeof(__pyx_k_mus_autocorrelate), 0, 0, 1, 1},
    {&__pyx_n_s_mus_cepstrum, __pyx_k_mus_cepstrum, sizeof(__pyx_k_mus_cepstrum), 0, 0, 1, 1},
    {&__pyx_n_s_mus_channels, __pyx_k_mus_channels, sizeof(__pyx_k_mus_channels), 0, 0, 1, 1},
    {&__pyx_n_s_mus_close, __pyx_k_mus_close, sizeof(__pyx_k_mus_close), 0, 0, 1, 1},
    {&__pyx_n_s_mus_convolution, __pyx_k_mus_convolution, sizeof(__pyx_k_mus_convolution), 0, 0, 1, 1},
    {&__pyx_n_s_mus_correlate, __pyx_k_mus_correlate, sizeof(__pyx_k_mus_correlate), 0, 0, 1, 1},
    {&__pyx_kp_u_mus_data_can_not_be_called_on, __pyx_k_mus_data_can_not_be_called_on, sizeof(__pyx_k_mus_data_can_not_be_called_on), 0, 1, 0, 0},
    {&__pyx_n_s_mus_fft, __pyx_k_mus_fft, sizeof(__pyx_k_mus_fft), 0, 0, 1, 1},
    {&__pyx_n_s_mus_interpolate, __pyx_k_mus_interpolate, sizeof(__pyx_k_mus_interpolate), 0, 0, 1, 1},
    {&__pyx_n_s_mus_is_input, __pyx_k_mus_is_input, sizeof(__pyx_k_mus_is_input), 0, 0, 1, 1},
    {&__pyx_n_s_mus_is_output, __pyx_k_mus_is_output, sizeof(__pyx_k_mus_is_output), 0, 0, 1, 1},
    {&__pyx_n_s_mus_length, __pyx_k_mus_length, sizeof(__pyx_k_mus_length), 0, 0, 1, 1},
    {&__pyx_n_s_mus_order, __pyx_k_mus_order, sizeof(__pyx_k_mus_order), 0, 0, 1, 1},
    {&__pyx_n_s_mus_polar2rectangular, __pyx_k_mus_polar2rectangular, sizeof(__pyx_k_mus_polar2rectangular), 0, 0, 1, 1},
    {&__pyx_n_s_mus_rectangular2magnitudes, __pyx_k_mus_rectangular2magnitudes, sizeof(__pyx_k_mus_rectangular2magnitudes), 0, 0, 1, 1},
    {&__pyx_n_s_mus_rectangular2polar, __pyx_k_mus_rectangular2polar, sizeof(__pyx_k_mus_rectangular2polar), 0, 0, 1, 1},
    {&__pyx_n_s_mus_reset, __pyx_k_mus_reset, sizeof(__pyx_k_mus_reset), 0, 0, 1, 1},
    {&__pyx_n_s_mus_spectrum, __pyx_k_mus_spectrum, sizeof(__pyx_k_mus_spectrum), 0, 0, 1, 1},
    {&__pyx_n_s_mus_xcoeffs, __pyx_k_mus_xcoeffs, sizeof(__pyx_k_mus_xcoeffs), 0, 0, 1, 1},
    {&__pyx_kp_u_mus_xcoeffs_can_not_be_called_on, __pyx_k_mus_xcoeffs_can_not_be_called_on, sizeof(__pyx_k_mus_xcoeffs_can_not_be_called_on), 0, 1, 0, 0},
    {&__pyx_n_s_mus_ycoeffs, __pyx_k_mus_ycoeffs, sizeof(__pyx_k_mus_ycoeffs), 0, 0, 1, 1},
    {&__pyx_kp_u_mus_ycoeffs_can_not_be_called_on, __pyx_k_mus_ycoeffs_can_not_be_called_on, sizeof(__pyx_k_mus_ycoeffs_can_not_be_called_on), 0, 1, 0, 0},
    {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
    {&__pyx_n_u_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 1, 0, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
    {&__pyx_n_s_ncos, __pyx_k_ncos, sizeof(__pyx_k_ncos), 0, 0, 1, 1},
    {&__pyx_n_s_ndarray2file, __pyx_k_ndarray2file, sizeof(__pyx_k_ndarray2file), 0, 0, 1, 1},
    {&__pyx_kp_u_ndarray_must_have_1_or_2_dimensi, __pyx_k_ndarray_must_have_1_or_2_dimensi, sizeof(__pyx_k_ndarray_must_have_1_or_2_dimensi), 0, 1, 0, 0},
    {&__pyx_kp_u_ndarrays_of_unequal_shape, __pyx_k_ndarrays_of_unequal_shape, sizeof(__pyx_k_ndarrays_of_unequal_shape), 0, 1, 0, 0},
    {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
    {&__pyx_n_u_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 1, 0, 1},
    {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
    {&__pyx_n_s_new_length, __pyx_k_new_length, sizeof(__pyx_k_new_length), 0, 0, 1, 1},
    {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
    {&__pyx_n_s_next_power_of_2, __pyx_k_next_power_of_2, sizeof(__pyx_k_next_power_of_2), 0, 0, 1, 1},
    {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
    {&__pyx_kp_u_no_player_specified, __pyx_k_no_player_specified, sizeof(__pyx_k_no_player_specified), 0, 1, 0, 0},
    {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
    {&__pyx_n_s_norm_type, __pyx_k_norm_type, sizeof(__pyx_k_norm_type), 0, 0, 1, 1},
    {&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1},
    {&__pyx_n_s_normalize_partials, __pyx_k_normalize_partials, sizeof(__pyx_k_normalize_partials), 0, 0, 1, 1},
    {&__pyx_kp_u_not_supported, __pyx_k_not_supported, sizeof(__pyx_k_not_supported), 0, 1, 0, 0},
    {&__pyx_n_s_notch, __pyx_k_notch, sizeof(__pyx_k_notch), 0, 0, 1, 1},
    {&__pyx_n_s_notch_unmodulated, __pyx_k_notch_unmodulated, sizeof(__pyx_k_notch_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
    {&__pyx_kp_s_npt_NDArray_np_float64, __pyx_k_npt_NDArray_np_float64, sizeof(__pyx_k_npt_NDArray_np_float64), 0, 0, 1, 0},
    {&__pyx_n_s_nrxycos, __pyx_k_nrxycos, sizeof(__pyx_k_nrxycos), 0, 0, 1, 1},
    {&__pyx_n_s_nrxysin, __pyx_k_nrxysin, sizeof(__pyx_k_nrxysin), 0, 0, 1, 1},
    {&__pyx_n_s_nsin, __pyx_k_nsin, sizeof(__pyx_k_nsin), 0, 0, 1, 1},
    {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
    {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
    {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
    {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
    {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
    {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
    {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
    {&__pyx_kp_u_object_2, __pyx_k_object_2, sizeof(__pyx_k_object_2), 0, 1, 0, 0},
    {&__pyx_n_s_odd_multiple, __pyx_k_odd_multiple, sizeof(__pyx_k_odd_multiple), 0, 0, 1, 1},
    {&__pyx_n_s_odd_weight, __pyx_k_odd_weight, sizeof(__pyx_k_odd_weight), 0, 0, 1, 1},
    {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
    {&__pyx_n_s_old_srate, __pyx_k_old_srate, sizeof(__pyx_k_old_srate), 0, 0, 1, 1},
    {&__pyx_n_s_omega_t, __pyx_k_omega_t, sizeof(__pyx_k_omega_t), 0, 0, 1, 1},
    {&__pyx_n_s_one_pole, __pyx_k_one_pole, sizeof(__pyx_k_one_pole), 0, 0, 1, 1},
    {&__pyx_n_s_one_pole_all_pass, __pyx_k_one_pole_all_pass, sizeof(__pyx_k_one_pole_all_pass), 0, 0, 1, 1},
    {&__pyx_n_s_one_zero, __pyx_k_one_zero, sizeof(__pyx_k_one_zero), 0, 0, 1, 1},
    {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
    {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
    {&__pyx_n_s_orig_length, __pyx_k_orig_length, sizeof(__pyx_k_orig_length), 0, 0, 1, 1},
    {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
    {&__pyx_n_s_oscil, __pyx_k_oscil, sizeof(__pyx_k_oscil), 0, 0, 1, 1},
    {&__pyx_n_s_oscil_bank, __pyx_k_oscil_bank, sizeof(__pyx_k_oscil_bank), 0, 0, 1, 1},
    {&__pyx_n_s_oscil_unmodulated, __pyx_k_oscil_unmodulated, sizeof(__pyx_k_oscil_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_out_any, __pyx_k_out_any, sizeof(__pyx_k_out_any), 0, 0, 1, 1},
    {&__pyx_n_s_out_bank, __pyx_k_out_bank, sizeof(__pyx_k_out_bank), 0, 0, 1, 1},
    {&__pyx_n_s_outa, __pyx_k_outa, sizeof(__pyx_k_outa), 0, 0, 1, 1},
    {&__pyx_n_s_outb, __pyx_k_outb, sizeof(__pyx_k_outb), 0, 0, 1, 1},
    {&__pyx_n_s_outc, __pyx_k_outc, sizeof(__pyx_k_outc), 0, 0, 1, 1},
    {&__pyx_n_s_outd, __pyx_k_outd, sizeof(__pyx_k_outd), 0, 0, 1, 1},
    {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
    {&__pyx_kp_u_output_needs_to_be_a_clm_gen_or, __pyx_k_output_needs_to_be_a_clm_gen_or, sizeof(__pyx_k_output_needs_to_be_a_clm_gen_or), 0, 1, 0, 0},
    {&__pyx_n_s_output_to_file, __pyx_k_output_to_file, sizeof(__pyx_k_output_to_file), 0, 0, 1, 1},
    {&__pyx_n_s_outputfile, __pyx_k_outputfile, sizeof(__pyx_k_outputfile), 0, 0, 1, 1},
    {&__pyx_n_s_overlap, __pyx_k_overlap, sizeof(__pyx_k_overlap), 0, 0, 1, 1},
    {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
    {&__pyx_n_s_parents, __pyx_k_parents, sizeof(__pyx_k_parents), 0, 0, 1, 1},
    {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1},
    {&__pyx_n_s_partials, __pyx_k_partials, sizeof(__pyx_k_partials), 0, 0, 1, 1},
    {&__pyx_n_s_partials2polynomial, __pyx_k_partials2polynomial, sizeof(__pyx_k_partials2polynomial), 0, 0, 1, 1},
    {&__pyx_n_s_partials2wave, __pyx_k_partials2wave, sizeof(__pyx_k_partials2wave), 0, 0, 1, 1},
    {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
    {&__pyx_n_s_perf_counter, __pyx_k_perf_counter, sizeof(__pyx_k_perf_counter), 0, 0, 1, 1},
    {&__pyx_n_s_phase, __pyx_k_phase, sizeof(__pyx_k_phase), 0, 0, 1, 1},
    {&__pyx_n_s_phase_delay, __pyx_k_phase_delay, sizeof(__pyx_k_phase_delay), 0, 0, 1, 1},
    {&__pyx_n_s_phase_partials2wave, __pyx_k_phase_partials2wave, sizeof(__pyx_k_phase_partials2wave), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder, __pyx_k_phase_vocoder, sizeof(__pyx_k_phase_vocoder), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder_amp_increments, __pyx_k_phase_vocoder_amp_increments, sizeof(__pyx_k_phase_vocoder_amp_increments), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder_amps, __pyx_k_phase_vocoder_amps, sizeof(__pyx_k_phase_vocoder_amps), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder_freqs, __pyx_k_phase_vocoder_freqs, sizeof(__pyx_k_phase_vocoder_freqs), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder_phase_increments, __pyx_k_phase_vocoder_phase_increments, sizeof(__pyx_k_phase_vocoder_phase_increments), 0, 0, 1, 1},
    {&__pyx_n_s_phase_vocoder_phases, __pyx_k_phase_vocoder_phases, sizeof(__pyx_k_phase_vocoder_phases), 0, 0, 1, 1},
    {&__pyx_n_s_phases, __pyx_k_phases, sizeof(__pyx_k_phases), 0, 0, 1, 1},
    {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
    {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_pitch, __pyx_k_pitch, sizeof(__pyx_k_pitch), 0, 0, 1, 1},
    {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
    {&__pyx_n_s_play, __pyx_k_play, sizeof(__pyx_k_play), 0, 0, 1, 1},
    {&__pyx_n_s_player, __pyx_k_player, sizeof(__pyx_k_player), 0, 0, 1, 1},
    {&__pyx_n_s_pm, __pyx_k_pm, sizeof(__pyx_k_pm), 0, 0, 1, 1},
    {&__pyx_n_s_polar2rectangular, __pyx_k_polar2rectangular, sizeof(__pyx_k_polar2rectangular), 0, 0, 1, 1},
    {&__pyx_n_s_polynomial, __pyx_k_polynomial, sizeof(__pyx_k_polynomial), 0, 0, 1, 1},
    {&__pyx_n_s_polyshape, __pyx_k_polyshape, sizeof(__pyx_k_polyshape), 0, 0, 1, 1},
    {&__pyx_n_s_polyshape_unmodulated, __pyx_k_polyshape_unmodulated, sizeof(__pyx_k_polyshape_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_polywave, __pyx_k_polywave, sizeof(__pyx_k_polywave), 0, 0, 1, 1},
    {&__pyx_n_s_polywave_unmodulated, __pyx_k_polywave_unmodulated, sizeof(__pyx_k_polywave_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
    {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
    {&__pyx_n_s_pulse_train, __pyx_k_pulse_train, sizeof(__pyx_k_pulse_train), 0, 0, 1, 1},
    {&__pyx_n_s_pulse_train_unmodulated, __pyx_k_pulse_train_unmodulated, sizeof(__pyx_k_pulse_train_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_pulsed_env, __pyx_k_pulsed_env, sizeof(__pyx_k_pulsed_env), 0, 0, 1, 1},
    {&__pyx_n_s_pulsed_env_unmodulated, __pyx_k_pulsed_env_unmodulated, sizeof(__pyx_k_pulsed_env_unmodulated), 0, 0, 1, 1},
    {&__pyx_kp_u_pysndlib, __pyx_k_pysndlib, sizeof(__pyx_k_pysndlib), 0, 1, 0, 0},
    {&__pyx_n_s_pysndlib_clm, __pyx_k_pysndlib_clm, sizeof(__pyx_k_pysndlib_clm), 0, 0, 1, 1},
    {&__pyx_n_s_pysndlib_sndlib, __pyx_k_pysndlib_sndlib, sizeof(__pyx_k_pysndlib_sndlib), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle___Pyx_EnumMeta, __pyx_k_pyx_unpickle___Pyx_EnumMeta, sizeof(__pyx_k_pyx_unpickle___Pyx_EnumMeta), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_array_readin_gen, __pyx_k_pyx_unpickle_array_readin_gen, sizeof(__pyx_k_pyx_unpickle_array_readin_gen), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
    {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
    {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
    {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
    {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
    {&__pyx_n_s_radians, __pyx_k_radians, sizeof(__pyx_k_radians), 0, 0, 1, 1},
    {&__pyx_n_s_radians2degrees, __pyx_k_radians2degrees, sizeof(__pyx_k_radians2degrees), 0, 0, 1, 1},
    {&__pyx_n_s_radians2hz, __pyx_k_radians2hz, sizeof(__pyx_k_radians2hz), 0, 0, 1, 1},
    {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1},
    {&__pyx_n_s_ramp, __pyx_k_ramp, sizeof(__pyx_k_ramp), 0, 0, 1, 1},
    {&__pyx_n_s_rand, __pyx_k_rand, sizeof(__pyx_k_rand), 0, 0, 1, 1},
    {&__pyx_n_s_rand_interp, __pyx_k_rand_interp, sizeof(__pyx_k_rand_interp), 0, 0, 1, 1},
    {&__pyx_n_s_rand_interp_unmodulated, __pyx_k_rand_interp_unmodulated, sizeof(__pyx_k_rand_interp_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_rand_unmodulated, __pyx_k_rand_unmodulated, sizeof(__pyx_k_rand_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_n_s_ratio, __pyx_k_ratio, sizeof(__pyx_k_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_rdat, __pyx_k_rdat, sizeof(__pyx_k_rdat), 0, 0, 1, 1},
    {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
    {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
    {&__pyx_kp_u_readin, __pyx_k_readin, sizeof(__pyx_k_readin), 0, 1, 0, 0},
    {&__pyx_n_s_readin_2, __pyx_k_readin_2, sizeof(__pyx_k_readin_2), 0, 0, 1, 1},
    {&__pyx_n_s_real, __pyx_k_real, sizeof(__pyx_k_real), 0, 0, 1, 1},
    {&__pyx_n_s_rectangular2magnitudes, __pyx_k_rectangular2magnitudes, sizeof(__pyx_k_rectangular2magnitudes), 0, 0, 1, 1},
    {&__pyx_n_s_rectangular2polar, __pyx_k_rectangular2polar, sizeof(__pyx_k_rectangular2polar), 0, 0, 1, 1},
    {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
    {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
    {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
    {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
    {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
    {&__pyx_n_s_resize, __pyx_k_resize, sizeof(__pyx_k_resize), 0, 0, 1, 1},
    {&__pyx_n_s_reverb, __pyx_k_reverb, sizeof(__pyx_k_reverb), 0, 0, 1, 1},
    {&__pyx_n_s_reverb_channels, __pyx_k_reverb_channels, sizeof(__pyx_k_reverb_channels), 0, 0, 1, 1},
    {&__pyx_n_s_reverb_data, __pyx_k_reverb_data, sizeof(__pyx_k_reverb_data), 0, 0, 1, 1},
    {&__pyx_n_s_reverb_file_name, __pyx_k_reverb_file_name, sizeof(__pyx_k_reverb_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_reverb_to_file, __pyx_k_reverb_to_file, sizeof(__pyx_k_reverb_to_file), 0, 0, 1, 1},
    {&__pyx_n_s_revfile, __pyx_k_revfile, sizeof(__pyx_k_revfile), 0, 0, 1, 1},
    {&__pyx_kp_u_revmax, __pyx_k_revmax, sizeof(__pyx_k_revmax), 0, 1, 0, 0},
    {&__pyx_n_s_revout, __pyx_k_revout, sizeof(__pyx_k_revout), 0, 0, 1, 1},
    {&__pyx_n_s_ring_modulate, __pyx_k_ring_modulate, sizeof(__pyx_k_ring_modulate), 0, 0, 1, 1},
    {&__pyx_n_s_rl1, __pyx_k_rl1, sizeof(__pyx_k_rl1), 0, 0, 1, 1},
    {&__pyx_n_s_rl2, __pyx_k_rl2, sizeof(__pyx_k_rl2), 0, 0, 1, 1},
    {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
    {&__pyx_n_s_rxykcos, __pyx_k_rxykcos, sizeof(__pyx_k_rxykcos), 0, 0, 1, 1},
    {&__pyx_n_s_rxyksin, __pyx_k_rxyksin, sizeof(__pyx_k_rxyksin), 0, 0, 1, 1},
    {&__pyx_n_s_s1, __pyx_k_s1, sizeof(__pyx_k_s1), 0, 0, 1, 1},
    {&__pyx_n_s_s2, __pyx_k_s2, sizeof(__pyx_k_s2), 0, 0, 1, 1},
    {&__pyx_n_s_s3, __pyx_k_s3, sizeof(__pyx_k_s3), 0, 0, 1, 1},
    {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
    {&__pyx_kp_s_s_s_d, __pyx_k_s_s_d, sizeof(__pyx_k_s_s_d), 0, 0, 1, 0},
    {&__pyx_n_s_samp, __pyx_k_samp, sizeof(__pyx_k_samp), 0, 0, 1, 1},
    {&__pyx_n_s_sample2file, __pyx_k_sample2file, sizeof(__pyx_k_sample2file), 0, 0, 1, 1},
    {&__pyx_n_s_sample_type, __pyx_k_sample_type, sizeof(__pyx_k_sample_type), 0, 0, 1, 1},
    {&__pyx_kp_u_samples, __pyx_k_samples, sizeof(__pyx_k_samples), 0, 1, 0, 0},
    {&__pyx_n_s_samples2seconds, __pyx_k_samples2seconds, sizeof(__pyx_k_samples2seconds), 0, 0, 1, 1},
    {&__pyx_n_s_samples_2, __pyx_k_samples_2, sizeof(__pyx_k_samples_2), 0, 0, 1, 1},
    {&__pyx_n_s_sawtooth_wave, __pyx_k_sawtooth_wave, sizeof(__pyx_k_sawtooth_wave), 0, 0, 1, 1},
    {&__pyx_n_s_scaled_by, __pyx_k_scaled_by, sizeof(__pyx_k_scaled_by), 0, 0, 1, 1},
    {&__pyx_n_s_scaled_to, __pyx_k_scaled_to, sizeof(__pyx_k_scaled_to), 0, 0, 1, 1},
    {&__pyx_n_s_scaler, __pyx_k_scaler, sizeof(__pyx_k_scaler), 0, 0, 1, 1},
    {&__pyx_kp_u_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 1, 0, 0},
    {&__pyx_n_s_seconds2samples, __pyx_k_seconds2samples, sizeof(__pyx_k_seconds2samples), 0, 0, 1, 1},
    {&__pyx_kp_u_seconds_2, __pyx_k_seconds_2, sizeof(__pyx_k_seconds_2), 0, 1, 0, 0},
    {&__pyx_n_s_secs, __pyx_k_secs, sizeof(__pyx_k_secs), 0, 0, 1, 1},
    {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
    {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
    {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
    {&__pyx_n_s_set_srate, __pyx_k_set_srate, sizeof(__pyx_k_set_srate), 0, 0, 1, 1},
    {&__pyx_n_s_set_up_data, __pyx_k_set_up_data, sizeof(__pyx_k_set_up_data), 0, 0, 1, 1},
    {&__pyx_n_s_set_up_pv_data, __pyx_k_set_up_pv_data, sizeof(__pyx_k_set_up_pv_data), 0, 0, 1, 1},
    {&__pyx_n_s_set_up_xcoeffs, __pyx_k_set_up_xcoeffs, sizeof(__pyx_k_set_up_xcoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_set_up_ycoeffs, __pyx_k_set_up_ycoeffs, sizeof(__pyx_k_set_up_ycoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
    {&__pyx_n_s_sign, __pyx_k_sign, sizeof(__pyx_k_sign), 0, 0, 1, 1},
    {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
    {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
    {&__pyx_n_u_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 1, 0, 1},
    {&__pyx_kp_u_size_fft, __pyx_k_size_fft, sizeof(__pyx_k_size_fft), 0, 1, 0, 0},
    {&__pyx_n_s_sndplay, __pyx_k_sndplay, sizeof(__pyx_k_sndplay), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_spectrum, __pyx_k_spectrum, sizeof(__pyx_k_spectrum), 0, 0, 1, 1},
    {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
    {&__pyx_n_s_square_wave, __pyx_k_square_wave, sizeof(__pyx_k_square_wave), 0, 0, 1, 1},
    {&__pyx_n_s_sr, __pyx_k_sr, sizeof(__pyx_k_sr), 0, 0, 1, 1},
    {&__pyx_n_s_sr_change, __pyx_k_sr_change, sizeof(__pyx_k_sr_change), 0, 0, 1, 1},
    {&__pyx_n_s_srate, __pyx_k_srate, sizeof(__pyx_k_srate), 0, 0, 1, 1},
    {&__pyx_n_u_srate, __pyx_k_srate, sizeof(__pyx_k_srate), 0, 1, 0, 1},
    {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
    {&__pyx_kp_s_src_pysndlib_clm_pyx, __pyx_k_src_pysndlib_clm_pyx, sizeof(__pyx_k_src_pysndlib_clm_pyx), 0, 0, 1, 0},
    {&__pyx_n_s_ssb_am, __pyx_k_ssb_am, sizeof(__pyx_k_ssb_am), 0, 0, 1, 1},
    {&__pyx_n_s_ssb_am_unmodulated, __pyx_k_ssb_am_unmodulated, sizeof(__pyx_k_ssb_am_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_stable, __pyx_k_stable, sizeof(__pyx_k_stable), 0, 0, 1, 1},
    {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
    {&__pyx_n_u_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1},
    {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
    {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
    {&__pyx_n_s_statistics, __pyx_k_statistics, sizeof(__pyx_k_statistics), 0, 0, 1, 1},
    {&__pyx_n_s_statstr, __pyx_k_statstr, sizeof(__pyx_k_statstr), 0, 0, 1, 1},
    {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
    {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
    {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
    {&__pyx_n_s_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 0, 1, 1},
    {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
    {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
    {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
    {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
    {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
    {&__pyx_n_s_subprocess, __pyx_k_subprocess, sizeof(__pyx_k_subprocess), 0, 0, 1, 1},
    {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
    {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
    {&__pyx_n_s_sweep, __pyx_k_sweep, sizeof(__pyx_k_sweep), 0, 0, 1, 1},
    {&__pyx_n_s_synthesize, __pyx_k_synthesize, sizeof(__pyx_k_synthesize), 0, 0, 1, 1},
    {&__pyx_n_s_synthesize_f, __pyx_k_synthesize_f, sizeof(__pyx_k_synthesize_f), 0, 0, 1, 1},
    {&__pyx_n_s_synthesizecallback, __pyx_k_synthesizecallback, sizeof(__pyx_k_synthesizecallback), 0, 0, 1, 1},
    {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
    {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
    {&__pyx_n_s_table_lookup, __pyx_k_table_lookup, sizeof(__pyx_k_table_lookup), 0, 0, 1, 1},
    {&__pyx_n_s_table_lookup_unmodulated, __pyx_k_table_lookup_unmodulated, sizeof(__pyx_k_table_lookup_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_table_size, __pyx_k_table_size, sizeof(__pyx_k_table_size), 0, 0, 1, 1},
    {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
    {&__pyx_n_s_tap, __pyx_k_tap, sizeof(__pyx_k_tap), 0, 0, 1, 1},
    {&__pyx_n_s_tap_unmodulated, __pyx_k_tap_unmodulated, sizeof(__pyx_k_tap_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_tcoeffs, __pyx_k_tcoeffs, sizeof(__pyx_k_tcoeffs), 0, 0, 1, 1},
    {&__pyx_kp_u_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 1, 0, 0},
    {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_kp_u_test_aif, __pyx_k_test_aif, sizeof(__pyx_k_test_aif), 0, 1, 0, 0},
    {&__pyx_kp_u_test_rev, __pyx_k_test_rev, sizeof(__pyx_k_test_rev), 0, 1, 0, 0},
    {&__pyx_kp_u_test_wav, __pyx_k_test_wav, sizeof(__pyx_k_test_wav), 0, 1, 0, 0},
    {&__pyx_kp_u_this_class_cannot_be_instantiate, __pyx_k_this_class_cannot_be_instantiate, sizeof(__pyx_k_this_class_cannot_be_instantiate), 0, 1, 0, 0},
    {&__pyx_kp_s_this_is_general_class_to_raise, __pyx_k_this_is_general_class_to_raise, sizeof(__pyx_k_this_is_general_class_to_raise), 0, 0, 1, 0},
    {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
    {&__pyx_n_s_tic, __pyx_k_tic, sizeof(__pyx_k_tic), 0, 0, 1, 1},
    {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
    {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
    {&__pyx_n_s_times_view, __pyx_k_times_view, sizeof(__pyx_k_times_view), 0, 0, 1, 1},
    {&__pyx_n_s_to_partials, __pyx_k_to_partials, sizeof(__pyx_k_to_partials), 0, 0, 1, 1},
    {&__pyx_n_s_toc, __pyx_k_toc, sizeof(__pyx_k_toc), 0, 0, 1, 1},
    {&__pyx_n_s_triangle_wave, __pyx_k_triangle_wave, sizeof(__pyx_k_triangle_wave), 0, 0, 1, 1},
    {&__pyx_n_s_triangle_wave_unmodulated, __pyx_k_triangle_wave_unmodulated, sizeof(__pyx_k_triangle_wave_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_two_pole, __pyx_k_two_pole, sizeof(__pyx_k_two_pole), 0, 0, 1, 1},
    {&__pyx_n_s_two_zero, __pyx_k_two_zero, sizeof(__pyx_k_two_zero), 0, 0, 1, 1},
    {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
    {&__pyx_kp_s_types_of_normalizations_when_us, __pyx_k_types_of_normalizations_when_us, sizeof(__pyx_k_types_of_normalizations_when_us), 0, 0, 1, 0},
    {&__pyx_n_s_ucoeffs, __pyx_k_ucoeffs, sizeof(__pyx_k_ucoeffs), 0, 0, 1, 1},
    {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
    {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
    {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
    {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
    {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
    {&__pyx_kp_s_used_for_polynomial_based_gens, __pyx_k_used_for_polynomial_based_gens, sizeof(__pyx_k_used_for_polynomial_based_gens), 0, 0, 1, 0},
    {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
    {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
    {&__pyx_n_s_validate_envelope, __pyx_k_validate_envelope, sizeof(__pyx_k_validate_envelope), 0, 0, 1, 1},
    {&__pyx_n_s_validate_envelope_locals_genexpr, __pyx_k_validate_envelope_locals_genexpr, sizeof(__pyx_k_validate_envelope_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 0, 0, 1, 1},
    {&__pyx_n_s_vals_view, __pyx_k_vals_view, sizeof(__pyx_k_vals_view), 0, 0, 1, 1},
    {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
    {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
    {&__pyx_kp_s_various_interpolation_types, __pyx_k_various_interpolation_types, sizeof(__pyx_k_various_interpolation_types), 0, 0, 1, 0},
    {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
    {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
    {&__pyx_kp_u_vs, __pyx_k_vs, sizeof(__pyx_k_vs), 0, 1, 0, 0},
    {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
    {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
    {&__pyx_n_s_wave, __pyx_k_wave, sizeof(__pyx_k_wave), 0, 0, 1, 1},
    {&__pyx_n_s_wave_train, __pyx_k_wave_train, sizeof(__pyx_k_wave_train), 0, 0, 1, 1},
    {&__pyx_n_s_wave_train_unmodulated, __pyx_k_wave_train_unmodulated, sizeof(__pyx_k_wave_train_unmodulated), 0, 0, 1, 1},
    {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
    {&__pyx_n_u_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 1, 0, 1},
    {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1},
    {&__pyx_n_s_window_type, __pyx_k_window_type, sizeof(__pyx_k_window_type), 0, 0, 1, 1},
    {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
    {&__pyx_n_s_wraps, __pyx_k_wraps, sizeof(__pyx_k_wraps), 0, 0, 1, 1},
    {&__pyx_kp_u_writing_to, __pyx_k_writing_to, sizeof(__pyx_k_writing_to), 0, 1, 0, 0},
    {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
    {&__pyx_kp_u_x_values_of_envelope_must_be_inc, __pyx_k_x_values_of_envelope_must_be_inc, sizeof(__pyx_k_x_values_of_envelope_must_be_inc), 0, 1, 0, 0},
    {&__pyx_n_s_xcoeffs, __pyx_k_xcoeffs, sizeof(__pyx_k_xcoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
    {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1},
    {&__pyx_n_s_ycoeffs, __pyx_k_ycoeffs, sizeof(__pyx_k_ycoeffs), 0, 0, 1, 1},
    {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
    {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 87, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 113, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 128, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 567, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 588, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 942, __pyx_L1_error)
  __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1086, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) __PYX_ERR(0, 3181, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 3187, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 3305, __pyx_L1_error)
  __pyx_builtin_input = __Pyx_GetBuiltinName(__pyx_n_s_input); if (!__pyx_builtin_input) __PYX_ERR(0, 3883, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 139, __pyx_L1_error)
  __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe3b0c44, 0xda39a3e, 0xd41d8cd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe3b0c44, 0xda39a3e, 0xd41d8cd) = ())" % __pyx_checksum
 */
  __pyx_tuple__4 = PyTuple_Pack(3, __pyx_int_238750788, __pyx_int_228825662, __pyx_int_222419149); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "View.MemoryView":582
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
  __pyx_tuple__6 = PyTuple_New(1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__6, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "View.MemoryView":679
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
 */
  __pyx_slice__7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(1, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__7);
  __Pyx_GIVEREF(__pyx_slice__7);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
 */
  __pyx_tuple__10 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":984
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "../../../../../private/var/folders/kx/gw6dssyn19d9qjs9mvh4hkz80000gn/T/build-env-ztoci14v/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":990
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "pysndlib/clm.pyx":178
 *         # prevent accidental instantiation from normal python code
 *         # since we cannot pass a struct pointer into a python constructor.
 *         raise TypeError("this class cannot be instantiated directly.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_this_class_cannot_be_instantiate); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pysndlib/clm.pyx":918
 *                 subprocess.run([default.player,self.output])
 *             else:
 *                 raise RuntimeError("no player specified")             # <<<<<<<<<<<<<<
 *         # need some safety if errors
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_no_player_specified); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "pysndlib/clm.pyx":941
 * cpdef np.ndarray to_partials(harms):
 *     if isinstance(harms, list):
 *         p = harms[::2]             # <<<<<<<<<<<<<<
 *         maxpartial = max(p)
 *         partials = np.zeros(int(maxpartial)+1, dtype=np.double)
 */
  __pyx_slice__21 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);

  /* "pysndlib/clm.pyx":1082
 *     # is env even number length
 *     if len(e) < 2:
 *         raise RuntimeError("a valid envelope needs at least 2 elements")             # <<<<<<<<<<<<<<
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_a_valid_envelope_needs_at_least); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pysndlib/clm.pyx":1084
 *         raise RuntimeError("a valid envelope needs at least 2 elements")
 *     if len(e) % 2 != 0:
 *         raise RuntimeError("a valid envelope needs even number of elements. This has {len(e)}")             # <<<<<<<<<<<<<<
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_a_valid_envelope_needs_even_numb); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "pysndlib/clm.pyx":1087
 *     if isinstance(e, list):
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")             # <<<<<<<<<<<<<<
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 *         raise RuntimeError("x values of envelope must be increasing")
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_a_valid_envelope_can_only_contai); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "pysndlib/clm.pyx":1088
 *         if all([isinstance(i, int | float) for i in e]):
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("x values of envelope must be increasing")
 * 
 */
  __pyx_slice__25 = PySlice_New(__pyx_int_2, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "pysndlib/clm.pyx":1089
 *             raise RuntimeError("a valid envelope can only contain numbers.")
 *     if not all(i < j for i, j in zip(e[: : 2], e[2: : 2])):
 *         raise RuntimeError("x values of envelope must be increasing")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_x_values_of_envelope_must_be_inc); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "pysndlib/clm.pyx":1911
 *     p = partials_arr[::2]
 * 
 *     v = partials_arr[1::2]             # <<<<<<<<<<<<<<
 * 
 *     v_normalized = v / v.sum()
 */
  __pyx_slice__30 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__30);
  __Pyx_GIVEREF(__pyx_slice__30);

  /* "pysndlib/clm.pyx":1915
 *     v_normalized = v / v.sum()
 *     result = np.empty((p.size + v.size), dtype=np.double)
 *     result[0::2] = p             # <<<<<<<<<<<<<<
 *     result[1::2] = v_normalized
 * 
 */
  __pyx_slice__31 = PySlice_New(__pyx_int_0, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 1915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__31);
  __Pyx_GIVEREF(__pyx_slice__31);

  /* "pysndlib/clm.pyx":3182
 *         return mus_any.from_ptr(cclm.mus_make_two_pole_from_frequency_and_radius(frequency, radius))
 *     elif any((frequency, radius)):
 *         raise RuntimeError("If not specifying coeffs, must provide frequency and radius. got frequency: {frequency}, radius: {radius}")             # <<<<<<<<<<<<<<
 *     else:
 *         if all((a0,b1,b2)):
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_If_not_specifying_coeffs_must_pr); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 3182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "pysndlib/clm.pyx":3308
 * 
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a formant.')             # <<<<<<<<<<<<<<
 * 
 *     cdef double [:] amps_view = None
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_filter_list_contains_at_least_on); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "pysndlib/clm.pyx":3867
 *     p = list(map(is_formant, fcombs))
 *     if not all(p):
 *         raise TypeError(f'filter list contains at least one element that is not a filtered_comb.')             # <<<<<<<<<<<<<<
 * 
 *     fcomb_array = mus_any_array.from_pylist(fcombs)
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_filter_list_contains_at_least_on_2); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 3867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "pysndlib/clm.pyx":4061
 *     p = list(map(is_all_pass, all_passes))
 *     if not all(p):
 *         raise TypeError(f'allpass list contains at least one element that is not a all_pass.')             # <<<<<<<<<<<<<<
 * 
 *     all_passes_array = mus_any_array.from_pylist(all_passes)
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_allpass_list_contains_at_least_o); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "pysndlib/clm.pyx":4589
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_d); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_inp_f, 4589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 4589, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4682
 * 
 *     #if isinstance(inp,types.FunctionType):
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_inp_f, 4682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 4682, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4757
 *         raise TypeError(f"input needs to be a clm gen or function not a {type(inp)}")
 * 
 *     @_inputcallback             # <<<<<<<<<<<<<<
 *     def inp_f(gen, d):
 *         return inp(d)
 */
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_inp_f, 4757, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 4757, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4769
 *         return res
 * 
 *     @_editcallback             # <<<<<<<<<<<<<<
 *     def edit_f(gen):
 *         return edit(res)
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_gen); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 4769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_edit_f, 4769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 4769, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4859
 * 
 *     elif callable(inp):
 *         @_inputcallback             # <<<<<<<<<<<<<<
 *         def inp_f(gen, d):
 *             return inp(d)
 */
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_inp_f, 4859, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 4859, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4871
 * 
 *     if(edit is not None):
 *         @_editcallback             # <<<<<<<<<<<<<<
 *         def edit_f(gen):
 *             return edit(res)
 */
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_edit_f, 4871, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 4871, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4879
 * 
 *     if (analyze is not None):
 *         @_analyzecallback             # <<<<<<<<<<<<<<
 *         def analyze_f(gen, func):
 *             return analyze(res, inp)
 */
  __pyx_tuple__58 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_func); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_analyze_f, 4879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 4879, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4887
 * 
 *     if (synthesize is not None):
 *         @_synthesizecallback             # <<<<<<<<<<<<<<
 *         def synthesize_f(gen):
 *             return synthesize(res)
 */
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_synthesize_f, 4887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 4887, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5260
 *         temp_file = tempfile.gettempdir() + '/' + 'temp-' + outputfile
 *         cclm.mus_convolve_files(file1, file2, maxamp, temp_file)
 *         with Sound(outputfile, header_type=header_type, sample_type=sample_type):             # <<<<<<<<<<<<<<
 *             length = seconds2samples(csndlib.mus_sound_duration(temp_file))
 *             reader = make_readin(temp_file)
 */
  __pyx_tuple__63 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 5260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "pysndlib/clm.pyx":5513
 *     length = get_length(arr)
 *     if loop:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */
  __pyx_tuple__64 = PyTuple_Pack(2, __pyx_n_s_direction, __pyx_n_s_v); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 5513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_reader, 5513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 5513, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5521
 * 
 *     else:
 *         def reader(direction):             # <<<<<<<<<<<<<<
 *             nonlocal ind
 *             v = arr[chan][ind]
 */
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_reader, 5521, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 5521, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5534
 * #decorator for reverbs.
 * def clm_reverb(func):
 *     @functools.wraps(func)             # <<<<<<<<<<<<<<
 *     def call(*args, **kwargs):
 *         return functools.partial(func,*args, **kwargs)
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 5534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_call, 5534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 5534, __pyx_L1_error)

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb0d31f2, 0x2f51b3c, 0xdd47448):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xb0d31f2, 0x2f51b3c, 0xdd47448) = (_arr, _chan, _direction, _length, _location, _start, _val))" % __pyx_checksum
 */
  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_int_185414130, __pyx_int_49617724, __pyx_int_232027208); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__71 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)
 */
  __pyx_tuple__73 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "EnumBase":28
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */
  __pyx_tuple__75 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_value, __pyx_n_s_name, __pyx_n_s_v, __pyx_n_s_res); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_new, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(1, 28, __pyx_L1_error)
  __pyx_tuple__77 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "EnumBase":39
 *         cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_repr, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(1, 39, __pyx_L1_error)

  /* "EnumBase":41
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_str, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(1, 41, __pyx_L1_error)

  /* "EnumBase":49
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_new, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(1, 49, __pyx_L1_error)

  /* "EnumBase":62
 *             cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_repr, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(1, 62, __pyx_L1_error)

  /* "EnumBase":64
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_str, 64, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(1, 64, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle___Pyx_EnumMeta(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__84 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "View.MemoryView":100
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:
 *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 *     else:
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_tuple__87 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(1, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "View.MemoryView":101
 * try:
 *     if __import__("sys").version_info >= (3, 3):
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
 *     else:
 *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "View.MemoryView":103
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 *     else:
 *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
 * except:
 * 
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "View.MemoryView":309
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "View.MemoryView":310
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "View.MemoryView":311
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "View.MemoryView":314
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "View.MemoryView":315
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "pysndlib/clm.pyx":49
 * DEFAULT_FILE_PLAYER = None
 * 
 * if sys.platform.startswith("darwin"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'afplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_u_darwin); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "pysndlib/clm.pyx":55
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 * 
 * if sys.platform.startswith("linux"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'aplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_u_linux); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "pysndlib/clm.pyx":86
 * 
 * 
 * if os.path.exists(os.path.expanduser('~/.pysndlib')):             # <<<<<<<<<<<<<<
 *     exec(open(os.path.expanduser('~/.pysndlib')).read())
 * 
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_pysndlib); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "pysndlib/clm.pyx":106
 *     """
 * 
 *     def ___init___(self, message):             # <<<<<<<<<<<<<<
 *         super().__init__(self.message)
 * 
 */
  __pyx_tuple__99 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_init_2, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 106, __pyx_L1_error)

  /* "pysndlib/clm.pyx":111
 * 
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):             # <<<<<<<<<<<<<<
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 */
  __pyx_tuple__101 = PyTuple_Pack(2, __pyx_n_s_arr, __pyx_n_s_dim); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_check_ndim, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 111, __pyx_L1_error)
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "pysndlib/clm.pyx":115
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):             # <<<<<<<<<<<<<<
 *     if x is None:
 *         return
 */
  __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_s_arg, __pyx_n_s_x, __pyx_n_s_low, __pyx_n_s_high); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_check_range, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 115, __pyx_L1_error)
  __pyx_tuple__106 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "pysndlib/clm.pyx":126
 * 
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):             # <<<<<<<<<<<<<<
 *     if arr1.shape != arr2.shape:
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 */
  __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_arr1, __pyx_n_s_arr2); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_compare_shapes, 126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 126, __pyx_L1_error)

  /* "pysndlib/clm.pyx":212
 *         return wrapper
 * 
 *     cpdef cache_append(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_cache_append, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 212, __pyx_L1_error)

  /* "pysndlib/clm.pyx":218
 *         self._cache.append(obj)
 * 
 *     cpdef cache_extend(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_cache_extend, 218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 218, __pyx_L1_error)

  /* "pysndlib/clm.pyx":226
 *     # this stuff with view.array is to work around an apparent bug when automatic string handling is turned on
 *     # https://github.com/cython/cython/issues/4521
 *     cpdef set_up_data(self , cython.int length=0):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_length); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_set_up_data, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "pysndlib/clm.pyx":245
 *             self._data = None
 * 
 *     cpdef set_up_xcoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_set_up_xcoeffs, 245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 245, __pyx_L1_error)

  /* "pysndlib/clm.pyx":272
 *             self._xcoeffs = np.asarray(arr)
 * 
 *     cpdef set_up_ycoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_set_up_ycoeffs, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 272, __pyx_L1_error)

  /* "pysndlib/clm.pyx":300
 * 
 * 
 *     cpdef set_up_pv_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_set_up_pv_data, 300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 300, __pyx_L1_error)

  /* "pysndlib/clm.pyx":342
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 *     cpdef mus_reset(self):             # <<<<<<<<<<<<<<
 *         cclm.mus_reset(self._ptr)
 * 
 */
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_reset, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 342, __pyx_L1_error)

  /* "pysndlib/clm.pyx":345
 *         cclm.mus_reset(self._ptr)
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */
  __pyx_tuple__119 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arg1, __pyx_n_s_arg2); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_next, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 345, __pyx_L1_error)
  __pyx_tuple__121 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pysndlib/clm.pyx":614
 * 
 * # --------------- file2ndarray, ndarray2file ---------------- #
 * cpdef file2ndarray(str filename, channel=None, beg=None, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an ndarray with samples from file and the sample rate of the data
 */
  __pyx_tuple__126 = PyTuple_Pack(4, __pyx_n_s_filename, __pyx_n_s_channel, __pyx_n_s_beg, __pyx_n_s_size); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_file2ndarray_2, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 614, __pyx_L1_error)

  /* "pysndlib/clm.pyx":644
 *     return out, sr
 * 
 * cpdef ndarray2file(str filename, np.ndarray arr, size=None, sr=None, sample_type=None, header_type=None, comment=None ):             # <<<<<<<<<<<<<<
 *     """
 *     write an ndarray of samples to file
 */
  __pyx_tuple__128 = PyTuple_Pack(7, __pyx_n_s_filename, __pyx_n_s_arr, __pyx_n_s_size, __pyx_n_s_sr, __pyx_n_s_sample_type, __pyx_n_s_header_type, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ndarray2file, 644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_tuple__130 = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "pysndlib/clm.pyx":698
 * 
 * # --------------- with sound context manager ---------------- #
 * class Sound(object):             # <<<<<<<<<<<<<<
 *     """
 *     context manager which handles creating output and other options
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "pysndlib/clm.pyx":722
 *     """
 * 
 *     def __init__(self, output=None,             # <<<<<<<<<<<<<<
 *                         channels=None,
 *                         srate=None,
 */
  __pyx_tuple__133 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_output, __pyx_n_s_channels, __pyx_n_s_srate, __pyx_n_s_sample_type, __pyx_n_s_header_type, __pyx_n_s_comment, __pyx_n_s_verbose, __pyx_n_s_reverb, __pyx_n_s_revfile, __pyx_n_s_reverb_data, __pyx_n_s_reverb_channels, __pyx_n_s_continue_old_file, __pyx_n_s_statistics, __pyx_n_s_scaled_to, __pyx_n_s_scaled_by, __pyx_n_s_play, __pyx_n_s_clipped, __pyx_n_s_finalize); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(19, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_init, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_tuple__135 = PyTuple_Pack(18, Py_None, Py_None, Py_None, Py_None, Py_None, ((PyObject *)Py_False), ((PyObject *)Py_False), Py_None, Py_None, Py_None, Py_None, ((PyObject *)Py_False), Py_None, ((PyObject *)Py_False), ((PyObject *)Py_False), Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "pysndlib/clm.pyx":762
 *         self.finalize = finalize
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 */
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_enter, 762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 762, __pyx_L1_error)

  /* "pysndlib/clm.pyx":802
 *         return self
 * 
 *     def __exit__(self, *args):             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None
 */
  __pyx_tuple__138 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_vals_view, __pyx_n_s_times_view, __pyx_n_s_maxamp_result, __pyx_n_s_toc, __pyx_n_s_statstr, __pyx_n_s_chans, __pyx_n_s_vals, __pyx_n_s_times, __pyx_n_s_maxamp_2, __pyx_n_s_i, __pyx_n_s_mabs, __pyx_n_s_arr, __pyx_n_s__137); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_exit, 802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 802, __pyx_L1_error)

  /* "pysndlib/clm.pyx":928
 * 
 * 
 * cpdef is_list_or_ndarray(x):             # <<<<<<<<<<<<<<
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 */
  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_list_or_ndarray, 928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 928, __pyx_L1_error)

  /* "pysndlib/clm.pyx":931
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 * cpdef is_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return (((x) - 1) & (x)) == 0
 * 
 */
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_power_of_2, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 931, __pyx_L1_error)

  /* "pysndlib/clm.pyx":934
 *     return (((x) - 1) & (x)) == 0
 * 
 * cpdef next_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return 2**int(1 + (float(math.log(x + 1)) / math.log(2.0)))
 * 
 */
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_next_power_of_2, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 934, __pyx_L1_error)

  /* "pysndlib/clm.pyx":939
 * 
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):             # <<<<<<<<<<<<<<
 *     if isinstance(harms, list):
 *         p = harms[::2]
 */
  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_harms); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_to_partials, 939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 939, __pyx_L1_error)

  /* "pysndlib/clm.pyx":965
 * 
 * 
 * cpdef int mus_close(mus_any obj):             # <<<<<<<<<<<<<<
 *     return cclm.mus_close_file(obj._ptr)
 * 
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_close, 965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 965, __pyx_L1_error)

  /* "pysndlib/clm.pyx":968
 *     return cclm.mus_close_file(obj._ptr)
 * 
 * cpdef bint mus_is_output(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_is_output, 968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 968, __pyx_L1_error)

  /* "pysndlib/clm.pyx":974
 *     return cclm.mus_is_output(obj._ptr)
 * 
 * cpdef bint mus_is_input(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_is_input, 974, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 974, __pyx_L1_error)

  /* "pysndlib/clm.pyx":980
 *     return cclm.mus_is_input(obj._ptr)
 * 
 * cpdef mus_reset(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     set gen to default starting state
 */
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_reset, 980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 980, __pyx_L1_error)

  /* "pysndlib/clm.pyx":991
 * # --------------- length ---------------- #
 * 
 * cpdef cython.long get_length(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 */
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_get_length, 991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 991, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1019
 * # --------------- channels ---------------- #
 * 
 * cpdef cython.long get_channels(obj):             # <<<<<<<<<<<<<<
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):
 */
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_get_channels, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1019, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1042
 * 
 * 
 * cpdef cython.double get_srate(obj=None):             # <<<<<<<<<<<<<<
 *     """Return current sample rate"""
 *     if obj is None:
 */
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_get_srate, 1042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1042, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1051
 * # --------------- framples ---------------- #
 * 
 * cpdef cython.long get_framples(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):
 */
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_get_framples, 1051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1051, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1074
 * # --------------- clm random ---------------- #
 * 
 * cpdef cython.double random(cython.double x=1.0):             # <<<<<<<<<<<<<<
 *     """Returns random number +- x"""
 *     return cclm.mus_random(x)
 */
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_random, 1074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "pysndlib/clm.pyx":1079
 * # --------------- just some extra utils ---------------- #
 * 
 * def validate_envelope(e):             # <<<<<<<<<<<<<<
 *     # is env even number length
 *     if len(e) < 2:
 */
  __pyx_tuple__157 = PyTuple_Pack(4, __pyx_n_s_e, __pyx_n_s_i, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_validate_envelope, 1079, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 1079, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1092
 * 
 * 
 * cpdef bint is_zero(cython.double x):             # <<<<<<<<<<<<<<
 *     return x == 0
 * 
 */
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_zero, 1092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 1092, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1095
 *     return x == 0
 * 
 * cpdef bint is_number(n):             # <<<<<<<<<<<<<<
 *     return type(n) == int or type(n) == float
 * 
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_n); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_number, 1095, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 1095, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1098
 *     return type(n) == int or type(n) == float
 * 
 * cpdef bint is_odd(n):             # <<<<<<<<<<<<<<
 *     return n % 2 == 0
 * 
 */
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_odd, 1098, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1098, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1101
 *     return n % 2 == 0
 * 
 * cpdef bint is_even(n):             # <<<<<<<<<<<<<<
 *     return n % 2 != 0
 * 
 */
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_even, 1101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 1101, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1106
 * # # --------------- clm utility functions ---------------- #
 * #
 * cpdef cython.double radians2hz(cython.double radians ):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians per sample to frequency:  `hz = rads * srate / (2 * pi)`.
 */
  __pyx_tuple__164 = PyTuple_Pack(1, __pyx_n_s_radians); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_radians2hz, 1106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1106, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1116
 *     return cclm.mus_radians_to_hz(radians)
 * 
 * cpdef cython.double hz2radians(cython.double hz):             # <<<<<<<<<<<<<<
 *     """
 *     convert frequency in hz to radians per sample:  `hz * 2 * pi / srate`.
 */
  __pyx_tuple__166 = PyTuple_Pack(1, __pyx_n_s_hz); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_hz2radians, 1116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 1116, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1126
 *     return cclm.mus_hz_to_radians(hz)
 * 
 * cpdef cython.double degrees2radians(cython.double degrees):             # <<<<<<<<<<<<<<
 *     """
 *     convert degrees to radians:  `degrees * 2 * pi / 360`.
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_n_s_degrees); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_degrees2radians, 1126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 1126, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1137
 *     return cclm.mus_degrees_to_radians(degrees)
 * 
 * cpdef cython.double radians2degrees(cython.double radians):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians to degrees: `rads * 360 / (2 * pi)`.
 */
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_radians2degrees, 1137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1137, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1149
 *     return cclm.mus_radians_to_degrees(radians)
 * 
 * cpdef cython.double db2linear(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert decibel value db to linear value: `pow(10, db / 20)`.
 */
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_db2linear, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 1149, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1161
 *     return cclm.mus_db_to_linear(x)
 * 
 * cpdef cython.double linear2db(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert linear value to decibels 20 * log10(lin).
 */
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_linear2db, 1161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 1161, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1173
 *     return cclm.mus_linear_to_db(x)
 * 
 * cpdef cython.double odd_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest odd integer to x.
 */
  __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_odd_multiple, 1173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1173, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1186
 *     return cclm.mus_odd_multiple(x,y)
 * 
 * cpdef cython.double even_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest even integer to x.
 */
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_even_multiple, 1186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 1186, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1198
 *     return cclm.mus_even_multiple(x,y)
 * 
 * cpdef cython.double odd_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is even) and 1.0 (x is odd).
 */
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_odd_weight, 1198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 1198, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1210
 *     return cclm.mus_odd_weight(x)
 * 
 * cpdef cython.double even_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is odd) and 1.0 (x is even).
 */
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_even_weight, 1210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 1210, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1231
 * #     return cclm.mus_srate()
 * 
 * cpdef cython.double set_srate(cython.double r):             # <<<<<<<<<<<<<<
 *     """
 *     set current sample rate.
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_r); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_set_srate, 1231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 1231, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1237
 *     return cclm.mus_set_srate(r)
 * 
 * cpdef cython.long seconds2samples(cython.double secs):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert seconds to samples.
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_secs); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_seconds2samples, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 1237, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1247
 *     return cclm.mus_seconds_to_samples(secs)
 * 
 * cpdef cython.double samples2seconds(cython.long samples):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert samples to seconds.
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_samples_2); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_samples2seconds, 1247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 1247, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1258
 *     return cclm.mus_samples_to_seconds(samples)
 * 
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2):             # <<<<<<<<<<<<<<
 *     """
 *     return s1 * s2 (sample by sample multiply).
 */
  __pyx_tuple__184 = PyTuple_Pack(2, __pyx_n_s_s1, __pyx_n_s_s2); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ring_modulate, 1258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 1258, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1271
 *     return cclm.mus_ring_modulate(s1, s2)
 * 
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3):             # <<<<<<<<<<<<<<
 *     """
 *     carrier in1 in2): in1 * (carrier + in2).
 */
  __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_s3); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_amplitude_modulate, 1271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 1271, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1284
 *     return cclm.mus_amplitude_modulate(s1, s2, s3)
 * 
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index= 1.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     returns insig (index 1.0)): sin(sig * pi / 2 + fm_index * sin(sig * 2 * pi))
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_insig, __pyx_n_s_fm_index); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_contrast_enhancement, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "pysndlib/clm.pyx":1298
 * 
 * 
 * cpdef cython.double dot_product(np.ndarray data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     returns v1 v2 (size)): sum of v1[i] * v2[i] (also named scalar product).
 */
  __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_data1, __pyx_n_s_data2); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_dot_product, 1298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 1298, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1317
 * 
 * # changed 11-26-23 to not modify inplace
 * cpdef cython.double polynomial(np.ndarray coeffs, cython.double x ):             # <<<<<<<<<<<<<<
 *     """
 *     evaluate a polynomial at x.  coeffs are in order of degree, so coeff[0] is the constant term.
 */
  __pyx_tuple__193 = PyTuple_Pack(2, __pyx_n_s_coeffs, __pyx_n_s_x); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polynomial, 1317, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 1317, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1331
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 * 
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x):             # <<<<<<<<<<<<<<
 *     """
 *     taking into account wrap-around (size is size of data), with linear interpolation if phase is not an integer.
 */
  __pyx_tuple__195 = PyTuple_Pack(2, __pyx_n_s_fn, __pyx_n_s_x); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_array_interp, 1331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 1331, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1345
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 * 
 * cpdef cython.double bessi0(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     bessel function of zeroth order
 */
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bessi0, 1345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 1345, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1351
 *     return cclm.mus_bessi0(x)
 * 
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =0.):             # <<<<<<<<<<<<<<
 *     """
 *     interpolate in data ('table' is a ndarray) using interpolation 'type', such as Interp.linear.
 */
  __pyx_tuple__198 = PyTuple_Pack(4, __pyx_n_s_interp_type, __pyx_n_s_x, __pyx_n_s_table, __pyx_n_s_y1); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_interpolate, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_tuple__200 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "pysndlib/clm.pyx":1366
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 * 
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=0.0 , cython.double alpha=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     fft data window (a ndarray). type is one of the sndlib fft window identifiers such as
 */
  __pyx_tuple__201 = PyTuple_Pack(4, __pyx_n_s_window_type, __pyx_n_s_size, __pyx_n_s_beta, __pyx_n_s_alpha); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_fft_window, 1366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __pyx_tuple__203 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "pysndlib/clm.pyx":1386
 *     return win
 * 
 * cpdef np.ndarray mus_fft(np.ndarray rdat, np.ndarray  idat, cython.int fft_size , cython.int sign):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */
  __pyx_tuple__204 = PyTuple_Pack(4, __pyx_n_s_rdat, __pyx_n_s_idat, __pyx_n_s_fft_size, __pyx_n_s_sign); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_fft, 1386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1386, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1409
 * 
 * 
 * cpdef np.ndarray fft(np.ndarray rdat, np.ndarray idat,  cython.int fft_size, cython.int sign ):             # <<<<<<<<<<<<<<
 *     """
 *     return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_fft, 1409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 1409, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1436
 * 
 * 
 * cpdef np.ndarray mus_rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in s rl and im from rectangular form (fft output) to polar form (a
 */
  __pyx_tuple__207 = PyTuple_Pack(2, __pyx_n_s_rdat, __pyx_n_s_idat); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_rectangular2polar, 1436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 1436, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1458
 *     return rdat
 * 
 * cpdef tuple rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rdat and idat from rectangular form (fft output) to polar form (a
 */
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rectangular2polar, 1458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1458, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1483
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_rectangular2magnitudes, 1483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 1483, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1503
 *     return rdat
 * 
 * cpdef tuple rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rectangular2magnitudes, 1503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1503, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1526
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_polar2rectangular( np.ndarray rdat,  np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_polar2rectangular, 1526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 1526, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1545
 * 
 * 
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polar2rectangular, 1545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1545, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1568
 * 
 * 
 * cpdef np.ndarray mus_spectrum(np.ndarray  rdat, np.ndarray   idat, np.ndarray  window, Spectrum norm_type= Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */
  __pyx_tuple__214 = PyTuple_Pack(4, __pyx_n_s_rdat, __pyx_n_s_idat, __pyx_n_s_window, __pyx_n_s_norm_type); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_spectrum, 1568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1568, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1602
 * 
 * 
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray  idat,np.ndarray window, Spectrum norm_type=Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_spectrum, 1602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 1602, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1637
 * 
 * 
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */
  __pyx_tuple__217 = PyTuple_Pack(3, __pyx_n_s_rl1, __pyx_n_s_rl2, __pyx_n_s_fft_size); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_convolution, 1637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __pyx_tuple__219 = PyTuple_Pack(1, __pyx_int_512); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "pysndlib/clm.pyx":1660
 * 
 * 
 * cpdef np.ndarray convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_convolution, 1660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 1660, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1686
 *     return rl1_cpy
 * 
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     in place autocorrelation of data (a ndarray).
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_autocorrelate, 1686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 1686, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1703
 * 
 * 
 * cpdef np.ndarray autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     autocorrelation of data (a ndarray).
 */
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_autocorrelate, 1703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 1703, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1720
 *     return data_cpy
 * 
 * cpdef np.ndarray mus_correlate( np.ndarray  data1,  np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     in place cross-correlation of data1 and data2 (both ndarrays).
 */
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_correlate, 1720, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 1720, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1743
 * 
 * 
 * cpdef np.ndarray correlate(np.ndarray  data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     cross-correlation of data1 and data2 (both ndarrays).
 */
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_correlate, 1743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 1743, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1767
 *     return data1_cpy
 * 
 * cpdef np.ndarray mus_cepstrum( np.ndarray  data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_mus_cepstrum, 1767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 1767, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1781
 *     return data
 * 
 * cpdef np.ndarray cepstrum(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_cepstrum, 1781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1781, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1796
 *     return data_cpy
 * 
 * cpdef np.ndarray partials2wave(partials,  np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list or np.ndarray of partials (harmonic number and associated amplitude) and produce a
 */
  __pyx_tuple__228 = PyTuple_Pack(4, __pyx_n_s_partials, __pyx_n_s_wave, __pyx_n_s_table_size, __pyx_n_s_norm); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_partials2wave, 1796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __pyx_tuple__230 = PyTuple_Pack(3, Py_None, Py_None, Py_True); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "pysndlib/clm.pyx":1834
 *     return wave
 * 
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list of partials (harmonic number, amplitude, initial phase) and produce a waveform for use
 */
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_partials2wave, 1834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __pyx_tuple__232 = PyTuple_Pack(3, Py_None, Py_None, Py_True); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "pysndlib/clm.pyx":1868
 *     return wave
 * 
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 *     """
 *     returns a chebyshev polynomial suitable for use with the polynomial generator to create (via
 */
  __pyx_tuple__233 = PyTuple_Pack(2, __pyx_n_s_partials, __pyx_n_s_kind); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_partials2polynomial, 1868, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 1868, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1892
 * 
 * 
 * cpdef np.ndarray normalize_partials(partials):             # <<<<<<<<<<<<<<
 *     """
 *     scales the partial amplitudes in the list/array or list 'partials' by the inverse of their sum (so
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_n_s_partials); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_normalize_partials, 1892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 1892, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1921
 *     return result
 * 
 * cpdef cython.double chebyshev_tu_sum( cython.double x, tcoeffs, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn and un, with phase x
 */
  __pyx_tuple__237 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_tcoeffs, __pyx_n_s_ucoeffs); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_chebyshev_tu_sum, 1921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 1921, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1943
 * 
 * 
 * cpdef cython.double chebyshev_t_sum(cython.double x, tcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn
 */
  __pyx_tuple__239 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_tcoeffs); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_chebyshev_t_sum, 1943, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 1943, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1958
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])
 * 
 * cpdef cython.double chebyshev_u_sum(cython.double x, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials un
 */
  __pyx_tuple__241 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_ucoeffs); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_chebyshev_u_sum, 1958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 1958, __pyx_L1_error)

  /* "pysndlib/clm.pyx":1978
 * 
 * # ---------------- oscil ---------------- #
 * cpdef mus_any make_oscil(cython.double frequency=0.,cython.double  initial_phase = 0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil (sinewave) generator
 */
  __pyx_tuple__243 = PyTuple_Pack(2, __pyx_n_s_frequency, __pyx_n_s_initial_phase); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_oscil, 1978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __pyx_tuple__245 = PyTuple_Pack(2, __pyx_float_0_, __pyx_float_0_0); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "pysndlib/clm.pyx":1992
 * 
 * ## Changing to avoid None overhead. Think it slows thing s down even if mus_oscil_unmodulated can be used.
 * cpdef cython.double oscil(mus_any gen, cython.double fm=0.0, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen: val = sin(phase + pm); phase += (freq + fm)
 */
  __pyx_tuple__246 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_fm, __pyx_n_s_pm); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_oscil, 1992, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __pyx_tuple__248 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "pysndlib/clm.pyx":2004
 *     return cclm.mus_oscil(gen._ptr, fm, pm)
 * 
 * cpdef cython.double oscil_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen. no modulation
 */
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_oscil_unmodulated, 2004, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 2004, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2014
 *     return cclm.mus_oscil_unmodulated(gen._ptr)
 * 
 * cpdef bint is_oscil(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil
 */
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_oscil, 2014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 2014, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2026
 * # ---------------- oscil-bank ---------------- #
 * 
 * cpdef mus_any make_oscil_bank(freqs, phases, amps=None, bint stable=False):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil_bank generator. (freqs in radians)
 */
  __pyx_tuple__251 = PyTuple_Pack(4, __pyx_n_s_freqs, __pyx_n_s_phases, __pyx_n_s_amps, __pyx_n_s_stable); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_oscil_bank, 2026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __pyx_tuple__253 = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "pysndlib/clm.pyx":2065
 *     return gen
 * 
 * cpdef cython.double oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of oscils
 */
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_oscil_bank, 2065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 2065, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2074
 *     return cclm.mus_oscil_bank(gen._ptr)
 * 
 * cpdef bint is_oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil_bank
 */
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_oscil_bank, 2074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 2074, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2087
 * 
 * # ---------------- env ---------------- #
 * cpdef mus_any make_env(envelope, cython.double duration=1.0, cython.double scaler=1.0, cython.double offset=0.0, cython.double base=1.0, cython.int length=0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the
 */
  __pyx_tuple__256 = PyTuple_Pack(6, __pyx_n_s_envelope, __pyx_n_s_duration_2, __pyx_n_s_scaler, __pyx_n_s_offset, __pyx_n_s_base, __pyx_n_s_length); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_env, 2087, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __pyx_tuple__258 = PyTuple_Pack(5, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_0_0, __pyx_float_1_0, __pyx_int_0); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "pysndlib/clm.pyx":2122
 *     return gen
 * 
 * cpdef cython.double env(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_env, 2122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 2122, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2131
 *     return cclm.mus_env(gen._ptr)
 * 
 * cpdef bint is_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an env.
 */
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_env, 2131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 2131, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2140
 *     return cclm.mus_is_env(gen._ptr)
 * 
 * cpdef cython.double env_interp(cython.double x , mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */
  __pyx_tuple__261 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_env); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_env_interp, 2140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 2140, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2150
 *     return cclm.mus_env_interp(x, env._ptr)
 * 
 * cpdef cython.double envelope_interp(cython.double x ,  mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_envelope_interp, 2150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 2150, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2162
 * 
 * # #mus_env_rates
 * cpdef np.ndarray env_rates(gen: mus_any):             # <<<<<<<<<<<<<<
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 */
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_env_rates, 2162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 2162, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2174
 * # this is slow because of needing ctypes to define function at runtime
 * # but no other way to do it with cython without changing sndlib code
 * cpdef cython.double env_any(mus_any gen, connection_function):             # <<<<<<<<<<<<<<
 *     """
 *     generate env output using conncection_func to 'connect the dots'.
 */
  __pyx_tuple__265 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_connection_function); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_env_any, 2174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 2174, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2190
 * 
 * # ---------------- pulsed-env ---------------- #
 * cpdef mus_any make_pulsed_env(envelope, cython.double duration , cython.double frequency ):             # <<<<<<<<<<<<<<
 *     """
 *     produces a repeating envelope. env sticks at its last value, but pulsed-env repeats it over and over.
 */
  __pyx_tuple__267 = PyTuple_Pack(3, __pyx_n_s_envelope, __pyx_n_s_duration_2, __pyx_n_s_frequency); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_pulsed_env, 2190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 2190, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2215
 *     return gen
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */
  __pyx_tuple__269 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_fm); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_pulsed_env, 2215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __pyx_tuple__271 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);

  /* "pysndlib/clm.pyx":2225
 *     return cclm.mus_pulsed_env(gen._ptr, fm)
 * 
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator. no modulations
 */
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_pulsed_env_unmodulated, 2225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 2225, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2234
 *     return cclm.mus_pulsed_env_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulsed_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulsed_env.
 */
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_pulsed_env, 2234, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(0, 2234, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2246
 * 
 * # ---------------- table-lookup ---------------- #
 * cpdef mus_any make_table_lookup(cython.double frequency=0.0, cython.double initial_phase=0.0, wave= None, size=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator. the default table size is 512; use size to set some other
 */
  __pyx_tuple__274 = PyTuple_Pack(5, __pyx_n_s_frequency, __pyx_n_s_initial_phase, __pyx_n_s_wave, __pyx_n_s_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_table_lookup, 2246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 2246, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2279
 *     return gen
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator.
 */
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_table_lookup, 2279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __pyx_tuple__277 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "pysndlib/clm.pyx":2289
 *     return cclm.mus_table_lookup(gen._ptr, fm)
 * 
 * cpdef cython.double table_lookup_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator. unmodulated
 */
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_table_lookup_unmodulated, 2289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 2289, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2298
 *     return cclm.mus_table_lookup_unmodulated(gen._ptr)
 * 
 * cpdef bint is_table_lookup(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a table_lookup.
 */
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_table_lookup, 2298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 2298, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2308
 * 
 * 
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator with the envelope loaded \in with size.
 */
  __pyx_tuple__280 = PyTuple_Pack(3, __pyx_n_s_frequency, __pyx_n_s_envelope, __pyx_n_s_size); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_table_lookup_with_env, 2308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 2308, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2334
 * 
 * # ---------------- polywave ---------------- #
 * cpdef mus_any make_polywave(cython.double frequency,  partials = [0.,1.], Polynomial kind=Polynomial.FIRST_KIND, xcoeffs=None, ycoeffs=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is
 */
  __pyx_tuple__282 = PyTuple_Pack(5, __pyx_n_s_frequency, __pyx_n_s_partials, __pyx_n_s_kind, __pyx_n_s_xcoeffs, __pyx_n_s_ycoeffs); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);
  __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_polywave, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(0, 2334, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2394
 * 
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper.
 */
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polywave, 2394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __pyx_tuple__285 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "pysndlib/clm.pyx":2405
 * 
 * 
 * cpdef cython.double polywave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper. unmodulated
 */
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polywave_unmodulated, 2405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 2405, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2414
 *     return cclm.mus_polywave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_polywave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polywave.
 */
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_polywave, 2414, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 2414, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2427
 * # ---------------- polyshape ---------------- #
 * 
 * cpdef mus_any make_polyshape(cython.double frequency, cython.double initial_phase=0.0, coeffs = None, partials = [1.,1.], Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_tuple__288 = PyTuple_Pack(5, __pyx_n_s_frequency, __pyx_n_s_initial_phase, __pyx_n_s_coeffs, __pyx_n_s_partials, __pyx_n_s_kind); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_polyshape, 2427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 2427, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2460
 *     return gen
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=1.0, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper.
 */
  __pyx_tuple__290 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_index, __pyx_n_s_fm); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polyshape, 2460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __pyx_tuple__292 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "pysndlib/clm.pyx":2474
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)
 * 
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=1.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper. unmodulated
 */
  __pyx_tuple__293 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_index); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_polyshape_unmodulated, 2474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __pyx_tuple__295 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "pysndlib/clm.pyx":2485
 * 
 * 
 * cpdef bint is_polyshape(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polyshape.
 */
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_polyshape, 2485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 2485, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2496
 * 
 * # ---------------- triangle-wave ---------------- #
 * cpdef mus_any make_triangle_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new triangle_wave generator.
 */
  __pyx_tuple__297 = PyTuple_Pack(3, __pyx_n_s_frequency, __pyx_n_s_amplitude, __pyx_n_s_phase); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_triangle_wave, 2496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 2496, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2511
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator.
 */
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_triangle_wave, 2511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __pyx_tuple__300 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "pysndlib/clm.pyx":2522
 * 
 * 
 * cpdef cython.double triangle_wave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator. unmodulated
 */
  __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_triangle_wave_unmodulated, 2522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 2522, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2531
 *     return cclm.mus_triangle_wave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_triangle_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a triangle_wave.
 */
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_triangle_wave, 2531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(0, 2531, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2541
 * 
 * # ---------------- square-wave ---------------- #
 * cpdef mus_any make_square_wave(cython.double frequency , cython.double amplitude=1.0, cython.double phase=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new square_wave generator.
 */
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_square_wave, 2541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(0, 2541, __pyx_L1_error)
  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "pysndlib/clm.pyx":2555
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next square wave sample from generator.
 */
  __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_square_wave, 2555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __pyx_tuple__306 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "pysndlib/clm.pyx":2565
 *     return cclm.mus_square_wave(gen._ptr, fm)
 * 
 * cpdef bint is_square_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a square_wave.
 */
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_square_wave, 2565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 2565, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2575
 * 
 * # ---------------- sawtooth-wave ---------------- #
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sawtooth_wave generator.
 */
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_sawtooth_wave, 2575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 2575, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2590
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sawtooth wave sample from generator.
 */
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_sawtooth_wave, 2590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 2590, __pyx_L1_error)
  __pyx_tuple__310 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 2590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "pysndlib/clm.pyx":2601
 * 
 * 
 * cpdef bint is_sawtooth_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sawtooth_wave.
 */
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_sawtooth_wave, 2601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 2601, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2611
 * 
 * # ---------------- pulse-train ---------------- #
 * cpdef mus_any make_pulse_train(cython.double frequency=1.0, cython.double amplitude=1.0, cython.double phase=(np.pi*2)):             # <<<<<<<<<<<<<<
 *     """
 *     return a new pulse_train generator. this produces a sequence of impulses.
 */
  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_pulse_train, 2611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(0, 2611, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2626
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator.
 */
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_pulse_train, 2626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __pyx_tuple__314 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "pysndlib/clm.pyx":2637
 * 
 * 
 * cpdef cython.double pulse_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator. unmodulated
 */
  __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_pulse_train_unmodulated, 2637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(0, 2637, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2645
 *     return cclm.mus_pulse_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulse_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulse_train.
 */
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_pulse_train, 2645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(0, 2645, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2656
 * # ---------------- ncos ---------------- #
 * 
 * cpdef mus_any make_ncos(cython.double frequency, cython.int n=1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ncos generator, producing a sum of 'n' equal amplitude cosines.
 */
  __pyx_tuple__317 = PyTuple_Pack(2, __pyx_n_s_frequency, __pyx_n_s_n); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);
  __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_ncos, 2656, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(0, 2656, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2669
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an ncos generator.
 */
  __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ncos, 2669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __pyx_tuple__320 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "pysndlib/clm.pyx":2679
 *     return cclm.mus_ncos(gen._ptr, fm)
 * 
 * cpdef bint is_ncos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ncos.
 */
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_ncos, 2679, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 2679, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2690
 * 
 * # ---------------- nsin ---------------- #
 * cpdef mus_any make_nsin(cython.double frequency, cython.int n =1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nsin generator, producing a sum of 'n' equal amplitude sines.
 */
  __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_nsin, 2690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(0, 2690, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2705
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an nsin generator.
 */
  __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_nsin, 2705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __pyx_tuple__324 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "pysndlib/clm.pyx":2715
 *     return cclm.mus_nsin(gen._ptr, fm)
 * 
 * cpdef bint is_nsin(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nsin.
 */
  __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_nsin, 2715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 2715, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2726
 * # ---------------- nrxysin and nrxycos ---------------- #
 * 
 * cpdef mus_any make_nrxysin( cython.double frequency,  cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxysin generator.
 */
  __pyx_tuple__326 = PyTuple_Pack(4, __pyx_n_s_frequency, __pyx_n_s_ratio, __pyx_n_s_n, __pyx_n_s_r); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);
  __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_nrxysin, 2726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __pyx_tuple__328 = PyTuple_Pack(3, __pyx_float_1_, __pyx_int_1, __pyx_float__5); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "pysndlib/clm.pyx":2743
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxysin generator.
 */
  __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_nrxysin, 2743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "pysndlib/clm.pyx":2753
 *     return cclm.mus_nrxysin(gen._ptr, fm)
 * 
 * cpdef bint is_nrxysin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxysin.
 */
  __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_nrxysin, 2753, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 2753, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2763
 * 
 * 
 * cpdef mus_any make_nrxycos(cython.double frequency , cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxycos generator.
 */
  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_nrxycos, 2763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __pyx_tuple__333 = PyTuple_Pack(3, __pyx_float_1_, __pyx_int_1, __pyx_float__5); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "pysndlib/clm.pyx":2781
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxycos generator.
 */
  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_nrxycos, 2781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "pysndlib/clm.pyx":2791
 *     return cclm.mus_nrxycos(gen._ptr, fm)
 * 
 * cpdef bint is_nrxycos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxycos.
 */
  __pyx_codeobj__336 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_nrxycos, 2791, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__336)) __PYX_ERR(0, 2791, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2802
 * 
 * # ---------------- rxykcos and rxyksin ---------------- #
 * cpdef mus_any make_rxykcos(cython.double frequency, cython.double phase=0.0, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxykcos generator.
 */
  __pyx_tuple__337 = PyTuple_Pack(4, __pyx_n_s_frequency, __pyx_n_s_phase, __pyx_n_s_r, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);
  __pyx_codeobj__338 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_rxykcos, 2802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__338)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __pyx_tuple__339 = PyTuple_Pack(3, __pyx_float_0_0, __pyx_float__5, __pyx_float_1_); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "pysndlib/clm.pyx":2817
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxykcos generator.
 */
  __pyx_codeobj__340 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rxykcos, 2817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __pyx_tuple__341 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "pysndlib/clm.pyx":2827
 *     return cclm.mus_rxykcos(gen._ptr, fm)
 * 
 * cpdef bint is_rxykcos(gen: mus_any):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxykcos.
 */
  __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_rxykcos, 2827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(0, 2827, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2836
 *     return cclm.mus_is_rxykcos(gen._ptr)
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxyksin generator.
 */
  __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_rxyksin, 2836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __pyx_tuple__344 = PyTuple_Pack(2, __pyx_float__5, __pyx_float_1_); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "pysndlib/clm.pyx":2851
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxyksin generator.
 */
  __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rxyksin, 2851, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __pyx_tuple__346 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);

  /* "pysndlib/clm.pyx":2861
 *     return cclm.mus_rxyksin(gen._ptr, fm)
 * 
 * cpdef bint  is_rxyksin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxyksin.
 */
  __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_rxyksin, 2861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) __PYX_ERR(0, 2861, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2871
 * 
 * # ---------------- ssb-am ---------------- #
 * cpdef mus_any make_ssb_am(cython.double frequency, cython.int order=40):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ssb_am generator.
 */
  __pyx_tuple__348 = PyTuple_Pack(2, __pyx_n_s_frequency, __pyx_n_s_order); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_ssb_am, 2871, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_int_40); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "pysndlib/clm.pyx":2884
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig , cython.double  fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator.
 */
  __pyx_tuple__351 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_insig, __pyx_n_s_fm); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);
  __pyx_codeobj__352 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ssb_am, 2884, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__352)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __pyx_tuple__353 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "pysndlib/clm.pyx":2895
 * 
 * 
 * cpdef cython.double ssb_am_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator. unmodulated.
 */
  __pyx_tuple__354 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_insig); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);
  __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ssb_am_unmodulated, 2895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) __PYX_ERR(0, 2895, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2904
 *     return cclm.mus_ssb_am_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_ssb_am(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ssb_am.
 */
  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_ssb_am, 2904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(0, 2904, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2916
 * 
 * # ---------------- wave-train ----------------#
 * cpdef mus_any make_wave_train(cython.double frequency, wave=None, cython.double initial_phase=0., Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate
 */
  __pyx_tuple__357 = PyTuple_Pack(4, __pyx_n_s_frequency, __pyx_n_s_wave, __pyx_n_s_initial_phase, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);
  __pyx_codeobj__358 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_wave_train, 2916, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__358)) __PYX_ERR(0, 2916, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2939
 *     return gen
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train.
 */
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_wave_train, 2939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __pyx_tuple__360 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "pysndlib/clm.pyx":2950
 * 
 * 
 * cpdef cython.double wave_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train. unmodulated
 */
  __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_wave_train_unmodulated, 2950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 2950, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2959
 *     return cclm.mus_wave_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_wave_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a wave_train.
 */
  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_wave_train, 2959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(0, 2959, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2969
 * 
 * 
 * cpdef mus_any make_wave_train_with_env(cython.double frequency, envelope, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator with the envelope loaded \in with size.
 */
  __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_wave_train_with_env, 2969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(0, 2969, __pyx_L1_error)

  /* "pysndlib/clm.pyx":2993
 * 
 * # ---------------- rand, rand_interp ---------------- #
 * cpdef mus_any make_rand(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand generator, producing a sequence of random numbers (a step  function). frequency
 */
  __pyx_tuple__364 = PyTuple_Pack(3, __pyx_n_s_frequency, __pyx_n_s_amplitude, __pyx_n_s_distribution); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);
  __pyx_codeobj__365 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_rand, 2993, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__365)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __pyx_tuple__366 = PyTuple_Pack(2, __pyx_float_1_0, Py_None); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "pysndlib/clm.pyx":3016
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed.
 */
  __pyx_tuple__367 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_sweep); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rand, 3016, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __pyx_tuple__369 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "pysndlib/clm.pyx":3027
 *     return cclm.mus_rand(gen._ptr, sweep)
 * 
 * cpdef cython.double rand_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed. unmodulated
 */
  __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rand_unmodulated, 3027, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(0, 3027, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3037
 *     return cclm.mus_rand_unmodulated(gen._ptr)
 * 
 * cpdef bint is_rand(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand.
 */
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_rand, 3037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 3037, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3046
 *     return cclm.mus_is_rand(gen._ptr)
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand_interp generator, producing linearly interpolated random numbers. frequency is
 */
  __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_rand_interp, 3046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __pyx_tuple__373 = PyTuple_Pack(2, __pyx_float_1_0, Py_None); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);

  /* "pysndlib/clm.pyx":3069
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=0.):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */
  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rand_interp, 3069, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __pyx_tuple__375 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);

  /* "pysndlib/clm.pyx":3080
 *     return cclm.mus_rand_interp(gen._ptr, sweep)
 * 
 * cpdef rand_interp_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */
  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_rand_interp_unmodulated, 3080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 3080, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3091
 * 
 * 
 * cpdef bint is_rand_interp(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand_interp.
 */
  __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_rand_interp, 3091, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__377)) __PYX_ERR(0, 3091, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3101
 * 
 * # ---------------- simple filters ---------------- #
 * cpdef mus_any make_one_pole(cython.double a0, cython.double b1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole filter: y(n) = a0 x(n) - b1 y(n-1)
 */
  __pyx_tuple__378 = PyTuple_Pack(2, __pyx_n_s_a0, __pyx_n_s_b1); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __pyx_codeobj__379 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_one_pole, 3101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__379)) __PYX_ERR(0, 3101, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3116
 * 
 * 
 * cpdef cython.double one_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole filter of input.
 */
  __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_one_pole, 3116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 3116, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3127
 *     return cclm.mus_one_pole(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole.
 */
  __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_one_pole, 3127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(0, 3127, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3137
 * 
 * 
 * cpdef mus_any make_one_zero(cython.double a0 , cython.double a1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_zero filter: y(n) = a0 x(n) + a1 x(n-1)
 */
  __pyx_tuple__382 = PyTuple_Pack(2, __pyx_n_s_a0, __pyx_n_s_a1); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_one_zero, 3137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) __PYX_ERR(0, 3137, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3149
 *     return mus_any.from_ptr(cclm.mus_make_one_zero(a0, a1))
 * 
 * cpdef cython.double one_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one zero filter of input.
 */
  __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_one_zero, 3149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(0, 3149, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3159
 *     return cclm.mus_one_zero(gen._ptr, insig)
 * 
 * cpdef bint is_one_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_zero.
 */
  __pyx_codeobj__385 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_one_zero, 3159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__385)) __PYX_ERR(0, 3159, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3169
 * 
 * 
 * cpdef make_two_pole(frequency=None, radius=None, a0=None,b1=None,b2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).
 */
  __pyx_tuple__386 = PyTuple_Pack(5, __pyx_n_s_frequency, __pyx_n_s_radius, __pyx_n_s_a0, __pyx_n_s_b1, __pyx_n_s_b2_2); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 3169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_two_pole, 3169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) __PYX_ERR(0, 3169, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3190
 * 
 * 
 * cpdef cython.double two_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two pole filter of input.
 */
  __pyx_codeobj__388 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_two_pole, 3190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__388)) __PYX_ERR(0, 3190, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3201
 *     return cclm.mus_two_pole(gen._ptr, insig)
 * 
 * cpdef bint is_two_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_pole.
 */
  __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_two_pole, 3201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(0, 3201, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3211
 * 
 * 
 * cpdef make_two_zero(frequency=None, radius=None, a0=None,a1=None,a2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).
 */
  __pyx_tuple__390 = PyTuple_Pack(5, __pyx_n_s_frequency, __pyx_n_s_radius, __pyx_n_s_a0, __pyx_n_s_a1, __pyx_n_s_a2_2); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);
  __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_two_zero, 3211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(0, 3211, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3232
 * 
 * 
 * cpdef cython.double two_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two zero filter of input.
 */
  __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_two_zero, 3232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(0, 3232, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3242
 *     return cclm.mus_two_zero(gen._ptr, insig)
 * 
 * cpdef bint is_two_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_zero.
 */
  __pyx_codeobj__393 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_two_zero, 3242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__393)) __PYX_ERR(0, 3242, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3255
 * 
 * # ---------------- formant ---------------- #
 * cpdef mus_any make_formant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant generator (a resonator). radius sets the pole radius (in terms of the 'unit circle').
 */
  __pyx_tuple__394 = PyTuple_Pack(2, __pyx_n_s_frequency, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_formant, 3255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(0, 3255, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3269
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from formant generator.
 */
  __pyx_tuple__396 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_insig, __pyx_n_s_radians); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);
  __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_formant, 3269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __pyx_tuple__398 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);

  /* "pysndlib/clm.pyx":3285
 * 
 * 
 * cpdef bint is_formant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant.
 */
  __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_formant, 3285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) __PYX_ERR(0, 3285, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3295
 * 
 * # ---------------- formant-bank ---------------- #
 * cpdef mus_any make_formant_bank(list filters, amps=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant-bank generator.
 */
  __pyx_tuple__400 = PyTuple_Pack(2, __pyx_n_s_filters, __pyx_n_s_amps); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_formant_bank, 3295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(0, 3295, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3325
 * 
 * 
 * cpdef cython.double formant_bank(mus_any gen, inputs):             # <<<<<<<<<<<<<<
 *     """
 *     sum a bank of formant generators.
 */
  __pyx_tuple__402 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_inputs); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);
  __pyx_codeobj__403 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_formant_bank, 3325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__403)) __PYX_ERR(0, 3325, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3345
 *     return res
 * 
 * cpdef bint is_formant_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant_bank.
 */
  __pyx_codeobj__404 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_formant_bank, 3345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__404)) __PYX_ERR(0, 3345, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3355
 * 
 * # ---------------- firmant ---------------- #
 * cpdef mus_any make_firmant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new firmant generator (a resonator).  radius sets the pole radius (in terms of the 'unit
 */
  __pyx_codeobj__405 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_firmant, 3355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__405)) __PYX_ERR(0, 3355, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3369
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=0.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from resonator generator.
 */
  __pyx_codeobj__406 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_firmant, 3369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__406)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __pyx_tuple__407 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);

  /* "pysndlib/clm.pyx":3385
 * 
 * 
 * cpdef is_firmant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a firmant.
 */
  __pyx_codeobj__408 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_firmant, 3385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__408)) __PYX_ERR(0, 3385, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3395
 * 
 * # ---------------- filter ---------------- #
 * cpdef mus_any make_filter(cython.int order, xcoeffs, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new direct form fir/iir filter, coeff args are list/ndarray.
 */
  __pyx_tuple__409 = PyTuple_Pack(3, __pyx_n_s_order, __pyx_n_s_xcoeffs, __pyx_n_s_ycoeffs); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 3395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);
  __pyx_codeobj__410 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_filter, 3395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__410)) __PYX_ERR(0, 3395, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3417
 *     return gen
 * 
 * cpdef cython.double filter(mus_any gen, cython.double insig): # todo : conflicts with buitl in function             # <<<<<<<<<<<<<<
 *     """
 *     next sample from filter.
 */
  __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_filter, 3417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) __PYX_ERR(0, 3417, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3427
 *     return cclm.mus_filter(gen._ptr, insig)
 * 
 * cpdef bint is_filter(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filter.
 */
  __pyx_codeobj__412 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_filter, 3427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__412)) __PYX_ERR(0, 3427, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3437
 * 
 * # ---------------- fir-filter ---------------- #
 * cpdef mus_any make_fir_filter(cython.int order, xcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new fir filter, xcoeffs a list/ndarray.
 */
  __pyx_tuple__413 = PyTuple_Pack(2, __pyx_n_s_order, __pyx_n_s_xcoeffs); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(0, 3437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);
  __pyx_codeobj__414 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_fir_filter, 3437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__414)) __PYX_ERR(0, 3437, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3458
 *     return gen
 * 
 * cpdef cython.double fir_filter(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from fir filter.
 */
  __pyx_codeobj__415 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_fir_filter, 3458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__415)) __PYX_ERR(0, 3458, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3468
 *     return cclm.mus_fir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_fir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a fir_filter.
 */
  __pyx_codeobj__416 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_fir_filter, 3468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__416)) __PYX_ERR(0, 3468, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3479
 * 
 * # ---------------- iir-filter ---------------- #
 * cpdef mus_any make_iir_filter(cython.int order, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new iir filter, ycoeffs a list/ndarray.
 */
  __pyx_tuple__417 = PyTuple_Pack(2, __pyx_n_s_order, __pyx_n_s_ycoeffs); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__417);
  __Pyx_GIVEREF(__pyx_tuple__417);
  __pyx_codeobj__418 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_iir_filter, 3479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__418)) __PYX_ERR(0, 3479, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3500
 *     return gen
 * 
 * cpdef cython.double iir_filter(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from iir filter.
 */
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_iir_filter, 3500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(0, 3500, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3510
 *     return cclm.mus_iir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_iir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a iir_filter
 */
  __pyx_codeobj__420 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_iir_filter, 3510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__420)) __PYX_ERR(0, 3510, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3518
 *     return cclm.mus_is_iir_filter(gen._ptr)
 * 
 * cpdef np.ndarray make_fir_coeffs(cython.int order, envelope):             # <<<<<<<<<<<<<<
 *     """
 *     translates a frequency response envelope (actually, evenly spaced points \in a float-vector) into
 */
  __pyx_tuple__421 = PyTuple_Pack(2, __pyx_n_s_order, __pyx_n_s_envelope); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__421);
  __Pyx_GIVEREF(__pyx_tuple__421);
  __pyx_codeobj__422 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_fir_coeffs, 3518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__422)) __PYX_ERR(0, 3518, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3545
 * 
 * # ---------------- delay ---------------- #
 * cpdef mus_any make_delay(cython.long size, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new delay line of size elements. if the delay length will be changing at run-time,
 */
  __pyx_tuple__423 = PyTuple_Pack(5, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_initial_element, __pyx_n_s_max_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);
  __pyx_codeobj__424 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_delay, 3545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__424)) __PYX_ERR(0, 3545, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3589
 *     return gen
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */
  __pyx_tuple__425 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_insig, __pyx_n_s_pm); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__425);
  __Pyx_GIVEREF(__pyx_tuple__425);
  __pyx_codeobj__426 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_delay, 3589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__426)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __pyx_tuple__427 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__427);
  __Pyx_GIVEREF(__pyx_tuple__427);

  /* "pysndlib/clm.pyx":3604
 * 
 * 
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */
  __pyx_codeobj__428 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_delay_unmodulated, 3604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__428)) __PYX_ERR(0, 3604, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3617
 *     return cclm.mus_delay_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_delay(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a delay.
 */
  __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_delay, 3617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) __PYX_ERR(0, 3617, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3626
 *     return cclm.mus_is_delay(gen._ptr)
 * 
 * cpdef cython.double tap(mus_any gen, offset=0.):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */
  __pyx_tuple__430 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_offset); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);
  __pyx_codeobj__431 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_tap, 3626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__431)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __pyx_tuple__432 = PyTuple_Pack(1, __pyx_float_0_); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);

  /* "pysndlib/clm.pyx":3638
 *     return cclm.mus_tap(gen._ptr, offset)
 * 
 * cpdef cython.double tap_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */
  __pyx_codeobj__433 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_tap_unmodulated, 3638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__433)) __PYX_ERR(0, 3638, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3649
 *     return cclm.mus_tap_unmodulated(gen._ptr)
 * 
 * cpdef bint is_tap(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a tap.
 */
  __pyx_codeobj__434 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_tap, 3649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__434)) __PYX_ERR(0, 3649, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3658
 *     return cclm.mus_is_tap(gen._ptr)
 * 
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length. this merely 'ticks' the delay line forward.
 */
  __pyx_codeobj__435 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_delay_tick, 3658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__435)) __PYX_ERR(0, 3658, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3670
 * 
 * # ---------------- comb ---------------- #
 * cpdef mus_any make_comb(cython.double feedback=1.0,size=None, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb
 */
  __pyx_tuple__436 = PyTuple_Pack(6, __pyx_n_s_feedback, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_initial_element, __pyx_n_s_max_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_comb, 3670, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) __PYX_ERR(0, 3670, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3715
 *     return gen
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     comb filter val, pm changes the delay length.
 */
  __pyx_codeobj__438 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_comb, 3715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__438)) __PYX_ERR(0, 3715, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3729
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb.
 */
  __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_comb, 3729, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) __PYX_ERR(0, 3729, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3739
 * 
 * # ---------------- comb-bank ---------------- #
 * cpdef mus_any make_comb_bank(list combs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb-bank generator.
 */
  __pyx_tuple__440 = PyTuple_Pack(1, __pyx_n_s_combs); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);
  __pyx_codeobj__441 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_comb_bank, 3739, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__441)) __PYX_ERR(0, 3739, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3759
 *     return gen
 * 
 * cpdef cython.double comb_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of comb filters.
 */
  __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_comb_bank, 3759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(0, 3759, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3769
 *     return cclm.mus_comb_bank(gen._ptr, insig)
 * 
 * cpdef bint is_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb_bank
 */
  __pyx_codeobj__443 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_comb_bank, 3769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__443)) __PYX_ERR(0, 3769, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3780
 * 
 * # ---------------- filtered-comb ---------------- #
 * cpdef mus_any make_filtered_comb(cython.double feedback,cython.long size, mus_any filter, initial_contents=None,  cython.double initial_element=0.0, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_tuple__444 = PyTuple_Pack(7, __pyx_n_s_feedback, __pyx_n_s_size, __pyx_n_s_filter, __pyx_n_s_initial_contents, __pyx_n_s_initial_element, __pyx_n_s_max_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  __pyx_codeobj__445 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_filtered_comb, 3780, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__445)) __PYX_ERR(0, 3780, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3824
 *     return gen
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length.
 */
  __pyx_codeobj__446 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_filtered_comb, 3824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__446)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __pyx_tuple__447 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);

  /* "pysndlib/clm.pyx":3836
 * 
 * 
 * cpdef cython.double filtered_comb_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length. unmodulated
 */
  __pyx_codeobj__448 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_filtered_comb_unmodulated, 3836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__448)) __PYX_ERR(0, 3836, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3847
 *     return cclm.mus_filtered_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_filtered_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb.
 */
  __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_filtered_comb, 3847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) __PYX_ERR(0, 3847, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3857
 * 
 * # ---------------- filtered-comb-bank ---------------- #
 * cpdef mus_any make_filtered_comb_bank(list fcombs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new filtered_comb-bank generator.
 */
  __pyx_tuple__450 = PyTuple_Pack(1, __pyx_n_s_fcombs); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_filtered_comb_bank, 3857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) __PYX_ERR(0, 3857, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3875
 *     return gen
 * 
 * cpdef cython.double filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of filtered_comb filters.
 */
  __pyx_codeobj__452 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_filtered_comb_bank, 3875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__452)) __PYX_ERR(0, 3875, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3885
 *     return cclm.mus_filtered_comb_bank(gen._ptr, input)
 * 
 * cpdef bint is_filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb_bank.
 */
  __pyx_codeobj__453 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_filtered_comb_bank, 3885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__453)) __PYX_ERR(0, 3885, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */
  __pyx_tuple__454 = PyTuple_Pack(6, __pyx_n_s_feedforward, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_initial_element, __pyx_n_s_max_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_notch, 3895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) __PYX_ERR(0, 3895, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3945
 *     return gen
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length.
 */
  __pyx_codeobj__456 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_notch, 3945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__456)) __PYX_ERR(0, 3945, __pyx_L1_error)
  __pyx_tuple__457 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__457)) __PYX_ERR(0, 3945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__457);
  __Pyx_GIVEREF(__pyx_tuple__457);

  /* "pysndlib/clm.pyx":3957
 * 
 * 
 * cpdef cython.double notch_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length. unmodulated
 */
  __pyx_codeobj__458 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_notch_unmodulated, 3957, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__458)) __PYX_ERR(0, 3957, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3968
 * 
 * 
 * cpdef bint is_notch(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a notch.
 */
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_notch, 3968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(0, 3968, __pyx_L1_error)

  /* "pysndlib/clm.pyx":3978
 * 
 * # ---------------- all-pass ---------------- #
 * cpdef mus_any make_all_pass(cython.double feedback, cython.double  feedforward, cython.long  size, initial_contents= None, cython.double  initial_element = 0.0,  max_size= None, Interp interp_type = Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_tuple__460 = PyTuple_Pack(7, __pyx_n_s_feedback, __pyx_n_s_feedforward, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_initial_element, __pyx_n_s_max_size, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);
  __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_all_pass, 3978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(0, 3978, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4026
 *     return gen
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     all-pass filter insig value, pm changes the delay length.
 */
  __pyx_codeobj__462 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_all_pass, 4026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__462)) __PYX_ERR(0, 4026, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4040
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)
 * 
 * cpdef is_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass.
 */
  __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_all_pass, 4040, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) __PYX_ERR(0, 4040, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4051
 * 
 * # ---------------- all-pass-bank ---------------- #
 * cpdef mus_any make_all_pass_bank(all_passes: list):             # <<<<<<<<<<<<<<
 *     """
 *     return a new all_pass-bank generator.
 */
  __pyx_tuple__464 = PyTuple_Pack(1, __pyx_n_s_all_passes); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_all_pass_bank, 4051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(0, 4051, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4068
 *     return gen
 * 
 * cpdef cython.double all_pass_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of all_pass filters.
 */
  __pyx_codeobj__466 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_all_pass_bank, 4068, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__466)) __PYX_ERR(0, 4068, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4078
 *     return cclm.mus_all_pass_bank(gen._ptr, insig)
 * 
 * cpdef bint is_all_pass_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass_bank.
 */
  __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_all_pass_bank, 4078, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) __PYX_ERR(0, 4078, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4090
 * 
 * # ---------------- one_pole_all_pass ---------------- #
 * cpdef mus_any make_one_pole_all_pass(cython.long size, cython.double coeff):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole all_pass filter size, coeff.
 */
  __pyx_tuple__468 = PyTuple_Pack(2, __pyx_n_s_size, __pyx_n_s_coeff); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);
  __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_one_pole_all_pass, 4090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(0, 4090, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4102
 *     return mus_any.from_ptr(cclm.mus_make_one_pole_all_pass(size, coeff))
 * 
 * cpdef cython.double one_pole_all_pass(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole all pass filter of input.
 */
  __pyx_codeobj__470 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_one_pole_all_pass, 4102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__470)) __PYX_ERR(0, 4102, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4112
 *     return cclm.mus_one_pole_all_pass(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole_all_pass.
 */
  __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_one_pole_all_pass, 4112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(0, 4112, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4122
 * 
 * # ---------------- moving-average ---------------- #
 * cpdef mus_any make_moving_average(cython.long size, initial_contents=None, cython.double initial_element=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving_average generator.
 */
  __pyx_tuple__472 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_initial_element); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);
  __pyx_codeobj__473 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_moving_average, 4122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__473)) __PYX_ERR(0, 4122, __pyx_L1_error)
  __pyx_tuple__474 = PyTuple_Pack(2, Py_None, __pyx_float_0_0); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(0, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__474);
  __Pyx_GIVEREF(__pyx_tuple__474);

  /* "pysndlib/clm.pyx":4155
 * 
 * 
 * cpdef cython.double moving_average(mus_any gen, cython.double  insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window average.
 */
  __pyx_codeobj__475 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_moving_average, 4155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__475)) __PYX_ERR(0, 4155, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4165
 *     return cclm.mus_moving_average(gen._ptr, insig)
 * 
 * cpdef bint is_moving_average(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_average.
 */
  __pyx_codeobj__476 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_moving_average, 4165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__476)) __PYX_ERR(0, 4165, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */
  __pyx_codeobj__477 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_moving_max, 4175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__477)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __pyx_tuple__478 = PyTuple_Pack(2, Py_None, __pyx_float_0_0); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);

  /* "pysndlib/clm.pyx":4211
 *     return gen
 * 
 * cpdef cython.double moving_max(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window max.
 */
  __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_moving_max, 4211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) __PYX_ERR(0, 4211, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4221
 *     return cclm.mus_moving_max(gen._ptr, insig)
 * 
 * cpdef bint is_moving_max(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_max.
 */
  __pyx_codeobj__480 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_moving_max, 4221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__480)) __PYX_ERR(0, 4221, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4231
 * 
 * # ---------------- moving-norm ---------------- #
 * cpdef mus_any make_moving_norm(cython.long size, initial_contents=None, cython.double scaler=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving-norm generator.
 */
  __pyx_tuple__481 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_initial_contents, __pyx_n_s_scaler); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);
  __pyx_codeobj__482 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_moving_norm, 4231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__482)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __pyx_tuple__483 = PyTuple_Pack(2, Py_None, __pyx_float_1_); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);

  /* "pysndlib/clm.pyx":4261
 *     return gen
 * 
 * cpdef cython.double moving_norm(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window norm.
 */
  __pyx_codeobj__484 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_moving_norm, 4261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__484)) __PYX_ERR(0, 4261, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4271
 *     return cclm.mus_moving_norm(gen._ptr, insig)
 * 
 * cpdef is_moving_norm(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_norm.
 */
  __pyx_codeobj__485 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_moving_norm, 4271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__485)) __PYX_ERR(0, 4271, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4282
 * 
 * # ---------------- asymmetric-fm ---------------- #
 * cpdef mus_any make_asymmetric_fm(cython.double frequency, cython.double initial_phase=0.0, cython.double r=1.0, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new asymmetric_fm generator.
 */
  __pyx_tuple__486 = PyTuple_Pack(4, __pyx_n_s_frequency, __pyx_n_s_initial_phase, __pyx_n_s_r, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__486)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__486);
  __Pyx_GIVEREF(__pyx_tuple__486);
  __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_asymmetric_fm, 4282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __pyx_tuple__488 = PyTuple_Pack(3, __pyx_float_0_0, __pyx_float_1_0, __pyx_float_1_); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);

  /* "pysndlib/clm.pyx":4298
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */
  __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_asymmetric_fm, 4298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) __PYX_ERR(0, 4298, __pyx_L1_error)
  __pyx_tuple__490 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(0, 4298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);

  /* "pysndlib/clm.pyx":4310
 * 
 * 
 * cpdef cython.double asymmetric_fm_unmodulated(mus_any gen, cython.double index):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */
  __pyx_codeobj__491 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_asymmetric_fm_unmodulated, 4310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__491)) __PYX_ERR(0, 4310, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4320
 *     return cclm.mus_asymmetric_fm_unmodulated(gen._ptr, index)
 * 
 * cpdef bint is_asymmetric_fm(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a asymmetric_fm.
 */
  __pyx_codeobj__492 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_asymmetric_fm, 4320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__492)) __PYX_ERR(0, 4320, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4330
 * 
 * # ---------------- file-to-sample ---------------- #
 * cpdef mus_any make_file2sample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading 'filename' (a sound file).
 */
  __pyx_tuple__493 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_buffer_size); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(0, 4330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__493);
  __Pyx_GIVEREF(__pyx_tuple__493);
  __pyx_codeobj__494 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_file2sample, 4330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__494)) __PYX_ERR(0, 4330, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4345
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=0):             # <<<<<<<<<<<<<<
 *     """
 *     sample value \in sound file read by 'obj' \in channel chan at sample.
 */
  __pyx_tuple__495 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_loc, __pyx_n_s_chan); if (unlikely(!__pyx_tuple__495)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__495);
  __Pyx_GIVEREF(__pyx_tuple__495);
  __pyx_codeobj__496 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_file2sample_2, 4345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__496)) __PYX_ERR(0, 4345, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4356
 *     return cclm.mus_file_to_sample(gen._ptr, loc, chan)
 * 
 * cpdef bint is_file2sample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2sample.
 */
  __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_file2sample, 4356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(0, 4356, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4366
 * 
 * # ---------------- sample-to-file ---------------- #
 * cpdef mus_any make_sample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have chans'
 */
  __pyx_tuple__498 = PyTuple_Pack(5, __pyx_n_s_filename, __pyx_n_s_chans, __pyx_n_s_sample_type, __pyx_n_s_header_type, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);
  __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_sample2file, 4366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __pyx_tuple__500 = PyTuple_Pack(4, __pyx_int_1, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);

  /* "pysndlib/clm.pyx":4386
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 * 
 * cpdef cython.double sample2file(mus_any gen, cython.long samp, cython.int chan ,  cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     add val to the output stream handled by the output generator 'obj', \in channel 'chan' at frample 'samp'.
 */
  __pyx_tuple__501 = PyTuple_Pack(4, __pyx_n_s_gen, __pyx_n_s_samp, __pyx_n_s_chan, __pyx_n_s_val); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__501);
  __Pyx_GIVEREF(__pyx_tuple__501);
  __pyx_codeobj__502 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_sample2file, 4386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__502)) __PYX_ERR(0, 4386, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4398
 *     return cclm.mus_sample_to_file(gen._ptr, samp, chan, val)
 * 
 * cpdef bint is_sample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sample2file.
 */
  __pyx_codeobj__503 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_sample2file, 4398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__503)) __PYX_ERR(0, 4398, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4407
 *     return cclm.mus_is_sample_to_file(gen._ptr)
 * 
 * cpdef mus_any continue_sample2file(name: str):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */
  __pyx_tuple__504 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__504)) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__504);
  __Pyx_GIVEREF(__pyx_tuple__504);
  __pyx_codeobj__505 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_continue_sample2file, 4407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__505)) __PYX_ERR(0, 4407, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4419
 * 
 * # ---------------- file-to-frample ---------------- #
 * cpdef mus_any make_file2frample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading all channels of 'filename' (a sound file).
 */
  __pyx_codeobj__506 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_file2frample, 4419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__506)) __PYX_ERR(0, 4419, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4433
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef file2frample(mus_any gen, cython.long loc):             # <<<<<<<<<<<<<<
 *     """
 *     frample of samples at frample 'samp' \in sound file read by 'obj'.
 */
  __pyx_tuple__507 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_loc); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(0, 4433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__507);
  __Pyx_GIVEREF(__pyx_tuple__507);
  __pyx_codeobj__508 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_file2frample_2, 4433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__508)) __PYX_ERR(0, 4433, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4446
 *     return outf
 * 
 * cpdef is_file2frample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2frample.
 */
  __pyx_codeobj__509 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_file2frample, 4446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__509)) __PYX_ERR(0, 4446, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4457
 * 
 * # ---------------- frample-to-file ---------------- #
 * cpdef mus_any make_frample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have 'chans'
 */
  __pyx_codeobj__510 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_frample2file, 4457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__510)) __PYX_ERR(0, 4457, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4477
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 * 
 * cpdef cython.double frample2file(mus_any gen, cython.long samp, vals):             # <<<<<<<<<<<<<<
 *     """
 *     add frample 'val' to the output stream handled by the output generator 'obj' at frample 'samp'.
 */
  __pyx_tuple__511 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_samp, __pyx_n_s_vals); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(0, 4477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__511);
  __Pyx_GIVEREF(__pyx_tuple__511);
  __pyx_codeobj__512 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_frample2file, 4477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__512)) __PYX_ERR(0, 4477, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4497
 *     return vals
 * 
 * cpdef bint is_frample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a frample2file.
 */
  __pyx_codeobj__513 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_frample2file, 4497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__513)) __PYX_ERR(0, 4497, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4507
 * 
 * 
 * cpdef mus_any continue_frample2file(str name):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */
  __pyx_codeobj__514 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_continue_frample2file, 4507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__514)) __PYX_ERR(0, 4507, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4519
 * 
 * # ---------------- readin ---------------- #
 * cpdef mus_any make_readin(str filename, cython.int chan=0, cython.long start=0, cython.int direction=1, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new readin (file input) generator reading the sound file 'file' starting at frample
 */
  __pyx_tuple__515 = PyTuple_Pack(5, __pyx_n_s_filename, __pyx_n_s_chan, __pyx_n_s_start, __pyx_n_s_direction, __pyx_n_s_buffer_size); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__515);
  __Pyx_GIVEREF(__pyx_tuple__515);
  __pyx_codeobj__516 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__515, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_readin, 4519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__516)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __pyx_tuple__517 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_1, Py_None); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__517);
  __Pyx_GIVEREF(__pyx_tuple__517);

  /* "pysndlib/clm.pyx":4541
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))
 * 
 * cpdef cython.double readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from readin generator (a sound file reader).
 */
  __pyx_codeobj__518 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_readin_2, 4541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__518)) __PYX_ERR(0, 4541, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4550
 *     return cclm.mus_readin(gen._ptr)
 * 
 * cpdef is_readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a readin.
 */
  __pyx_codeobj__519 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_readin, 4550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__519)) __PYX_ERR(0, 4550, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */
  __pyx_tuple__520 = PyTuple_Pack(7, __pyx_n_s_inp, __pyx_n_s_srate, __pyx_n_s_width, __pyx_n_s_cy_inp_f_ptr, __pyx_n_s_res, __pyx_n_s_inp_f, __pyx_n_s_inp_f); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);
  __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_src, 4561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) __PYX_ERR(0, 4561, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4600
 *     return res
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sampling rate conversion sample. 'pm' can be used to change the sampling rate on a
 */
  __pyx_tuple__522 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_sr_change); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__522);
  __Pyx_GIVEREF(__pyx_tuple__522);
  __pyx_codeobj__523 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_src, 4600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__523)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __pyx_tuple__524 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__524)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__524);
  __Pyx_GIVEREF(__pyx_tuple__524);

  /* "pysndlib/clm.pyx":4616
 *         return 0.0
 * 
 * cpdef bint is_src(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a src.
 */
  __pyx_codeobj__525 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_src, 4616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__525)) __PYX_ERR(0, 4616, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */
  __pyx_tuple__526 = PyTuple_Pack(11, __pyx_n_s_inp, __pyx_n_s_filt, __pyx_n_s_fft_size, __pyx_n_s_filter_size, __pyx_n_s_cy_input_f_ptr, __pyx_n_s_filt_view, __pyx_n_s_fft_len, __pyx_n_s_res, __pyx_n_s_inp_f, __pyx_n_s_inp_f, __pyx_n_s_cy_inp_f_ptr); if (unlikely(!__pyx_tuple__526)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__526);
  __Pyx_GIVEREF(__pyx_tuple__526);
  __pyx_codeobj__527 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_convolve, 4628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__527)) __PYX_ERR(0, 4628, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4694
 * 
 * 
 * cpdef cython.double convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from convolution generator.
 */
  __pyx_codeobj__528 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_convolve, 4694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__528)) __PYX_ERR(0, 4694, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4703
 *     return cclm.mus_convolve(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a convolve.
 */
  __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_convolve, 4703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) __PYX_ERR(0, 4703, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */
  __pyx_tuple__530 = PyTuple_Pack(17, __pyx_n_s_inp, __pyx_n_s_expansion, __pyx_n_s_length, __pyx_n_s_scaler, __pyx_n_s_hop, __pyx_n_s_ramp, __pyx_n_s_jitter, __pyx_n_s_max_size, __pyx_n_s_edit, __pyx_n_s_cy_input_f_ptr, __pyx_n_s_cy_edit_f_ptr, __pyx_n_s_res, __pyx_n_s_inp_f, __pyx_n_s_inp_f, __pyx_n_s_cy_inp_f_ptr, __pyx_n_s_edit_f, __pyx_n_s_edit_f); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);
  __pyx_codeobj__531 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__530, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_granulate, 4714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__531)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __pyx_tuple__532 = PyTuple_Pack(8, ((PyObject*)__pyx_float_1_0), ((PyObject*)__pyx_float__15), ((PyObject*)__pyx_float__6), ((PyObject*)__pyx_float__05), ((PyObject*)__pyx_float__4), ((PyObject*)__pyx_float_0_0), ((PyObject *)__pyx_int_0), Py_None); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__532);
  __Pyx_GIVEREF(__pyx_tuple__532);

  /* "pysndlib/clm.pyx":4784
 * 
 * #todo: mus_granulate_grain_max_length
 * cpdef cython.double granulate(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from granular synthesis generator.
 */
  __pyx_codeobj__533 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_granulate, 4784, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__533)) __PYX_ERR(0, 4784, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4798
 * 
 * 
 * cpdef bint is_granulate(mus_any e):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a granulate.
 */
  __pyx_tuple__534 = PyTuple_Pack(1, __pyx_n_s_e); if (unlikely(!__pyx_tuple__534)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__534);
  __Pyx_GIVEREF(__pyx_tuple__534);
  __pyx_codeobj__535 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_granulate, 4798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__535)) __PYX_ERR(0, 4798, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */
  __pyx_tuple__536 = PyTuple_Pack(21, __pyx_n_s_inp, __pyx_n_s_fft_size, __pyx_n_s_overlap, __pyx_n_s_interp, __pyx_n_s_pitch, __pyx_n_s_analyze, __pyx_n_s_edit, __pyx_n_s_synthesize, __pyx_n_s_cy_inp_f_ptr, __pyx_n_s_cy_edit_f_ptr, __pyx_n_s_cy_analyze_f_ptr, __pyx_n_s_cy_synthesize_f_ptr, __pyx_n_s_res, __pyx_n_s_inp_f, __pyx_n_s_inp_f, __pyx_n_s_edit_f, __pyx_n_s_edit_f, __pyx_n_s_analyze_f, __pyx_n_s_analyze_f, __pyx_n_s_synthesize_f, __pyx_n_s_synthesize_f); if (unlikely(!__pyx_tuple__536)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__536);
  __Pyx_GIVEREF(__pyx_tuple__536);
  __pyx_codeobj__537 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_phase_vocoder, 4808, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__537)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __pyx_tuple__538 = PyTuple_Pack(7, ((PyObject *)__pyx_int_512), ((PyObject *)__pyx_int_4), ((PyObject *)__pyx_int_128), ((PyObject*)__pyx_float_1_0), Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__538)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__538);
  __Pyx_GIVEREF(__pyx_tuple__538);

  /* "pysndlib/clm.pyx":4897
 * 
 * 
 * cpdef cython.double phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next phase vocoder value.
 */
  __pyx_codeobj__539 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder, 4897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__539)) __PYX_ERR(0, 4897, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4909
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a phase_vocoder.
 */
  __pyx_codeobj__540 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_phase_vocoder, 4909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__540)) __PYX_ERR(0, 4909, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4919
 * 
 * 
 * cpdef np.ndarray phase_vocoder_amp_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitude increments per sample.
 */
  __pyx_codeobj__541 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder_amp_increments, 4919, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__541)) __PYX_ERR(0, 4919, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4925
 *     return gen._pv_amp_increments
 * 
 * cpdef np.ndarray phase_vocoder_amps(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitudes.
 */
  __pyx_codeobj__542 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder_amps, 4925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__542)) __PYX_ERR(0, 4925, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4931
 *     return gen._pv_amps
 * 
 * cpdef np.ndarray phase_vocoder_freqs(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid frequencies.
 */
  __pyx_codeobj__543 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder_freqs, 4931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__543)) __PYX_ERR(0, 4931, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4937
 *     return gen._pv_freqs
 * 
 * cpdef np.ndarray phase_vocoder_phases(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phases.
 */
  __pyx_codeobj__544 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder_phases, 4937, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__544)) __PYX_ERR(0, 4937, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4943
 *     return gen._pv_phases
 * 
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phase increments.
 */
  __pyx_codeobj__545 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_vocoder_phase_increments, 4943, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__545)) __PYX_ERR(0, 4943, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4950
 * 
 * # --------------- out-any ---------------- #
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output.
 */
  __pyx_tuple__546 = PyTuple_Pack(4, __pyx_n_s_loc, __pyx_n_s_data, __pyx_n_s_channel, __pyx_n_s_output); if (unlikely(!__pyx_tuple__546)) __PYX_ERR(0, 4950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__546);
  __Pyx_GIVEREF(__pyx_tuple__546);
  __pyx_codeobj__547 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_out_any, 4950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__547)) __PYX_ERR(0, 4950, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4971
 * 
 * # --------------- outa ---------------- #
 * cpdef outa(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 0.
 */
  __pyx_tuple__548 = PyTuple_Pack(3, __pyx_n_s_loc, __pyx_n_s_data, __pyx_n_s_output); if (unlikely(!__pyx_tuple__548)) __PYX_ERR(0, 4971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__548);
  __Pyx_GIVEREF(__pyx_tuple__548);
  __pyx_codeobj__549 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_outa, 4971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__549)) __PYX_ERR(0, 4971, __pyx_L1_error)

  /* "pysndlib/clm.pyx":4987
 * 
 * # --------------- outb ---------------- #
 * cpdef outb(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 1.
 */
  __pyx_codeobj__550 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_outb, 4987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__550)) __PYX_ERR(0, 4987, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5003
 * 
 * # --------------- outc ---------------- #
 * cpdef outc(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 2.
 */
  __pyx_codeobj__551 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_outc, 5003, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__551)) __PYX_ERR(0, 5003, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5019
 * 
 * # --------------- outd ---------------- #
 * cpdef outd(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 3.
 */
  __pyx_codeobj__552 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_outd, 5019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__552)) __PYX_ERR(0, 5019, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5036
 *    #
 * # --------------- out-bank ---------------- #
 * cpdef out_bank(gens, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     calls each generator \in the gens list, passing it the argument val, then sends that output to the output channels \in the list order (the first generator writes to outa, the second to outb, etc)."
 */
  __pyx_tuple__553 = PyTuple_Pack(3, __pyx_n_s_gens, __pyx_n_s_loc, __pyx_n_s_val); if (unlikely(!__pyx_tuple__553)) __PYX_ERR(0, 5036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__553);
  __Pyx_GIVEREF(__pyx_tuple__553);
  __pyx_codeobj__554 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__553, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_out_bank, 5036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__554)) __PYX_ERR(0, 5036, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5052
 * 
 * #--------------- in-any ----------------#
 * cpdef in_any(cython.long loc, cython.int channel, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel chan.
 */
  __pyx_tuple__555 = PyTuple_Pack(3, __pyx_n_s_loc, __pyx_n_s_channel, __pyx_n_s_inp); if (unlikely(!__pyx_tuple__555)) __PYX_ERR(0, 5052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__555);
  __Pyx_GIVEREF(__pyx_tuple__555);
  __pyx_codeobj__556 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__555, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_in_any, 5052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__556)) __PYX_ERR(0, 5052, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5073
 * 
 * #--------------- ina ----------------#
 * cpdef ina(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 0.
 */
  __pyx_tuple__557 = PyTuple_Pack(2, __pyx_n_s_loc, __pyx_n_s_inp); if (unlikely(!__pyx_tuple__557)) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__557);
  __Pyx_GIVEREF(__pyx_tuple__557);
  __pyx_codeobj__558 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_ina, 5073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__558)) __PYX_ERR(0, 5073, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5085
 * 
 * #--------------- inb ----------------#
 * cpdef inb(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 1.
 */
  __pyx_codeobj__559 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_inb, 5085, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__559)) __PYX_ERR(0, 5085, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5100
 * 
 * # --------------- locsig ---------------- #
 * cpdef mus_any make_locsig(cython.double degree=0.0, cython.double distance=1., cython.double reverb=0.0, output=None, revout=None, channels=None, reverb_channels=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_tuple__560 = PyTuple_Pack(8, __pyx_n_s_degree, __pyx_n_s_distance, __pyx_n_s_reverb, __pyx_n_s_output, __pyx_n_s_revout, __pyx_n_s_channels, __pyx_n_s_reverb_channels, __pyx_n_s_interp_type); if (unlikely(!__pyx_tuple__560)) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__560);
  __Pyx_GIVEREF(__pyx_tuple__560);
  __pyx_codeobj__561 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__560, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_locsig, 5100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__561)) __PYX_ERR(0, 5100, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5158
 *         raise TypeError(f"output needs to be a clm gen or np.array not a {type(output)}")
 * 
 * cpdef cython.double locsig(mus_any gen, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     locsig 'gen' channel 'chan' scaler.
 */
  __pyx_tuple__562 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_loc, __pyx_n_s_val); if (unlikely(!__pyx_tuple__562)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__562);
  __Pyx_GIVEREF(__pyx_tuple__562);
  __pyx_codeobj__563 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__562, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_locsig, 5158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__563)) __PYX_ERR(0, 5158, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5170
 *     cclm.mus_locsig(gen._ptr, loc, val)
 * 
 * cpdef bint is_locsig(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a locsig.
 */
  __pyx_codeobj__564 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_locsig, 5170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__564)) __PYX_ERR(0, 5170, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5180
 *     return cclm.mus_is_locsig(gen._ptr)
 * 
 * cpdef cython.double locsig_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig 'gen' channel 'chan' scaler for main output.
 */
  __pyx_tuple__565 = PyTuple_Pack(2, __pyx_n_s_gen, __pyx_n_s_chan); if (unlikely(!__pyx_tuple__565)) __PYX_ERR(0, 5180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__565);
  __Pyx_GIVEREF(__pyx_tuple__565);
  __pyx_codeobj__566 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_locsig_ref, 5180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__566)) __PYX_ERR(0, 5180, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5191
 *     return cclm.mus_locsig_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig generator's channel 'chan' scaler to 'val'  for main output.
 */
  __pyx_tuple__567 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_chan, __pyx_n_s_val); if (unlikely(!__pyx_tuple__567)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__567);
  __Pyx_GIVEREF(__pyx_tuple__567);
  __pyx_codeobj__568 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_locsig_set, 5191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__568)) __PYX_ERR(0, 5191, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5203
 *     return cclm.mus_locsig_set(gen._ptr, chan, val)
 * 
 * cpdef cython.double locsig_reverb_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig reverb channel 'chan' scaler.
 */
  __pyx_codeobj__569 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_locsig_reverb_ref, 5203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__569)) __PYX_ERR(0, 5203, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5215
 *     return cclm.mus_locsig_reverb_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_reverb_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig reverb channel 'chan' scaler to 'val'.
 */
  __pyx_codeobj__570 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_locsig_reverb_set, 5215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__570)) __PYX_ERR(0, 5215, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5227
 *     return cclm.mus_locsig_reverb_set(gen._ptr, chan, val)
 * 
 * cpdef move_locsig(mus_any gen,  cython.double degree, cython.double distance):             # <<<<<<<<<<<<<<
 *     """
 *     move locsig gen to reflect degree and distance.
 */
  __pyx_tuple__571 = PyTuple_Pack(3, __pyx_n_s_gen, __pyx_n_s_degree, __pyx_n_s_distance); if (unlikely(!__pyx_tuple__571)) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__571);
  __Pyx_GIVEREF(__pyx_tuple__571);
  __pyx_codeobj__572 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__571, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_move_locsig, 5227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__572)) __PYX_ERR(0, 5227, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5239
 * 
 * # added some options . todo: what about sample rate conversion
 * cpdef convolve_files(str file1, str file2, cython.double maxamp=1., str outputfile='test.aif', sample_type=None, header_type=None):             # <<<<<<<<<<<<<<
 *     """
 *     convolve-files handles a very common special case: convolve two files, then normalize the result to some maxamp.
 */
  __pyx_tuple__573 = PyTuple_Pack(6, __pyx_n_s_file1, __pyx_n_s_file2, __pyx_n_s_maxamp_2, __pyx_n_s_outputfile, __pyx_n_s_sample_type, __pyx_n_s_header_type); if (unlikely(!__pyx_tuple__573)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__573);
  __Pyx_GIVEREF(__pyx_tuple__573);
  __pyx_codeobj__574 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_convolve_files, 5239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__574)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __pyx_tuple__575 = PyTuple_Pack(4, __pyx_float_1_, __pyx_kp_u_test_aif, Py_None, Py_None); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__575);
  __Pyx_GIVEREF(__pyx_tuple__575);

  /* "pysndlib/clm.pyx":5275
 * # --------------- dcblock ---------------- #
 * 
 * cpdef mus_any make_dcblock():             # <<<<<<<<<<<<<<
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 */
  __pyx_codeobj__576 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_dcblock, 5275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__576)) __PYX_ERR(0, 5275, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5278
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */
  __pyx_codeobj__577 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_dcblock, 5278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__577)) __PYX_ERR(0, 5278, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5284
 * # --------------- biquad ---------------- #
 * 
 * cpdef mus_any make_biquad(cython.double a0, cython.double a1, cython.double a2, cython.double b1, cython.double b2):             # <<<<<<<<<<<<<<
 *     """returns a biquad filter (use with the CLM filter gen)"""
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 */
  __pyx_tuple__578 = PyTuple_Pack(5, __pyx_n_s_a0, __pyx_n_s_a1, __pyx_n_s_a2_2, __pyx_n_s_b1, __pyx_n_s_b2_2); if (unlikely(!__pyx_tuple__578)) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__578);
  __Pyx_GIVEREF(__pyx_tuple__578);
  __pyx_codeobj__579 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__578, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad, 5284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__579)) __PYX_ERR(0, 5284, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5288
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */
  __pyx_codeobj__580 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_biquad, 5288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__580)) __PYX_ERR(0, 5288, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5291
 *     return filter(gen, insig)
 * 
 * cpdef bint is_biquad(mus_any gen):             # <<<<<<<<<<<<<<
 *     return is_filter(gen) and (gen.mus_order == 3)
 * 
 */
  __pyx_codeobj__581 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_biquad, 5291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__581)) __PYX_ERR(0, 5291, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5295
 * 
 * 
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0
 */
  __pyx_tuple__582 = PyTuple_Pack(2, __pyx_n_s_fc, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__582)) __PYX_ERR(0, 5295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__582);
  __Pyx_GIVEREF(__pyx_tuple__582);
  __pyx_codeobj__583 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_notch, 5295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__583)) __PYX_ERR(0, 5295, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5304
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_tuple__584 = PyTuple_Pack(2, __pyx_n_s_fc, __pyx_n_s_q); if (unlikely(!__pyx_tuple__584)) __PYX_ERR(0, 5304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__584);
  __Pyx_GIVEREF(__pyx_tuple__584);
  __pyx_codeobj__585 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_low_pass, 5304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__585)) __PYX_ERR(0, 5304, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5318
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_codeobj__586 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_high_pass, 5318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__586)) __PYX_ERR(0, 5318, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5332
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_codeobj__587 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_band_pass, 5332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__587)) __PYX_ERR(0, 5332, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5346
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_codeobj__588 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_band_reject, 5346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__588)) __PYX_ERR(0, 5346, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5360
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_codeobj__589 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_biquad_all_pass, 5360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__589)) __PYX_ERR(0, 5360, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5374
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius
 */
  __pyx_tuple__590 = PyTuple_Pack(4, __pyx_n_s_gen, __pyx_n_s_fc, __pyx_n_s_radius, __pyx_n_s_normalize); if (unlikely(!__pyx_tuple__590)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__590);
  __Pyx_GIVEREF(__pyx_tuple__590);
  __pyx_codeobj__591 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__590, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_biquad_set_resonance, 5374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__591)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __pyx_tuple__592 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__592)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__592);
  __Pyx_GIVEREF(__pyx_tuple__592);

  /* "pysndlib/clm.pyx":5388
 *         gen.mus_xcoeffs[2] = 0.0
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0
 */
  __pyx_codeobj__593 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_biquad_set_equal_gain_zeroes, 5388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__593)) __PYX_ERR(0, 5388, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5394
 * 
 * 
 * def convert_frequency(gen):             # <<<<<<<<<<<<<<
 *     gen.frequency = hz2radians(gen.frequency)
 *     return gen
 */
  __pyx_codeobj__594 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_convert_frequency, 5394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__594)) __PYX_ERR(0, 5394, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__595 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__595)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)
 */
  __pyx_codeobj__596 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__596)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5447
 *         return self._val
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 */
  __pyx_tuple__597 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_chan, __pyx_n_s_start, __pyx_n_s_direction); if (unlikely(!__pyx_tuple__597)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__597);
  __Pyx_GIVEREF(__pyx_tuple__597);
  __pyx_codeobj__598 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__597, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_make_array_readin, 5447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__598)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __pyx_tuple__599 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__599)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__599);
  __Pyx_GIVEREF(__pyx_tuple__599);

  /* "pysndlib/clm.pyx":5450
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 * cpdef array_readin(gen: array_readin_gen):             # <<<<<<<<<<<<<<
 *     return gen()
 * 
 */
  __pyx_codeobj__600 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_array_readin, 5450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__600)) __PYX_ERR(0, 5450, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5453
 *     return gen()
 * 
 * cpdef is_array_readin(gen):             # <<<<<<<<<<<<<<
 *     return isinstance(gen, array_readin_gen)
 * 
 */
  __pyx_codeobj__601 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_is_array_readin, 5453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__601)) __PYX_ERR(0, 5453, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5488
 * 
 * 
 * def clamp(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */
  __pyx_tuple__602 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_lo, __pyx_n_s_hi); if (unlikely(!__pyx_tuple__602)) __PYX_ERR(0, 5488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__602);
  __Pyx_GIVEREF(__pyx_tuple__602);
  __pyx_codeobj__603 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_clamp, 5488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__603)) __PYX_ERR(0, 5488, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5494
 * 
 * 
 * def _clip(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */
  __pyx_codeobj__604 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_clip, 5494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__604)) __PYX_ERR(0, 5494, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5498
 * 
 * 
 * def _wrap(x, lo, hi):             # <<<<<<<<<<<<<<
 *     r = hi-lo
 *     if x >= lo and x <= hi:
 */
  __pyx_tuple__605 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_lo, __pyx_n_s_hi, __pyx_n_s_r); if (unlikely(!__pyx_tuple__605)) __PYX_ERR(0, 5498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__605);
  __Pyx_GIVEREF(__pyx_tuple__605);
  __pyx_codeobj__606 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__605, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_wrap, 5498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__606)) __PYX_ERR(0, 5498, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */
  __pyx_tuple__607 = PyTuple_Pack(8, __pyx_n_s_arr, __pyx_n_s_chan, __pyx_n_s_loop, __pyx_n_s_ind, __pyx_n_s_length, __pyx_n_s_reader, __pyx_n_s_reader, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__607)) __PYX_ERR(0, 5507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__607);
  __Pyx_GIVEREF(__pyx_tuple__607);
  __pyx_codeobj__608 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__607, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_array_reader, 5507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__608)) __PYX_ERR(0, 5507, __pyx_L1_error)
  __pyx_tuple__609 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__609)) __PYX_ERR(0, 5507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__609);
  __Pyx_GIVEREF(__pyx_tuple__609);

  /* "pysndlib/clm.pyx":5529
 *     return reader
 * 
 * def sndplay(file):             # <<<<<<<<<<<<<<
 *     subprocess.run([default.player,file])
 * 
 */
  __pyx_tuple__610 = PyTuple_Pack(1, __pyx_n_s_file); if (unlikely(!__pyx_tuple__610)) __PYX_ERR(0, 5529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__610);
  __Pyx_GIVEREF(__pyx_tuple__610);
  __pyx_codeobj__611 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__610, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_sndplay, 5529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__611)) __PYX_ERR(0, 5529, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */
  __pyx_tuple__612 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_call, __pyx_n_s_call); if (unlikely(!__pyx_tuple__612)) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__612);
  __Pyx_GIVEREF(__pyx_tuple__612);
  __pyx_codeobj__613 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_clm_reverb, 5533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__613)) __PYX_ERR(0, 5533, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5539
 *     return call
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)
 */
  __pyx_tuple__614 = PyTuple_Pack(8, __pyx_n_s_arr, __pyx_n_s_new_length, __pyx_n_s_interp_type, __pyx_n_s_res, __pyx_n_s_inp, __pyx_n_s_orig_length, __pyx_n_s_indices, __pyx_n_s_i); if (unlikely(!__pyx_tuple__614)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__614);
  __Pyx_GIVEREF(__pyx_tuple__614);
  __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_array_resample, 5539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) __PYX_ERR(0, 5539, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5549
 * 
 * 
 * def phase_delay(gen, freq):             # <<<<<<<<<<<<<<
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.
 */
  __pyx_tuple__616 = PyTuple_Pack(7, __pyx_n_s_gen, __pyx_n_s_freq, __pyx_n_s_omega_t, __pyx_n_s_real, __pyx_n_s_imag, __pyx_n_s_i, __pyx_n_s_phase); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(0, 5549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__616);
  __Pyx_GIVEREF(__pyx_tuple__616);
  __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_phase_delay, 5549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) __PYX_ERR(0, 5549, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5572
 * 
 * 
 * def impulse_generator(arr):             # <<<<<<<<<<<<<<
 *     n = 0
 *     num = len(arr)
 */
  __pyx_tuple__618 = PyTuple_Pack(3, __pyx_n_s_arr, __pyx_n_s_n, __pyx_n_s_num); if (unlikely(!__pyx_tuple__618)) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__618);
  __Pyx_GIVEREF(__pyx_tuple__618);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_impulse_generator, 5572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 5572, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5584
 * from math import fabs, sqrt, exp
 * 
 * cpdef cython.double bes_i0(cython.double x):             # <<<<<<<<<<<<<<
 *     cdef cython.double ax
 *     cdef cython.double ans
 */
  __pyx_codeobj__619 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_i0, 5584, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__619)) __PYX_ERR(0, 5584, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5602
 * from pysndlib.cmath_sf cimport j0, j1, jn, y0, y1, yn
 * 
 * cpdef cython.double bes_j0(cython.double x):             # <<<<<<<<<<<<<<
 *     return j0(x)
 * 
 */
  __pyx_codeobj__620 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_j0, 5602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__620)) __PYX_ERR(0, 5602, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5605
 *     return j0(x)
 * 
 * cpdef cython.double bes_j1(cython.double x):             # <<<<<<<<<<<<<<
 *     return j1(x)
 * 
 */
  __pyx_codeobj__621 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_j1, 5605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__621)) __PYX_ERR(0, 5605, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5608
 *     return j1(x)
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return jn(n, x)
 * 
 */
  __pyx_tuple__622 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_x); if (unlikely(!__pyx_tuple__622)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__622);
  __Pyx_GIVEREF(__pyx_tuple__622);
  __pyx_codeobj__623 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_jn, 5608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__623)) __PYX_ERR(0, 5608, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5611
 *     return jn(n, x)
 * 
 * cpdef cython.double bes_y0(cython.double x):             # <<<<<<<<<<<<<<
 *     return y0(x)
 * 
 */
  __pyx_codeobj__624 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_y0, 5611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__624)) __PYX_ERR(0, 5611, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5614
 *     return y0(x)
 * 
 * cpdef cython.double bes_y1(cython.double x):             # <<<<<<<<<<<<<<
 *     return y1(x)
 * 
 */
  __pyx_codeobj__625 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_y1, 5614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__625)) __PYX_ERR(0, 5614, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5617
 *     return y1(x)
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return yn(n, x)
 * 
 */
  __pyx_codeobj__626 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_bes_yn, 5617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__626)) __PYX_ERR(0, 5617, __pyx_L1_error)

  /* "pysndlib/clm.pyx":5621
 * 
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):             # <<<<<<<<<<<<<<
 *     if size is None:
 *         size = len(data)
 */
  __pyx_tuple__627 = PyTuple_Pack(3, __pyx_n_s_freq, __pyx_n_s_data, __pyx_n_s_size); if (unlikely(!__pyx_tuple__627)) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__627);
  __Pyx_GIVEREF(__pyx_tuple__627);
  __pyx_codeobj__628 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__627, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pysndlib_clm_pyx, __pyx_n_s_edot_product, 5621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__628)) __PYX_ERR(0, 5621, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_array_readin_gen(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_codeobj__629 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_array_readin_gen, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__629)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float__4 = PyFloat_FromDouble(.4); if (unlikely(!__pyx_float__4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__5 = PyFloat_FromDouble(.5); if (unlikely(!__pyx_float__5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__6 = PyFloat_FromDouble(.6); if (unlikely(!__pyx_float__6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__05 = PyFloat_FromDouble(.05); if (unlikely(!__pyx_float__05)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__15 = PyFloat_FromDouble(.15); if (unlikely(!__pyx_float__15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg__99 = PyFloat_FromDouble(-.99); if (unlikely(!__pyx_float_neg__99)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_1_0 = PyFloat_FromDouble(-1.0); if (unlikely(!__pyx_float_neg_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_44100 = PyInt_FromLong(44100L); if (unlikely(!__pyx_int_44100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_49617724 = PyInt_FromLong(49617724L); if (unlikely(!__pyx_int_49617724)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_185414130 = PyInt_FromLong(185414130L); if (unlikely(!__pyx_int_185414130)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_228825662 = PyInt_FromLong(228825662L); if (unlikely(!__pyx_int_228825662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_232027208 = PyInt_FromLong(232027208L); if (unlikely(!__pyx_int_232027208)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_238750788 = PyInt_FromLong(238750788L); if (unlikely(!__pyx_int_238750788)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_OrderedDict = Py_None; Py_INCREF(Py_None);
  __Pyx_EnumBase = Py_None; Py_INCREF(Py_None);
  __Pyx_FlagBase = Py_None; Py_INCREF(Py_None);
  __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = Py_None; Py_INCREF(Py_None);
  __Pyx_globals = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("mus_close", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_close, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_is_output", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_is_output, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_is_input", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_is_input, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_reset", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_reset, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_length", (void (*)(void))__pyx_f_8pysndlib_3clm_get_length, "long (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_srate", (void (*)(void))__pyx_f_8pysndlib_3clm_get_srate, "double (int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_get_srate *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_framples", (void (*)(void))__pyx_f_8pysndlib_3clm_get_framples, "long (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_channels", (void (*)(void))__pyx_f_8pysndlib_3clm_get_channels, "long (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("random", (void (*)(void))__pyx_f_8pysndlib_3clm_random, "double (int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_random *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_zero", (void (*)(void))__pyx_f_8pysndlib_3clm_is_zero, "int (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_even", (void (*)(void))__pyx_f_8pysndlib_3clm_is_even, "int (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_odd", (void (*)(void))__pyx_f_8pysndlib_3clm_is_odd, "int (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("radians2hz", (void (*)(void))__pyx_f_8pysndlib_3clm_radians2hz, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("hz2radians", (void (*)(void))__pyx_f_8pysndlib_3clm_hz2radians, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("degrees2radians", (void (*)(void))__pyx_f_8pysndlib_3clm_degrees2radians, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("radians2degrees", (void (*)(void))__pyx_f_8pysndlib_3clm_radians2degrees, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("db2linear", (void (*)(void))__pyx_f_8pysndlib_3clm_db2linear, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("linear2db", (void (*)(void))__pyx_f_8pysndlib_3clm_linear2db, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("odd_multiple", (void (*)(void))__pyx_f_8pysndlib_3clm_odd_multiple, "double (double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("even_multiple", (void (*)(void))__pyx_f_8pysndlib_3clm_even_multiple, "double (double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("odd_weight", (void (*)(void))__pyx_f_8pysndlib_3clm_odd_weight, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("even_weight", (void (*)(void))__pyx_f_8pysndlib_3clm_even_weight, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("set_srate", (void (*)(void))__pyx_f_8pysndlib_3clm_set_srate, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("seconds2samples", (void (*)(void))__pyx_f_8pysndlib_3clm_seconds2samples, "long (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("samples2seconds", (void (*)(void))__pyx_f_8pysndlib_3clm_samples2seconds, "double (long, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ring_modulate", (void (*)(void))__pyx_f_8pysndlib_3clm_ring_modulate, "double (double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("amplitude_modulate", (void (*)(void))__pyx_f_8pysndlib_3clm_amplitude_modulate, "double (double, double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("contrast_enhancement", (void (*)(void))__pyx_f_8pysndlib_3clm_contrast_enhancement, "double (double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_contrast_enhancement *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("dot_product", (void (*)(void))__pyx_f_8pysndlib_3clm_dot_product, "double (PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polynomial", (void (*)(void))__pyx_f_8pysndlib_3clm_polynomial, "double (PyArrayObject *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("array_interp", (void (*)(void))__pyx_f_8pysndlib_3clm_array_interp, "double (PyArrayObject *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bessi0", (void (*)(void))__pyx_f_8pysndlib_3clm_bessi0, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_interpolate", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_interpolate, "double (enum __pyx_t_8pysndlib_3clm_Interp, double, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_interpolate *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("make_fft_window", (void (*)(void))__pyx_f_8pysndlib_3clm_make_fft_window, "PyArrayObject *(enum __pyx_t_8pysndlib_3clm_Window, int, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_fft_window *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("file2ndarray", (void (*)(void))__pyx_f_8pysndlib_3clm_file2ndarray, "PyObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2ndarray *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ndarray2file", (void (*)(void))__pyx_f_8pysndlib_3clm_ndarray2file, "PyObject *(PyObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ndarray2file *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_fft", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_fft, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fft", (void (*)(void))__pyx_f_8pysndlib_3clm_fft, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_rectangular2polar", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_rectangular2polar, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rectangular2polar", (void (*)(void))__pyx_f_8pysndlib_3clm_rectangular2polar, "PyObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_rectangular2magnitudes", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_rectangular2magnitudes, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rectangular2magnitudes", (void (*)(void))__pyx_f_8pysndlib_3clm_rectangular2magnitudes, "PyObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_polar2rectangular", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_polar2rectangular, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polar2rectangular", (void (*)(void))__pyx_f_8pysndlib_3clm_polar2rectangular, "PyObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_spectrum", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_spectrum, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_spectrum *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("spectrum", (void (*)(void))__pyx_f_8pysndlib_3clm_spectrum, "PyObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_spectrum *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("convolution", (void (*)(void))__pyx_f_8pysndlib_3clm_convolution, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolution *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_convolution", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_convolution, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_mus_convolution *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("autocorrelate", (void (*)(void))__pyx_f_8pysndlib_3clm_autocorrelate, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_autocorrelate", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_autocorrelate, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_correlate", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_correlate, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("correlate", (void (*)(void))__pyx_f_8pysndlib_3clm_correlate, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mus_cepstrum", (void (*)(void))__pyx_f_8pysndlib_3clm_mus_cepstrum, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cepstrum", (void (*)(void))__pyx_f_8pysndlib_3clm_cepstrum, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("partials2wave", (void (*)(void))__pyx_f_8pysndlib_3clm_partials2wave, "PyArrayObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_partials2wave", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_partials2wave, "PyArrayObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_phase_partials2wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("partials2polynomial", (void (*)(void))__pyx_f_8pysndlib_3clm_partials2polynomial, "PyArrayObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_partials2polynomial *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("normalize_partials", (void (*)(void))__pyx_f_8pysndlib_3clm_normalize_partials, "PyArrayObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("chebyshev_tu_sum", (void (*)(void))__pyx_f_8pysndlib_3clm_chebyshev_tu_sum, "double (double, PyObject *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("chebyshev_t_sum", (void (*)(void))__pyx_f_8pysndlib_3clm_chebyshev_t_sum, "double (double, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("chebyshev_u_sum", (void (*)(void))__pyx_f_8pysndlib_3clm_chebyshev_u_sum, "double (double, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("oscil", (void (*)(void))__pyx_f_8pysndlib_3clm_oscil, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_oscil *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("oscil_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_oscil_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_oscil", (void (*)(void))__pyx_f_8pysndlib_3clm_is_oscil, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("oscil_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_oscil_bank, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_oscil_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_is_oscil_bank, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("env", (void (*)(void))__pyx_f_8pysndlib_3clm_env, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_env", (void (*)(void))__pyx_f_8pysndlib_3clm_is_env, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("env_interp", (void (*)(void))__pyx_f_8pysndlib_3clm_env_interp, "double (double, struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("envelope_interp", (void (*)(void))__pyx_f_8pysndlib_3clm_envelope_interp, "double (double, struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("env_rates", (void (*)(void))__pyx_f_8pysndlib_3clm_env_rates, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("env_any", (void (*)(void))__pyx_f_8pysndlib_3clm_env_any, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("pulsed_env", (void (*)(void))__pyx_f_8pysndlib_3clm_pulsed_env, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulsed_env *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("pulsed_env_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_pulsed_env_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_pulsed_env", (void (*)(void))__pyx_f_8pysndlib_3clm_is_pulsed_env, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("table_lookup", (void (*)(void))__pyx_f_8pysndlib_3clm_table_lookup, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_table_lookup *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("table_lookup_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_table_lookup_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_table_lookup", (void (*)(void))__pyx_f_8pysndlib_3clm_is_table_lookup, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("make_table_lookup_with_env", (void (*)(void))__pyx_f_8pysndlib_3clm_make_table_lookup_with_env, "struct __pyx_obj_8pysndlib_3clm_mus_any *(double, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_table_lookup_with_env *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polywave", (void (*)(void))__pyx_f_8pysndlib_3clm_polywave, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polywave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polywave_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_polywave_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_polywave", (void (*)(void))__pyx_f_8pysndlib_3clm_is_polywave, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polyshape", (void (*)(void))__pyx_f_8pysndlib_3clm_polyshape, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("polyshape_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_polyshape_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_polyshape_unmodulated *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_polyshape", (void (*)(void))__pyx_f_8pysndlib_3clm_is_polyshape, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("triangle_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_triangle_wave, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_triangle_wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("triangle_wave_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_triangle_wave_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_triangle_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_is_triangle_wave, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("square_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_square_wave, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_square_wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_square_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_is_square_wave, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("make_sawtooth_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_make_sawtooth_wave, "struct __pyx_obj_8pysndlib_3clm_mus_any *(double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_make_sawtooth_wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("sawtooth_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_sawtooth_wave, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_sawtooth_wave *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_sawtooth_wave", (void (*)(void))__pyx_f_8pysndlib_3clm_is_sawtooth_wave, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("pulse_train", (void (*)(void))__pyx_f_8pysndlib_3clm_pulse_train, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_pulse_train *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("pulse_train_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_pulse_train_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_pulse_train", (void (*)(void))__pyx_f_8pysndlib_3clm_is_pulse_train, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ncos", (void (*)(void))__pyx_f_8pysndlib_3clm_ncos, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ncos *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_ncos", (void (*)(void))__pyx_f_8pysndlib_3clm_is_ncos, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("nsin", (void (*)(void))__pyx_f_8pysndlib_3clm_nsin, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nsin *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_nsin", (void (*)(void))__pyx_f_8pysndlib_3clm_is_nsin, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("nrxysin", (void (*)(void))__pyx_f_8pysndlib_3clm_nrxysin, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxysin *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_nrxysin", (void (*)(void))__pyx_f_8pysndlib_3clm_is_nrxysin, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("nrxycos", (void (*)(void))__pyx_f_8pysndlib_3clm_nrxycos, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_nrxycos *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_nrxycos", (void (*)(void))__pyx_f_8pysndlib_3clm_is_nrxycos, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rxykcos", (void (*)(void))__pyx_f_8pysndlib_3clm_rxykcos, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxykcos *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_rxykcos", (void (*)(void))__pyx_f_8pysndlib_3clm_is_rxykcos, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rxyksin", (void (*)(void))__pyx_f_8pysndlib_3clm_rxyksin, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rxyksin *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_rxyksin", (void (*)(void))__pyx_f_8pysndlib_3clm_is_rxyksin, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ssb_am", (void (*)(void))__pyx_f_8pysndlib_3clm_ssb_am, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_ssb_am *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ssb_am_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_ssb_am_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_ssb_am", (void (*)(void))__pyx_f_8pysndlib_3clm_is_ssb_am, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wave_train", (void (*)(void))__pyx_f_8pysndlib_3clm_wave_train, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_wave_train *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wave_train_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_wave_train_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_wave_train", (void (*)(void))__pyx_f_8pysndlib_3clm_is_wave_train, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rand", (void (*)(void))__pyx_f_8pysndlib_3clm_rand, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rand_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_rand_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_rand", (void (*)(void))__pyx_f_8pysndlib_3clm_is_rand, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rand_interp", (void (*)(void))__pyx_f_8pysndlib_3clm_rand_interp, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_rand_interp *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rand_interp_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_rand_interp_unmodulated, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_rand_interp", (void (*)(void))__pyx_f_8pysndlib_3clm_is_rand_interp, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("one_pole", (void (*)(void))__pyx_f_8pysndlib_3clm_one_pole, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_one_pole", (void (*)(void))__pyx_f_8pysndlib_3clm_is_one_pole, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("one_zero", (void (*)(void))__pyx_f_8pysndlib_3clm_one_zero, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_one_zero", (void (*)(void))__pyx_f_8pysndlib_3clm_is_one_zero, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("two_pole", (void (*)(void))__pyx_f_8pysndlib_3clm_two_pole, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_two_pole", (void (*)(void))__pyx_f_8pysndlib_3clm_is_two_pole, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("two_zero", (void (*)(void))__pyx_f_8pysndlib_3clm_two_zero, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_two_zero", (void (*)(void))__pyx_f_8pysndlib_3clm_is_two_zero, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("formant", (void (*)(void))__pyx_f_8pysndlib_3clm_formant, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_formant *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_formant", (void (*)(void))__pyx_f_8pysndlib_3clm_is_formant, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("formant_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_formant_bank, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_formant_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_is_formant_bank, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("firmant", (void (*)(void))__pyx_f_8pysndlib_3clm_firmant, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_firmant *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_firmant", (void (*)(void))__pyx_f_8pysndlib_3clm_is_firmant, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("filter", (void (*)(void))__pyx_f_8pysndlib_3clm_filter, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_filter", (void (*)(void))__pyx_f_8pysndlib_3clm_is_filter, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fir_filter", (void (*)(void))__pyx_f_8pysndlib_3clm_fir_filter, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_fir_filter", (void (*)(void))__pyx_f_8pysndlib_3clm_is_fir_filter, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("iir_filter", (void (*)(void))__pyx_f_8pysndlib_3clm_iir_filter, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_iir_filter", (void (*)(void))__pyx_f_8pysndlib_3clm_is_iir_filter, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("delay", (void (*)(void))__pyx_f_8pysndlib_3clm_delay, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_delay *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("delay_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_delay_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_delay", (void (*)(void))__pyx_f_8pysndlib_3clm_is_delay, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tap", (void (*)(void))__pyx_f_8pysndlib_3clm_tap, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_tap *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tap_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_tap_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_tap", (void (*)(void))__pyx_f_8pysndlib_3clm_is_tap, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("delay_tick", (void (*)(void))__pyx_f_8pysndlib_3clm_delay_tick, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("comb", (void (*)(void))__pyx_f_8pysndlib_3clm_comb, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_comb *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_comb", (void (*)(void))__pyx_f_8pysndlib_3clm_is_comb, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("comb_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_comb_bank, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_comb_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_is_comb_bank, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("filtered_comb", (void (*)(void))__pyx_f_8pysndlib_3clm_filtered_comb, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_filtered_comb *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("filtered_comb_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_filtered_comb_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_filtered_comb", (void (*)(void))__pyx_f_8pysndlib_3clm_is_filtered_comb, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("filtered_comb_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_filtered_comb_bank, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_filtered_comb_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_is_filtered_comb_bank, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("notch", (void (*)(void))__pyx_f_8pysndlib_3clm_notch, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_notch *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("notch_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_notch_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_notch", (void (*)(void))__pyx_f_8pysndlib_3clm_is_notch, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("all_pass", (void (*)(void))__pyx_f_8pysndlib_3clm_all_pass, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_all_pass *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_all_pass", (void (*)(void))__pyx_f_8pysndlib_3clm_is_all_pass, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("all_pass_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_all_pass_bank, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_all_pass_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_is_all_pass_bank, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("one_pole_all_pass", (void (*)(void))__pyx_f_8pysndlib_3clm_one_pole_all_pass, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_one_pole_all_pass", (void (*)(void))__pyx_f_8pysndlib_3clm_is_one_pole_all_pass, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("moving_average", (void (*)(void))__pyx_f_8pysndlib_3clm_moving_average, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_moving_average", (void (*)(void))__pyx_f_8pysndlib_3clm_is_moving_average, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("moving_max", (void (*)(void))__pyx_f_8pysndlib_3clm_moving_max, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_moving_max", (void (*)(void))__pyx_f_8pysndlib_3clm_is_moving_max, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("moving_norm", (void (*)(void))__pyx_f_8pysndlib_3clm_moving_norm, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_moving_norm", (void (*)(void))__pyx_f_8pysndlib_3clm_is_moving_norm, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("asymmetric_fm", (void (*)(void))__pyx_f_8pysndlib_3clm_asymmetric_fm, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_asymmetric_fm *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("asymmetric_fm_unmodulated", (void (*)(void))__pyx_f_8pysndlib_3clm_asymmetric_fm_unmodulated, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_asymmetric_fm", (void (*)(void))__pyx_f_8pysndlib_3clm_is_asymmetric_fm, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("file2sample", (void (*)(void))__pyx_f_8pysndlib_3clm_file2sample, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_file2sample *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_file2sample", (void (*)(void))__pyx_f_8pysndlib_3clm_is_file2sample, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("sample2file", (void (*)(void))__pyx_f_8pysndlib_3clm_sample2file, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_sample2file", (void (*)(void))__pyx_f_8pysndlib_3clm_is_sample2file, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("file2frample", (void (*)(void))__pyx_f_8pysndlib_3clm_file2frample, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, long, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_file2frample", (void (*)(void))__pyx_f_8pysndlib_3clm_is_file2frample, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("frample2file", (void (*)(void))__pyx_f_8pysndlib_3clm_frample2file, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, long, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_frample2file", (void (*)(void))__pyx_f_8pysndlib_3clm_is_frample2file, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("continue_frample2file", (void (*)(void))__pyx_f_8pysndlib_3clm_continue_frample2file, "struct __pyx_obj_8pysndlib_3clm_mus_any *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("readin", (void (*)(void))__pyx_f_8pysndlib_3clm_readin, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_readin", (void (*)(void))__pyx_f_8pysndlib_3clm_is_readin, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("src", (void (*)(void))__pyx_f_8pysndlib_3clm_src, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_src *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_src", (void (*)(void))__pyx_f_8pysndlib_3clm_is_src, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("convolve", (void (*)(void))__pyx_f_8pysndlib_3clm_convolve, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_convolve", (void (*)(void))__pyx_f_8pysndlib_3clm_is_convolve, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("granulate", (void (*)(void))__pyx_f_8pysndlib_3clm_granulate, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_granulate", (void (*)(void))__pyx_f_8pysndlib_3clm_is_granulate, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_phase_vocoder", (void (*)(void))__pyx_f_8pysndlib_3clm_is_phase_vocoder, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder_amp_increments", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder_amp_increments, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder_amps", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder_amps, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder_freqs", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder_freqs, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder_phases", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder_phases, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("phase_vocoder_phase_increments", (void (*)(void))__pyx_f_8pysndlib_3clm_phase_vocoder_phase_increments, "PyArrayObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("out_any", (void (*)(void))__pyx_f_8pysndlib_3clm_out_any, "PyObject *(long, double, int, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_out_any *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("outa", (void (*)(void))__pyx_f_8pysndlib_3clm_outa, "PyObject *(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outa *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("outb", (void (*)(void))__pyx_f_8pysndlib_3clm_outb, "PyObject *(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outb *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("outc", (void (*)(void))__pyx_f_8pysndlib_3clm_outc, "PyObject *(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outc *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("outd", (void (*)(void))__pyx_f_8pysndlib_3clm_outd, "PyObject *(long, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_outd *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("in_any", (void (*)(void))__pyx_f_8pysndlib_3clm_in_any, "PyObject *(long, int, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("ina", (void (*)(void))__pyx_f_8pysndlib_3clm_ina, "PyObject *(long, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("inb", (void (*)(void))__pyx_f_8pysndlib_3clm_inb, "PyObject *(long, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("out_bank", (void (*)(void))__pyx_f_8pysndlib_3clm_out_bank, "PyObject *(PyObject *, long, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("locsig", (void (*)(void))__pyx_f_8pysndlib_3clm_locsig, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, long, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_locsig", (void (*)(void))__pyx_f_8pysndlib_3clm_is_locsig, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("locsig_ref", (void (*)(void))__pyx_f_8pysndlib_3clm_locsig_ref, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("locsig_set", (void (*)(void))__pyx_f_8pysndlib_3clm_locsig_set, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("locsig_reverb_ref", (void (*)(void))__pyx_f_8pysndlib_3clm_locsig_reverb_ref, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("locsig_reverb_set", (void (*)(void))__pyx_f_8pysndlib_3clm_locsig_reverb_set, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, int, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("move_locsig", (void (*)(void))__pyx_f_8pysndlib_3clm_move_locsig, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("convolve_files", (void (*)(void))__pyx_f_8pysndlib_3clm_convolve_files, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_convolve_files *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("dcblock", (void (*)(void))__pyx_f_8pysndlib_3clm_dcblock, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("biquad", (void (*)(void))__pyx_f_8pysndlib_3clm_biquad, "double (struct __pyx_obj_8pysndlib_3clm_mus_any *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("is_biquad", (void (*)(void))__pyx_f_8pysndlib_3clm_is_biquad, "int (struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("biquad_set_resonance", (void (*)(void))__pyx_f_8pysndlib_3clm_biquad_set_resonance, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, double, double, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_biquad_set_resonance *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("biquad_set_equal_gain_zeroes", (void (*)(void))__pyx_f_8pysndlib_3clm_biquad_set_equal_gain_zeroes, "PyObject *(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_j0", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_j0, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_j1", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_j1, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_jn", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_jn, "double (int, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_y0", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_y0, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_y1", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_y1, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("bes_yn", (void (*)(void))__pyx_f_8pysndlib_3clm_bes_yn, "double (int, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("edot_product", (void (*)(void))__pyx_f_8pysndlib_3clm_edot_product, "__pyx_t_double_complex (__pyx_t_double_complex, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_edot_product *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_8pysndlib_3clm_mus_any = &__pyx_vtable_8pysndlib_3clm_mus_any;
  __pyx_vtable_8pysndlib_3clm_mus_any.from_ptr = (struct __pyx_obj_8pysndlib_3clm_mus_any *(*)(mus_any *, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_from_ptr *__pyx_optional_args))__pyx_f_8pysndlib_3clm_7mus_any_from_ptr;
  __pyx_vtable_8pysndlib_3clm_mus_any.cache_append = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_cache_append;
  __pyx_vtable_8pysndlib_3clm_mus_any.cache_extend = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, PyObject *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_cache_extend;
  __pyx_vtable_8pysndlib_3clm_mus_any.set_up_data = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_set_up_data *__pyx_optional_args))__pyx_f_8pysndlib_3clm_7mus_any_set_up_data;
  __pyx_vtable_8pysndlib_3clm_mus_any.set_up_xcoeffs = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_set_up_xcoeffs;
  __pyx_vtable_8pysndlib_3clm_mus_any.set_up_ycoeffs = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_set_up_ycoeffs;
  __pyx_vtable_8pysndlib_3clm_mus_any.set_up_pv_data = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_set_up_pv_data;
  __pyx_vtable_8pysndlib_3clm_mus_any.mus_reset = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch))__pyx_f_8pysndlib_3clm_7mus_any_mus_reset;
  __pyx_vtable_8pysndlib_3clm_mus_any.next = (PyObject *(*)(struct __pyx_obj_8pysndlib_3clm_mus_any *, int __pyx_skip_dispatch, struct __pyx_opt_args_8pysndlib_3clm_7mus_any_next *__pyx_optional_args))__pyx_f_8pysndlib_3clm_7mus_any_next;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm_mus_any = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm_mus_any_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm_mus_any)) __PYX_ERR(0, 147, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm_mus_any_spec, __pyx_ptype_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm_mus_any = &__pyx_type_8pysndlib_3clm_mus_any;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm_mus_any->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm_mus_any->tp_dictoffset && __pyx_ptype_8pysndlib_3clm_mus_any->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm_mus_any->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_vtabptr_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mus_any, (PyObject *) __pyx_ptype_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8pysndlib_3clm_mus_any) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  #endif
  __pyx_vtabptr_8pysndlib_3clm_mus_any_array = &__pyx_vtable_8pysndlib_3clm_mus_any_array;
  __pyx_vtable_8pysndlib_3clm_mus_any_array.from_pylist = (struct __pyx_obj_8pysndlib_3clm_mus_any_array *(*)(PyObject *))__pyx_f_8pysndlib_3clm_13mus_any_array_from_pylist;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm_mus_any_array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm_mus_any_array_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm_mus_any_array)) __PYX_ERR(0, 554, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm_mus_any_array_spec, __pyx_ptype_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm_mus_any_array = &__pyx_type_8pysndlib_3clm_mus_any_array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm_mus_any_array->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm_mus_any_array->tp_dictoffset && __pyx_ptype_8pysndlib_3clm_mus_any_array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm_mus_any_array->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_8pysndlib_3clm_mus_any_array, __pyx_vtabptr_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mus_any_array, (PyObject *) __pyx_ptype_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8pysndlib_3clm_mus_any_array) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm_array_readin_gen = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm_array_readin_gen_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm_array_readin_gen)) __PYX_ERR(0, 5399, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm_array_readin_gen_spec, __pyx_ptype_8pysndlib_3clm_array_readin_gen) < 0) __PYX_ERR(0, 5399, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm_array_readin_gen = &__pyx_type_8pysndlib_3clm_array_readin_gen;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm_array_readin_gen) < 0) __PYX_ERR(0, 5399, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm_array_readin_gen->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm_array_readin_gen->tp_dictoffset && __pyx_ptype_8pysndlib_3clm_array_readin_gen->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm_array_readin_gen->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_array_readin_gen, (PyObject *) __pyx_ptype_8pysndlib_3clm_array_readin_gen) < 0) __PYX_ERR(0, 5399, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8pysndlib_3clm_array_readin_gen) < 0) __PYX_ERR(0, 5399, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr)) __PYX_ERR(0, 1088, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr = &__pyx_type_8pysndlib_3clm___pyx_scope_struct__genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct__genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src)) __PYX_ERR(0, 4561, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src) < 0) __PYX_ERR(0, 4561, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_1_make_src;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src) < 0) __PYX_ERR(0, 4561, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_1_make_src->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve)) __PYX_ERR(0, 4628, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve) < 0) __PYX_ERR(0, 4628, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_2_make_convolve;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve) < 0) __PYX_ERR(0, 4628, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_2_make_convolve->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate)) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_3_make_granulate;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_3_make_granulate->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder)) __PYX_ERR(0, 4808, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_4_make_phase_vocoder->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader)) __PYX_ERR(0, 5507, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader) < 0) __PYX_ERR(0, 5507, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_5_array_reader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader) < 0) __PYX_ERR(0, 5507, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_5_array_reader->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb)) __PYX_ERR(0, 5533, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_6_clm_reverb->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator_spec, NULL); if (unlikely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator)) __PYX_ERR(0, 5572, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator_spec, __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator) < 0) __PYX_ERR(0, 5572, __pyx_L1_error)
  #else
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator = &__pyx_type_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator) < 0) __PYX_ERR(0, 5572, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator->tp_dictoffset && __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_8pysndlib_3clm___pyx_scope_struct_7_impulse_generator->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)(&PyType_Type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype___Pyx_EnumMeta = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__Pyx_EnumMeta_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype___Pyx_EnumMeta)) __PYX_ERR(1, 16, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__Pyx_EnumMeta_spec, __pyx_ptype___Pyx_EnumMeta) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  #else
  __pyx_ptype___Pyx_EnumMeta = &__Pyx_EnumMeta;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype___Pyx_EnumMeta->tp_dealloc = (&PyType_Type)->tp_dealloc;
  __pyx_ptype___Pyx_EnumMeta->tp_base = (&PyType_Type);
  __pyx_ptype___Pyx_EnumMeta->tp_new = (&PyType_Type)->tp_new;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype___Pyx_EnumMeta) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype___Pyx_EnumMeta->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___Pyx_EnumMeta->tp_dictoffset && __pyx_ptype___Pyx_EnumMeta->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype___Pyx_EnumMeta->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype___Pyx_EnumMeta) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  #endif
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
  if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  #else
  __pyx_array_type = &__pyx_type___pyx_array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_array_type->tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
  #else
  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_MemviewEnum_type->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
  #endif
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
  if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
  #else
  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_memoryview_type->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
  #endif
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
  #else
  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_memoryviewslice_type->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error)
  __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error)
  __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error)
  __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error)
  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error)
  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error)
  __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error)
  __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error)
  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error)
  __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error)
  __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_clm(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_clm},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "clm",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initclm(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initclm(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_clm(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_clm(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_clm(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  static PyThread_type_lock __pyx_t_9[8];
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  PyObject *__pyx_t_34 = NULL;
  PyObject *__pyx_t_35 = NULL;
  PyObject *__pyx_t_36 = NULL;
  PyObject *__pyx_t_37 = NULL;
  PyObject *__pyx_t_38 = NULL;
  PyObject *__pyx_t_39 = NULL;
  PyObject *__pyx_t_40 = NULL;
  PyObject *__pyx_t_41 = NULL;
  PyObject *__pyx_t_42 = NULL;
  PyObject *__pyx_t_43 = NULL;
  uint64_t __pyx_t_44;
  double __pyx_t_45;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'clm' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("clm", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "clm" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_clm(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pysndlib__clm) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pysndlib.clm")) {
      if (unlikely((PyDict_SetItemString(modules, "pysndlib.clm", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely((__Pyx_modinit_function_export_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "EnumBase":10
 * cdef object __Pyx_OrderedDict
 * 
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 *     __Pyx_OrderedDict = dict
 * else:
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumBase":11
 * 
 * if PY_VERSION_HEX >= 0x03060000:
 *     __Pyx_OrderedDict = dict             # <<<<<<<<<<<<<<
 * else:
 *     from collections import OrderedDict as __Pyx_OrderedDict
 */
    __Pyx_INCREF((PyObject *)(&PyDict_Type));
    __Pyx_XGOTREF(__Pyx_OrderedDict);
    __Pyx_DECREF_SET(__Pyx_OrderedDict, ((PyObject *)(&PyDict_Type)));
    __Pyx_GIVEREF((PyObject *)(&PyDict_Type));

    /* "EnumBase":10
 * cdef object __Pyx_OrderedDict
 * 
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 *     __Pyx_OrderedDict = dict
 * else:
 */
    goto __pyx_L2;
  }

  /* "EnumBase":13
 *     __Pyx_OrderedDict = dict
 * else:
 *     from collections import OrderedDict as __Pyx_OrderedDict             # <<<<<<<<<<<<<<
 * 
 * @cython.internal
 */
  /*else*/ {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_OrderedDict);
    __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_OrderedDict)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XGOTREF(__Pyx_OrderedDict);
    __Pyx_DECREF_SET(__Pyx_OrderedDict, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L2:;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumMeta_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Pyx_EnumMeta___reduce_cython, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype___Pyx_EnumMeta, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype___Pyx_EnumMeta);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle___Pyx_EnumMeta, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle___Pyx_EnumMeta__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumMeta_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Pyx_EnumMeta___setstate_cython, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype___Pyx_EnumMeta, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype___Pyx_EnumMeta);

  /* "EnumBase":27
 * 
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):             # <<<<<<<<<<<<<<
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)(&PyInt_Type));
  __Pyx_GIVEREF((PyObject *)(&PyInt_Type));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(1, 27, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(((PyObject *)__pyx_ptype___Pyx_EnumMeta), __pyx_t_3, __pyx_n_s_Pyx_EnumBase, __pyx_n_s_Pyx_EnumBase, __pyx_t_5, __pyx_n_s_EnumBase, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_3 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(1, 27, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumBase":28
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Pyx_EnumBase___new, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__77);
  if (__Pyx_SetNewInClass(__pyx_t_6, __pyx_n_s_new, __pyx_t_4) < 0) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumBase":39
 *         cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_3__repr__, 0, __pyx_n_s_Pyx_EnumBase___repr, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumBase":41
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_5__str__, 0, __pyx_n_s_Pyx_EnumBase___str, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(1, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumBase":27
 * 
 * cdef object __Pyx_EnumBase
 * class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):             # <<<<<<<<<<<<<<
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject *)__pyx_ptype___Pyx_EnumMeta), __pyx_n_s_Pyx_EnumBase, __pyx_t_3, __pyx_t_6, __pyx_t_5, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(__Pyx_EnumBase);
  __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "EnumBase":44
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 * if PY_VERSION_HEX >= 0x03040000:             # <<<<<<<<<<<<<<
 *     from enum import IntEnum as __Pyx_EnumBase
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03040000);
  if (__pyx_t_2) {

    /* "EnumBase":45
 * 
 * if PY_VERSION_HEX >= 0x03040000:
 *     from enum import IntEnum as __Pyx_EnumBase             # <<<<<<<<<<<<<<
 * 
 * cdef object __Pyx_FlagBase
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_IntEnum);
    __Pyx_GIVEREF(__pyx_n_s_IntEnum);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_IntEnum)) __PYX_ERR(1, 45, __pyx_L1_error);
    __pyx_t_5 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XGOTREF(__Pyx_EnumBase);
    __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "EnumBase":44
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 * if PY_VERSION_HEX >= 0x03040000:             # <<<<<<<<<<<<<<
 *     from enum import IntEnum as __Pyx_EnumBase
 * 
 */
  }

  /* "EnumBase":48
 * 
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):             # <<<<<<<<<<<<<<
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF((PyObject *)(&PyInt_Type));
  __Pyx_GIVEREF((PyObject *)(&PyInt_Type));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(1, 48, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(((PyObject *)__pyx_ptype___Pyx_EnumMeta), __pyx_t_3, __pyx_n_s_Pyx_FlagBase, __pyx_n_s_Pyx_FlagBase, __pyx_t_6, __pyx_n_s_EnumBase, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(1, 48, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "EnumBase":49
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):
 *     def __new__(cls, value, name=None):             # <<<<<<<<<<<<<<
 *         for v in cls:
 *             if v == value:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_FlagBase_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Pyx_FlagBase___new, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__77);
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(1, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "EnumBase":62
 *             cls.__members__[name] = res
 *         return res
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_FlagBase_3__repr__, 0, __pyx_n_s_Pyx_FlagBase___repr, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "EnumBase":64
 *     def __repr__(self):
 *         return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_FlagBase_5__str__, 0, __pyx_n_s_Pyx_FlagBase___str, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "EnumBase":48
 * 
 * cdef object __Pyx_FlagBase
 * class __Pyx_FlagBase(int, metaclass=__Pyx_EnumMeta):             # <<<<<<<<<<<<<<
 *     def __new__(cls, value, name=None):
 *         for v in cls:
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject *)__pyx_ptype___Pyx_EnumMeta), __pyx_n_s_Pyx_FlagBase, __pyx_t_3, __pyx_t_4, __pyx_t_6, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XGOTREF(__Pyx_FlagBase);
  __Pyx_DECREF_SET(__Pyx_FlagBase, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "EnumBase":67
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 *     from enum import IntFlag as __Pyx_FlagBase
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumBase":68
 * 
 * if PY_VERSION_HEX >= 0x03060000:
 *     from enum import IntFlag as __Pyx_FlagBase             # <<<<<<<<<<<<<<
 * 
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_IntFlag);
    __Pyx_GIVEREF(__pyx_n_s_IntFlag);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_IntFlag)) __PYX_ERR(1, 68, __pyx_L1_error);
    __pyx_t_6 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_IntFlag); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XGOTREF(__Pyx_FlagBase);
    __Pyx_DECREF_SET(__Pyx_FlagBase, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "EnumBase":67
 *         return "%s.%s" % (self.__class__.__name__, self.name)
 * 
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 *     from enum import IntFlag as __Pyx_FlagBase
 * 
 */
  }

  /* "(tree fragment)":1
 * def __pyx_unpickle___Pyx_EnumMeta(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta, 0, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "View.MemoryView":99
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     if __import__("sys").version_info >= (3, 3):
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "View.MemoryView":100
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:
 *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 *     else:
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 100, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 100, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_tuple__87, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 100, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 100, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_2) {

        /* "View.MemoryView":101
 * try:
 *     if __import__("sys").version_info >= (3, 3):
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
 *     else:
 *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
 */
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 101, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_abc); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 101, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 101, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
        __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;

        /* "View.MemoryView":100
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:
 *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 *     else:
 */
        goto __pyx_L11;
      }

      /* "View.MemoryView":103
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 *     else:
 *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
 * except:
 * 
 */
      /*else*/ {
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 103, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 103, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
        __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L11:;

      /* "View.MemoryView":99
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     if __import__("sys").version_info >= (3, 3):
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":104
 *     else:
 *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
 * except:             # <<<<<<<<<<<<<<
 * 
 *     __pyx_collections_abc_Sequence = None
 */
    /*except:*/ {
      __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(1, 104, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);

      /* "View.MemoryView":106
 * except:
 * 
 *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
      __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_exception_handled;
    }

    /* "View.MemoryView":99
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     if __import__("sys").version_info >= (3, 3):
 *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 */
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_7, __pyx_t_8);
    __pyx_L10_try_end:;
  }

  /* "View.MemoryView":241
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "View.MemoryView":242
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 242, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count_2, __pyx_t_4) < 0) __PYX_ERR(1, 242, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      PyType_Modified(__pyx_array_type);

      /* "View.MemoryView":243
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_4) < 0) __PYX_ERR(1, 243, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      PyType_Modified(__pyx_array_type);

      /* "View.MemoryView":241
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L19_try_end;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":244
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L15_exception_handled;
    }
    __pyx_L15_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_1);
    __pyx_L19_try_end:;
  }

  /* "View.MemoryView":309
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":310
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":311
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":314
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":315
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":323
 * 
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
 */
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":324
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
 */
  __pyx_t_9[0] = PyThread_allocate_lock();
  __pyx_t_9[1] = PyThread_allocate_lock();
  __pyx_t_9[2] = PyThread_allocate_lock();
  __pyx_t_9[3] = PyThread_allocate_lock();
  __pyx_t_9[4] = PyThread_allocate_lock();
  __pyx_t_9[5] = PyThread_allocate_lock();
  __pyx_t_9[6] = PyThread_allocate_lock();
  __pyx_t_9[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_9, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":982
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "View.MemoryView":983
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 983, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count_2, __pyx_t_4) < 0) __PYX_ERR(1, 983, __pyx_L20_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      PyType_Modified(__pyx_memoryviewslice_type);

      /* "View.MemoryView":984
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 984, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_4) < 0) __PYX_ERR(1, 984, __pyx_L20_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      PyType_Modified(__pyx_memoryviewslice_type);

      /* "View.MemoryView":982
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":985
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L21_exception_handled;
    }
    __pyx_L21_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_7, __pyx_t_8);
    __pyx_L25_try_end:;
  }

  /* "View.MemoryView":988
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "View.MemoryView":989
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 989, __pyx_L26_error)
      if (__pyx_t_2) {

        /* "View.MemoryView":993
 * 
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence.register(array)
 * except:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 993, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "View.MemoryView":994
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
 * except:
 *     pass  # ignore failure, it's a minor issue
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 994, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "View.MemoryView":989
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
 */
      }

      /* "View.MemoryView":988
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L31_try_end;
    __pyx_L26_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":995
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)
 * except:             # <<<<<<<<<<<<<<
 *     pass  # ignore failure, it's a minor issue
 * 
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L27_exception_handled;
    }
    __pyx_L27_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_1);
    __pyx_L31_try_end:;
  }

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "EnumType":76
 *     object __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(Interp value)
 * 
 * cdef dict __Pyx_globals = globals()             # <<<<<<<<<<<<<<
 * if PY_VERSION_HEX >= 0x03060000:
 * 
 */
  __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_4))) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_XGOTREF(__Pyx_globals);
  __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_4));
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumType":81
 * 
 *     Interp = __Pyx_FlagBase('Interp', [
 *         ('NONE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE)),             # <<<<<<<<<<<<<<
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),
 *         ('SINUSOIDAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL)),
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_NONE);
    __Pyx_GIVEREF(__pyx_n_s_NONE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_NONE)) __PYX_ERR(1, 81, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(1, 81, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":82
 *     Interp = __Pyx_FlagBase('Interp', [
 *         ('NONE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE)),
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),             # <<<<<<<<<<<<<<
 *         ('SINUSOIDAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL)),
 *         ('ALL_PASS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS)),
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_LINEAR);
    __Pyx_GIVEREF(__pyx_n_s_LINEAR);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_LINEAR)) __PYX_ERR(1, 82, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(1, 82, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":83
 *         ('NONE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE)),
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),
 *         ('SINUSOIDAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL)),             # <<<<<<<<<<<<<<
 *         ('ALL_PASS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS)),
 *         ('LAGRANGE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE)),
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_SINUSOIDAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_s_SINUSOIDAL);
    __Pyx_GIVEREF(__pyx_n_s_SINUSOIDAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SINUSOIDAL)) __PYX_ERR(1, 83, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(1, 83, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":84
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),
 *         ('SINUSOIDAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL)),
 *         ('ALL_PASS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS)),             # <<<<<<<<<<<<<<
 *         ('LAGRANGE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE)),
 *         ('BEZIER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER)),
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_ALL_PASS); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_n_s_ALL_PASS);
    __Pyx_GIVEREF(__pyx_n_s_ALL_PASS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_ALL_PASS)) __PYX_ERR(1, 84, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":85
 *         ('SINUSOIDAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL)),
 *         ('ALL_PASS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS)),
 *         ('LAGRANGE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE)),             # <<<<<<<<<<<<<<
 *         ('BEZIER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER)),
 *         ('HERMITE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE)),
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_LAGRANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_n_s_LAGRANGE);
    __Pyx_GIVEREF(__pyx_n_s_LAGRANGE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_LAGRANGE)) __PYX_ERR(1, 85, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4)) __PYX_ERR(1, 85, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":86
 *         ('ALL_PASS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS)),
 *         ('LAGRANGE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE)),
 *         ('BEZIER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER)),             # <<<<<<<<<<<<<<
 *         ('HERMITE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE)),
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_BEZIER); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_n_s_BEZIER);
    __Pyx_GIVEREF(__pyx_n_s_BEZIER);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_BEZIER)) __PYX_ERR(1, 86, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4)) __PYX_ERR(1, 86, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":87
 *         ('LAGRANGE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE)),
 *         ('BEZIER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER)),
 *         ('HERMITE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE)),             # <<<<<<<<<<<<<<
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 */
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_HERMITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_n_s_HERMITE);
    __Pyx_GIVEREF(__pyx_n_s_HERMITE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_HERMITE)) __PYX_ERR(1, 87, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_4)) __PYX_ERR(1, 87, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":80
 * 
 * 
 *     Interp = __Pyx_FlagBase('Interp', [             # <<<<<<<<<<<<<<
 *         ('NONE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE)),
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),
 */
    __pyx_t_4 = PyList_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_5)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_11)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 6, __pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_n_s_Interp);
    __Pyx_GIVEREF(__pyx_n_s_Interp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_Interp)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "EnumType":89
 *         ('HERMITE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE)),
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))             # <<<<<<<<<<<<<<
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(1, 89, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyDict_GetItemDefault(__Pyx_globals, __pyx_n_s_module, __pyx_n_s_pysndlib_clm); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_module_2, __pyx_t_12) < 0) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":80
 * 
 * 
 *     Interp = __Pyx_FlagBase('Interp', [             # <<<<<<<<<<<<<<
 *         ('NONE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE)),
 *         ('LINEAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR)),
 */
    __pyx_t_12 = __Pyx_PyObject_Call(__Pyx_FlagBase, __pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Interp, __pyx_t_12) < 0) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":91
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = (PY_VERSION_HEX >= 0x030B0000);
    if (__pyx_t_2) {

      /* "EnumType":96
 * 
 * 
 *         Interp._member_names_ = list(Interp.__members__)             # <<<<<<<<<<<<<<
 * 
 *     Interp.__doc__ = '\n    various interpolation types\n    '
 */
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Interp); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_members); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_member_names, __pyx_t_12) < 0) __PYX_ERR(1, 96, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "EnumType":91
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    }

    /* "EnumType":98
 *         Interp._member_names_ = list(Interp.__members__)
 * 
 *     Interp.__doc__ = '\n    various interpolation types\n    '             # <<<<<<<<<<<<<<
 *     __Pyx_globals['NONE'] = Interp.NONE
 *     __Pyx_globals['LINEAR'] = Interp.LINEAR
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_doc, __pyx_kp_s_various_interpolation_types) < 0) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":99
 * 
 *     Interp.__doc__ = '\n    various interpolation types\n    '
 *     __Pyx_globals['NONE'] = Interp.NONE             # <<<<<<<<<<<<<<
 *     __Pyx_globals['LINEAR'] = Interp.LINEAR
 *     __Pyx_globals['SINUSOIDAL'] = Interp.SINUSOIDAL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NONE); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 99, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_NONE, __pyx_t_12) < 0))) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":100
 *     Interp.__doc__ = '\n    various interpolation types\n    '
 *     __Pyx_globals['NONE'] = Interp.NONE
 *     __Pyx_globals['LINEAR'] = Interp.LINEAR             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SINUSOIDAL'] = Interp.SINUSOIDAL
 *     __Pyx_globals['ALL_PASS'] = Interp.ALL_PASS
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Interp); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LINEAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 100, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_LINEAR, __pyx_t_4) < 0))) __PYX_ERR(1, 100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":101
 *     __Pyx_globals['NONE'] = Interp.NONE
 *     __Pyx_globals['LINEAR'] = Interp.LINEAR
 *     __Pyx_globals['SINUSOIDAL'] = Interp.SINUSOIDAL             # <<<<<<<<<<<<<<
 *     __Pyx_globals['ALL_PASS'] = Interp.ALL_PASS
 *     __Pyx_globals['LAGRANGE'] = Interp.LAGRANGE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SINUSOIDAL); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 101, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SINUSOIDAL, __pyx_t_12) < 0))) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":102
 *     __Pyx_globals['LINEAR'] = Interp.LINEAR
 *     __Pyx_globals['SINUSOIDAL'] = Interp.SINUSOIDAL
 *     __Pyx_globals['ALL_PASS'] = Interp.ALL_PASS             # <<<<<<<<<<<<<<
 *     __Pyx_globals['LAGRANGE'] = Interp.LAGRANGE
 *     __Pyx_globals['BEZIER'] = Interp.BEZIER
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Interp); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ALL_PASS); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 102, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_ALL_PASS, __pyx_t_4) < 0))) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":103
 *     __Pyx_globals['SINUSOIDAL'] = Interp.SINUSOIDAL
 *     __Pyx_globals['ALL_PASS'] = Interp.ALL_PASS
 *     __Pyx_globals['LAGRANGE'] = Interp.LAGRANGE             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BEZIER'] = Interp.BEZIER
 *     __Pyx_globals['HERMITE'] = Interp.HERMITE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LAGRANGE); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 103, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_LAGRANGE, __pyx_t_12) < 0))) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":104
 *     __Pyx_globals['ALL_PASS'] = Interp.ALL_PASS
 *     __Pyx_globals['LAGRANGE'] = Interp.LAGRANGE
 *     __Pyx_globals['BEZIER'] = Interp.BEZIER             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HERMITE'] = Interp.HERMITE
 * else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Interp); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_BEZIER); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 104, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BEZIER, __pyx_t_4) < 0))) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":105
 *     __Pyx_globals['LAGRANGE'] = Interp.LAGRANGE
 *     __Pyx_globals['BEZIER'] = Interp.BEZIER
 *     __Pyx_globals['HERMITE'] = Interp.HERMITE             # <<<<<<<<<<<<<<
 * else:
 *     class Interp(__Pyx_FlagBase):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_HERMITE); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 105, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HERMITE, __pyx_t_12) < 0))) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L33;
  }

  /* "EnumType":107
 *     __Pyx_globals['HERMITE'] = Interp.HERMITE
 * else:
 *     class Interp(__Pyx_FlagBase):             # <<<<<<<<<<<<<<
 *         '\n    various interpolation types\n    '
 *     __Pyx_globals['NONE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE), 'NONE')
 */
  /*else*/ {
    __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__Pyx_FlagBase);
    __Pyx_GIVEREF(__Pyx_FlagBase);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __Pyx_FlagBase)) __PYX_ERR(1, 107, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_n_s_Interp, __pyx_n_s_Interp, (PyObject *) NULL, __pyx_n_s_EnumType, __pyx_kp_s_various_interpolation_types); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_4 != __pyx_t_12) {
      if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(1, 107, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_n_s_Interp, __pyx_t_4, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Interp, __pyx_t_12) < 0) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":109
 *     class Interp(__Pyx_FlagBase):
 *         '\n    various interpolation types\n    '
 *     __Pyx_globals['NONE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE), 'NONE')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['LINEAR'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR), 'LINEAR')
 *     __Pyx_globals['SINUSOIDAL'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL), 'SINUSOIDAL')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(1, 109, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_NONE);
    __Pyx_GIVEREF(__pyx_n_s_NONE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_NONE)) __PYX_ERR(1, 109, __pyx_L1_error);
    __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 109, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_NONE, __pyx_t_13) < 0))) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":110
 *         '\n    various interpolation types\n    '
 *     __Pyx_globals['NONE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE), 'NONE')
 *     __Pyx_globals['LINEAR'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR), 'LINEAR')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SINUSOIDAL'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL), 'SINUSOIDAL')
 *     __Pyx_globals['ALL_PASS'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS), 'ALL_PASS')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Interp); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11)) __PYX_ERR(1, 110, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_LINEAR);
    __Pyx_GIVEREF(__pyx_n_s_LINEAR);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_LINEAR)) __PYX_ERR(1, 110, __pyx_L1_error);
    __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 110, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_LINEAR, __pyx_t_11) < 0))) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "EnumType":111
 *     __Pyx_globals['NONE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(NONE), 'NONE')
 *     __Pyx_globals['LINEAR'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR), 'LINEAR')
 *     __Pyx_globals['SINUSOIDAL'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL), 'SINUSOIDAL')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['ALL_PASS'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS), 'ALL_PASS')
 *     __Pyx_globals['LAGRANGE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE), 'LAGRANGE')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Interp); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_SINUSOIDAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4)) __PYX_ERR(1, 111, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_SINUSOIDAL);
    __Pyx_GIVEREF(__pyx_n_s_SINUSOIDAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_SINUSOIDAL)) __PYX_ERR(1, 111, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 111, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SINUSOIDAL, __pyx_t_4) < 0))) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":112
 *     __Pyx_globals['LINEAR'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LINEAR), 'LINEAR')
 *     __Pyx_globals['SINUSOIDAL'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL), 'SINUSOIDAL')
 *     __Pyx_globals['ALL_PASS'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS), 'ALL_PASS')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['LAGRANGE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE), 'LAGRANGE')
 *     __Pyx_globals['BEZIER'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER), 'BEZIER')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_ALL_PASS); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(1, 112, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_ALL_PASS);
    __Pyx_GIVEREF(__pyx_n_s_ALL_PASS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_ALL_PASS)) __PYX_ERR(1, 112, __pyx_L1_error);
    __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 112, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_ALL_PASS, __pyx_t_13) < 0))) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":113
 *     __Pyx_globals['SINUSOIDAL'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(SINUSOIDAL), 'SINUSOIDAL')
 *     __Pyx_globals['ALL_PASS'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS), 'ALL_PASS')
 *     __Pyx_globals['LAGRANGE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE), 'LAGRANGE')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BEZIER'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER), 'BEZIER')
 *     __Pyx_globals['HERMITE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE), 'HERMITE')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Interp); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_LAGRANGE); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11)) __PYX_ERR(1, 113, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_LAGRANGE);
    __Pyx_GIVEREF(__pyx_n_s_LAGRANGE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_LAGRANGE)) __PYX_ERR(1, 113, __pyx_L1_error);
    __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 113, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_LAGRANGE, __pyx_t_11) < 0))) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "EnumType":114
 *     __Pyx_globals['ALL_PASS'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(ALL_PASS), 'ALL_PASS')
 *     __Pyx_globals['LAGRANGE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE), 'LAGRANGE')
 *     __Pyx_globals['BEZIER'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER), 'BEZIER')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HERMITE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE), 'HERMITE')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Interp); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_BEZIER); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4)) __PYX_ERR(1, 114, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BEZIER);
    __Pyx_GIVEREF(__pyx_n_s_BEZIER);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_BEZIER)) __PYX_ERR(1, 114, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 114, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BEZIER, __pyx_t_4) < 0))) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":115
 *     __Pyx_globals['LAGRANGE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(LAGRANGE), 'LAGRANGE')
 *     __Pyx_globals['BEZIER'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(BEZIER), 'BEZIER')
 *     __Pyx_globals['HERMITE'] = Interp(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(HERMITE), 'HERMITE')             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(__pyx_e_8pysndlib_3clm_HERMITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(1, 115, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_HERMITE);
    __Pyx_GIVEREF(__pyx_n_s_HERMITE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_HERMITE)) __PYX_ERR(1, 115, __pyx_L1_error);
    __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 115, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HERMITE, __pyx_t_13) < 0))) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_L33:;

  /* "EnumType":76
 *     object __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(Polynomial value)
 * 
 * cdef dict __Pyx_globals = globals()             # <<<<<<<<<<<<<<
 * if PY_VERSION_HEX >= 0x03060000:
 * 
 */
  __pyx_t_13 = __Pyx_Globals(); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (!(likely(PyDict_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_13))) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_XGOTREF(__Pyx_globals);
  __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_13));
  __Pyx_GIVEREF(__pyx_t_13);
  __pyx_t_13 = 0;

  /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumType":81
 * 
 *     Polynomial = __Pyx_FlagBase('Polynomial', [
 *         ('EITHER_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND)),             # <<<<<<<<<<<<<<
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),
 *         ('SECOND_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND)),
 */
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_EITHER_KIND); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_n_s_EITHER_KIND);
    __Pyx_GIVEREF(__pyx_n_s_EITHER_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_EITHER_KIND)) __PYX_ERR(1, 81, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_13)) __PYX_ERR(1, 81, __pyx_L1_error);
    __pyx_t_13 = 0;

    /* "EnumType":82
 *     Polynomial = __Pyx_FlagBase('Polynomial', [
 *         ('EITHER_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND)),
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),             # <<<<<<<<<<<<<<
 *         ('SECOND_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND)),
 *         ('BOTH_KINDS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS)),
 */
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_FIRST_KIND); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_FIRST_KIND);
    __Pyx_GIVEREF(__pyx_n_s_FIRST_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_FIRST_KIND)) __PYX_ERR(1, 82, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_13)) __PYX_ERR(1, 82, __pyx_L1_error);
    __pyx_t_13 = 0;

    /* "EnumType":83
 *         ('EITHER_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND)),
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),
 *         ('SECOND_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND)),             # <<<<<<<<<<<<<<
 *         ('BOTH_KINDS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS)),
 * 
 */
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_SECOND_KIND); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_n_s_SECOND_KIND);
    __Pyx_GIVEREF(__pyx_n_s_SECOND_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_SECOND_KIND)) __PYX_ERR(1, 83, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13)) __PYX_ERR(1, 83, __pyx_L1_error);
    __pyx_t_13 = 0;

    /* "EnumType":84
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),
 *         ('SECOND_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND)),
 *         ('BOTH_KINDS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS)),             # <<<<<<<<<<<<<<
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 */
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_BOTH_KINDS); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_n_s_BOTH_KINDS);
    __Pyx_GIVEREF(__pyx_n_s_BOTH_KINDS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_BOTH_KINDS)) __PYX_ERR(1, 84, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_13)) __PYX_ERR(1, 84, __pyx_L1_error);
    __pyx_t_13 = 0;

    /* "EnumType":80
 * 
 * 
 *     Polynomial = __Pyx_FlagBase('Polynomial', [             # <<<<<<<<<<<<<<
 *         ('EITHER_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND)),
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),
 */
    __pyx_t_13 = PyList_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 2, __pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 3, __pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_11 = 0;
    __pyx_t_4 = 0;
    __pyx_t_12 = 0;
    __pyx_t_10 = 0;
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_n_s_Polynomial);
    __Pyx_GIVEREF(__pyx_n_s_Polynomial);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_Polynomial)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_13 = 0;

    /* "EnumType":86
 *         ('BOTH_KINDS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS)),
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))             # <<<<<<<<<<<<<<
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:
 */
    __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(1, 86, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyDict_GetItemDefault(__Pyx_globals, __pyx_n_s_module, __pyx_n_s_pysndlib_clm); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_module_2, __pyx_t_12) < 0) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":80
 * 
 * 
 *     Polynomial = __Pyx_FlagBase('Polynomial', [             # <<<<<<<<<<<<<<
 *         ('EITHER_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND)),
 *         ('FIRST_KIND', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND)),
 */
    __pyx_t_12 = __Pyx_PyObject_Call(__Pyx_FlagBase, __pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Polynomial, __pyx_t_12) < 0) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":88
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = (PY_VERSION_HEX >= 0x030B0000);
    if (__pyx_t_2) {

      /* "EnumType":93
 * 
 * 
 *         Polynomial._member_names_ = list(Polynomial.__members__)             # <<<<<<<<<<<<<<
 * 
 *     Polynomial.__doc__ = '\n    used for polynomial based gens \n    '
 */
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_members); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PySequence_ListKeepNew(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_13, __pyx_n_s_member_names, __pyx_t_12) < 0) __PYX_ERR(1, 93, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "EnumType":88
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    }

    /* "EnumType":95
 *         Polynomial._member_names_ = list(Polynomial.__members__)
 * 
 *     Polynomial.__doc__ = '\n    used for polynomial based gens \n    '             # <<<<<<<<<<<<<<
 *     __Pyx_globals['EITHER_KIND'] = Polynomial.EITHER_KIND
 *     __Pyx_globals['FIRST_KIND'] = Polynomial.FIRST_KIND
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_13, __pyx_n_s_doc, __pyx_kp_s_used_for_polynomial_based_gens) < 0) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":96
 * 
 *     Polynomial.__doc__ = '\n    used for polynomial based gens \n    '
 *     __Pyx_globals['EITHER_KIND'] = Polynomial.EITHER_KIND             # <<<<<<<<<<<<<<
 *     __Pyx_globals['FIRST_KIND'] = Polynomial.FIRST_KIND
 *     __Pyx_globals['SECOND_KIND'] = Polynomial.SECOND_KIND
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_EITHER_KIND); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 96, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_EITHER_KIND, __pyx_t_12) < 0))) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":97
 *     Polynomial.__doc__ = '\n    used for polynomial based gens \n    '
 *     __Pyx_globals['EITHER_KIND'] = Polynomial.EITHER_KIND
 *     __Pyx_globals['FIRST_KIND'] = Polynomial.FIRST_KIND             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SECOND_KIND'] = Polynomial.SECOND_KIND
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial.BOTH_KINDS
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_FIRST_KIND); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 97, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_FIRST_KIND, __pyx_t_13) < 0))) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":98
 *     __Pyx_globals['EITHER_KIND'] = Polynomial.EITHER_KIND
 *     __Pyx_globals['FIRST_KIND'] = Polynomial.FIRST_KIND
 *     __Pyx_globals['SECOND_KIND'] = Polynomial.SECOND_KIND             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial.BOTH_KINDS
 * else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_SECOND_KIND); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 98, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SECOND_KIND, __pyx_t_12) < 0))) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":99
 *     __Pyx_globals['FIRST_KIND'] = Polynomial.FIRST_KIND
 *     __Pyx_globals['SECOND_KIND'] = Polynomial.SECOND_KIND
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial.BOTH_KINDS             # <<<<<<<<<<<<<<
 * else:
 *     class Polynomial(__Pyx_FlagBase):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_BOTH_KINDS); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 99, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BOTH_KINDS, __pyx_t_13) < 0))) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L35;
  }

  /* "EnumType":101
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial.BOTH_KINDS
 * else:
 *     class Polynomial(__Pyx_FlagBase):             # <<<<<<<<<<<<<<
 *         '\n    used for polynomial based gens \n    '
 *     __Pyx_globals['EITHER_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND), 'EITHER_KIND')
 */
  /*else*/ {
    __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__Pyx_FlagBase);
    __Pyx_GIVEREF(__Pyx_FlagBase);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __Pyx_FlagBase)) __PYX_ERR(1, 101, __pyx_L1_error);
    __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_12, __pyx_n_s_Polynomial, __pyx_n_s_Polynomial, (PyObject *) NULL, __pyx_n_s_EnumType, __pyx_kp_s_used_for_polynomial_based_gens); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_12 != __pyx_t_13) {
      if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(1, 101, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_n_s_Polynomial, __pyx_t_12, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Polynomial, __pyx_t_13) < 0) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":103
 *     class Polynomial(__Pyx_FlagBase):
 *         '\n    used for polynomial based gens \n    '
 *     __Pyx_globals['EITHER_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND), 'EITHER_KIND')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['FIRST_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND), 'FIRST_KIND')
 *     __Pyx_globals['SECOND_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND), 'SECOND_KIND')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_EITHER_KIND); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_EITHER_KIND);
    __Pyx_GIVEREF(__pyx_n_s_EITHER_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_EITHER_KIND)) __PYX_ERR(1, 103, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 103, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_EITHER_KIND, __pyx_t_10) < 0))) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":104
 *         '\n    used for polynomial based gens \n    '
 *     __Pyx_globals['EITHER_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND), 'EITHER_KIND')
 *     __Pyx_globals['FIRST_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND), 'FIRST_KIND')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SECOND_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND), 'SECOND_KIND')
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS), 'BOTH_KINDS')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_FIRST_KIND); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4)) __PYX_ERR(1, 104, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_FIRST_KIND);
    __Pyx_GIVEREF(__pyx_n_s_FIRST_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_n_s_FIRST_KIND)) __PYX_ERR(1, 104, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 104, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_FIRST_KIND, __pyx_t_4) < 0))) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":105
 *     __Pyx_globals['EITHER_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(EITHER_KIND), 'EITHER_KIND')
 *     __Pyx_globals['FIRST_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND), 'FIRST_KIND')
 *     __Pyx_globals['SECOND_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND), 'SECOND_KIND')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS), 'BOTH_KINDS')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_SECOND_KIND); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12)) __PYX_ERR(1, 105, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_SECOND_KIND);
    __Pyx_GIVEREF(__pyx_n_s_SECOND_KIND);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_SECOND_KIND)) __PYX_ERR(1, 105, __pyx_L1_error);
    __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 105, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SECOND_KIND, __pyx_t_12) < 0))) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":106
 *     __Pyx_globals['FIRST_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(FIRST_KIND), 'FIRST_KIND')
 *     __Pyx_globals['SECOND_KIND'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(SECOND_KIND), 'SECOND_KIND')
 *     __Pyx_globals['BOTH_KINDS'] = Polynomial(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(BOTH_KINDS), 'BOTH_KINDS')             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Polynomial); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(__pyx_e_8pysndlib_3clm_BOTH_KINDS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10)) __PYX_ERR(1, 106, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BOTH_KINDS);
    __Pyx_GIVEREF(__pyx_n_s_BOTH_KINDS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_BOTH_KINDS)) __PYX_ERR(1, 106, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 106, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BOTH_KINDS, __pyx_t_10) < 0))) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_L35:;

  /* "EnumType":76
 *     object __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(Spectrum value)
 * 
 * cdef dict __Pyx_globals = globals()             # <<<<<<<<<<<<<<
 * if PY_VERSION_HEX >= 0x03060000:
 * 
 */
  __pyx_t_10 = __Pyx_Globals(); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_10))) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_XGOTREF(__Pyx_globals);
  __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_10));
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;

  /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumType":81
 * 
 *     Spectrum = __Pyx_FlagBase('Spectrum', [
 *         ('IN_DB', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB)),             # <<<<<<<<<<<<<<
 *         ('NORMALIZED', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED)),
 *         ('RAW', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_IN_DB); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_IN_DB);
    __Pyx_GIVEREF(__pyx_n_s_IN_DB);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_IN_DB)) __PYX_ERR(1, 81, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10)) __PYX_ERR(1, 81, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":82
 *     Spectrum = __Pyx_FlagBase('Spectrum', [
 *         ('IN_DB', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB)),
 *         ('NORMALIZED', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED)),             # <<<<<<<<<<<<<<
 *         ('RAW', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW)),
 * 
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_NORMALIZED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_n_s_NORMALIZED);
    __Pyx_GIVEREF(__pyx_n_s_NORMALIZED);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_NORMALIZED)) __PYX_ERR(1, 82, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10)) __PYX_ERR(1, 82, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":83
 *         ('IN_DB', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB)),
 *         ('NORMALIZED', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED)),
 *         ('RAW', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW)),             # <<<<<<<<<<<<<<
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_RAW); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_n_s_RAW);
    __Pyx_GIVEREF(__pyx_n_s_RAW);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_RAW)) __PYX_ERR(1, 83, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10)) __PYX_ERR(1, 83, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":80
 * 
 * 
 *     Spectrum = __Pyx_FlagBase('Spectrum', [             # <<<<<<<<<<<<<<
 *         ('IN_DB', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB)),
 *         ('NORMALIZED', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED)),
 */
    __pyx_t_10 = PyList_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_n_s_Spectrum);
    __Pyx_GIVEREF(__pyx_n_s_Spectrum);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_Spectrum)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":85
 *         ('RAW', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW)),
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))             # <<<<<<<<<<<<<<
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:
 */
    __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(1, 85, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyDict_GetItemDefault(__Pyx_globals, __pyx_n_s_module, __pyx_n_s_pysndlib_clm); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_module_2, __pyx_t_12) < 0) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":80
 * 
 * 
 *     Spectrum = __Pyx_FlagBase('Spectrum', [             # <<<<<<<<<<<<<<
 *         ('IN_DB', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB)),
 *         ('NORMALIZED', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED)),
 */
    __pyx_t_12 = __Pyx_PyObject_Call(__Pyx_FlagBase, __pyx_t_13, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Spectrum, __pyx_t_12) < 0) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":87
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = (PY_VERSION_HEX >= 0x030B0000);
    if (__pyx_t_2) {

      /* "EnumType":92
 * 
 * 
 *         Spectrum._member_names_ = list(Spectrum.__members__)             # <<<<<<<<<<<<<<
 * 
 *     Spectrum.__doc__ = '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 */
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_members); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PySequence_ListKeepNew(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_10, __pyx_n_s_member_names, __pyx_t_12) < 0) __PYX_ERR(1, 92, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "EnumType":87
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    }

    /* "EnumType":94
 *         Spectrum._member_names_ = list(Spectrum.__members__)
 * 
 *     Spectrum.__doc__ = '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '             # <<<<<<<<<<<<<<
 *     __Pyx_globals['IN_DB'] = Spectrum.IN_DB
 *     __Pyx_globals['NORMALIZED'] = Spectrum.NORMALIZED
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_10, __pyx_n_s_doc, __pyx_kp_s_types_of_normalizations_when_us) < 0) __PYX_ERR(1, 94, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":95
 * 
 *     Spectrum.__doc__ = '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 *     __Pyx_globals['IN_DB'] = Spectrum.IN_DB             # <<<<<<<<<<<<<<
 *     __Pyx_globals['NORMALIZED'] = Spectrum.NORMALIZED
 *     __Pyx_globals['RAW'] = Spectrum.RAW
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_IN_DB); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 95, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_IN_DB, __pyx_t_12) < 0))) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":96
 *     Spectrum.__doc__ = '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 *     __Pyx_globals['IN_DB'] = Spectrum.IN_DB
 *     __Pyx_globals['NORMALIZED'] = Spectrum.NORMALIZED             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RAW'] = Spectrum.RAW
 * else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_NORMALIZED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 96, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_NORMALIZED, __pyx_t_10) < 0))) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":97
 *     __Pyx_globals['IN_DB'] = Spectrum.IN_DB
 *     __Pyx_globals['NORMALIZED'] = Spectrum.NORMALIZED
 *     __Pyx_globals['RAW'] = Spectrum.RAW             # <<<<<<<<<<<<<<
 * else:
 *     class Spectrum(__Pyx_FlagBase):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_RAW); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 97, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RAW, __pyx_t_12) < 0))) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L37;
  }

  /* "EnumType":99
 *     __Pyx_globals['RAW'] = Spectrum.RAW
 * else:
 *     class Spectrum(__Pyx_FlagBase):             # <<<<<<<<<<<<<<
 *         '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 *     __Pyx_globals['IN_DB'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB), 'IN_DB')
 */
  /*else*/ {
    __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__Pyx_FlagBase);
    __Pyx_GIVEREF(__Pyx_FlagBase);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __Pyx_FlagBase)) __PYX_ERR(1, 99, __pyx_L1_error);
    __pyx_t_10 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_10, __pyx_n_s_Spectrum, __pyx_n_s_Spectrum, (PyObject *) NULL, __pyx_n_s_EnumType, __pyx_kp_s_types_of_normalizations_when_us); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_10 != __pyx_t_12) {
      if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(1, 99, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_n_s_Spectrum, __pyx_t_10, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Spectrum, __pyx_t_12) < 0) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":101
 *     class Spectrum(__Pyx_FlagBase):
 *         '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 *     __Pyx_globals['IN_DB'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB), 'IN_DB')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['NORMALIZED'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED), 'NORMALIZED')
 *     __Pyx_globals['RAW'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW), 'RAW')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_IN_DB); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13)) __PYX_ERR(1, 101, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_IN_DB);
    __Pyx_GIVEREF(__pyx_n_s_IN_DB);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_IN_DB)) __PYX_ERR(1, 101, __pyx_L1_error);
    __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 101, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_IN_DB, __pyx_t_13) < 0))) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "EnumType":102
 *         '\n    types of normalizations when using the spectrum function. the results are in db if in_db, or linear and normalized to 1.0 normalized, or linear unnormalized raw\n    '
 *     __Pyx_globals['IN_DB'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB), 'IN_DB')
 *     __Pyx_globals['NORMALIZED'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED), 'NORMALIZED')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RAW'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW), 'RAW')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_NORMALIZED); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_NORMALIZED);
    __Pyx_GIVEREF(__pyx_n_s_NORMALIZED);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_NORMALIZED)) __PYX_ERR(1, 102, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 102, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_NORMALIZED, __pyx_t_4) < 0))) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "EnumType":103
 *     __Pyx_globals['IN_DB'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(IN_DB), 'IN_DB')
 *     __Pyx_globals['NORMALIZED'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(NORMALIZED), 'NORMALIZED')
 *     __Pyx_globals['RAW'] = Spectrum(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(RAW), 'RAW')             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Spectrum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(__pyx_e_8pysndlib_3clm_RAW); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RAW);
    __Pyx_GIVEREF(__pyx_n_s_RAW);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_RAW)) __PYX_ERR(1, 103, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 103, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RAW, __pyx_t_10) < 0))) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_L37:;

  /* "EnumType":76
 *     object __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(Window value)
 * 
 * cdef dict __Pyx_globals = globals()             # <<<<<<<<<<<<<<
 * if PY_VERSION_HEX >= 0x03060000:
 * 
 */
  __pyx_t_10 = __Pyx_Globals(); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_10))) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_XGOTREF(__Pyx_globals);
  __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_10));
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;

  /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (PY_VERSION_HEX >= 0x03060000);
  if (__pyx_t_2) {

    /* "EnumType":81
 * 
 *     Window = __Pyx_FlagBase('Window', [
 *         ('RECTANGULAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR)),             # <<<<<<<<<<<<<<
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),
 *         ('WELCH', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RECTANGULAR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_n_s_RECTANGULAR);
    __Pyx_GIVEREF(__pyx_n_s_RECTANGULAR);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_RECTANGULAR)) __PYX_ERR(1, 81, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10)) __PYX_ERR(1, 81, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":82
 *     Window = __Pyx_FlagBase('Window', [
 *         ('RECTANGULAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR)),
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),             # <<<<<<<<<<<<<<
 *         ('WELCH', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH)),
 *         ('PARZEN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HANN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_HANN);
    __Pyx_GIVEREF(__pyx_n_s_HANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_HANN)) __PYX_ERR(1, 82, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10)) __PYX_ERR(1, 82, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":83
 *         ('RECTANGULAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR)),
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),
 *         ('WELCH', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH)),             # <<<<<<<<<<<<<<
 *         ('PARZEN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN)),
 *         ('BARTLETT', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_WELCH); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_n_s_WELCH);
    __Pyx_GIVEREF(__pyx_n_s_WELCH);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_WELCH)) __PYX_ERR(1, 83, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10)) __PYX_ERR(1, 83, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":84
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),
 *         ('WELCH', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH)),
 *         ('PARZEN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN)),             # <<<<<<<<<<<<<<
 *         ('BARTLETT', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT)),
 *         ('HAMMING', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_PARZEN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_n_s_PARZEN);
    __Pyx_GIVEREF(__pyx_n_s_PARZEN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_PARZEN)) __PYX_ERR(1, 84, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":85
 *         ('WELCH', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH)),
 *         ('PARZEN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN)),
 *         ('BARTLETT', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT)),             # <<<<<<<<<<<<<<
 *         ('HAMMING', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING)),
 *         ('BLACKMAN2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BARTLETT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_s_BARTLETT);
    __Pyx_GIVEREF(__pyx_n_s_BARTLETT);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_BARTLETT)) __PYX_ERR(1, 85, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10)) __PYX_ERR(1, 85, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":86
 *         ('PARZEN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN)),
 *         ('BARTLETT', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT)),
 *         ('HAMMING', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2)),
 *         ('BLACKMAN3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HAMMING); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_HAMMING);
    __Pyx_GIVEREF(__pyx_n_s_HAMMING);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_HAMMING)) __PYX_ERR(1, 86, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":87
 *         ('BARTLETT', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT)),
 *         ('HAMMING', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING)),
 *         ('BLACKMAN2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3)),
 *         ('BLACKMAN4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN2);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_BLACKMAN2)) __PYX_ERR(1, 87, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10)) __PYX_ERR(1, 87, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":88
 *         ('HAMMING', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING)),
 *         ('BLACKMAN2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2)),
 *         ('BLACKMAN3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4)),
 *         ('EXPONENTIAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN3);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_BLACKMAN3)) __PYX_ERR(1, 88, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_10)) __PYX_ERR(1, 88, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":89
 *         ('BLACKMAN2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2)),
 *         ('BLACKMAN3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3)),
 *         ('BLACKMAN4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4)),             # <<<<<<<<<<<<<<
 *         ('EXPONENTIAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL)),
 *         ('RIEMANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN4);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_BLACKMAN4)) __PYX_ERR(1, 89, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_10)) __PYX_ERR(1, 89, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":90
 *         ('BLACKMAN3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3)),
 *         ('BLACKMAN4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4)),
 *         ('EXPONENTIAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL)),             # <<<<<<<<<<<<<<
 *         ('RIEMANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN)),
 *         ('KAISER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_EXPONENTIAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_n_s_EXPONENTIAL);
    __Pyx_GIVEREF(__pyx_n_s_EXPONENTIAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_EXPONENTIAL)) __PYX_ERR(1, 90, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_10)) __PYX_ERR(1, 90, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":91
 *         ('BLACKMAN4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4)),
 *         ('EXPONENTIAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL)),
 *         ('RIEMANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN)),             # <<<<<<<<<<<<<<
 *         ('KAISER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER)),
 *         ('CAUCHY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RIEMANN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_n_s_RIEMANN);
    __Pyx_GIVEREF(__pyx_n_s_RIEMANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_n_s_RIEMANN)) __PYX_ERR(1, 91, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_10)) __PYX_ERR(1, 91, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":92
 *         ('EXPONENTIAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL)),
 *         ('RIEMANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN)),
 *         ('KAISER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER)),             # <<<<<<<<<<<<<<
 *         ('CAUCHY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY)),
 *         ('POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_KAISER); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_INCREF(__pyx_n_s_KAISER);
    __Pyx_GIVEREF(__pyx_n_s_KAISER);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_n_s_KAISER)) __PYX_ERR(1, 92, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_10)) __PYX_ERR(1, 92, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":93
 *         ('RIEMANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN)),
 *         ('KAISER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER)),
 *         ('CAUCHY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY)),             # <<<<<<<<<<<<<<
 *         ('POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON)),
 *         ('GAUSSIAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_CAUCHY); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_INCREF(__pyx_n_s_CAUCHY);
    __Pyx_GIVEREF(__pyx_n_s_CAUCHY);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_n_s_CAUCHY)) __PYX_ERR(1, 93, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_10)) __PYX_ERR(1, 93, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":94
 *         ('KAISER', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER)),
 *         ('CAUCHY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY)),
 *         ('POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON)),             # <<<<<<<<<<<<<<
 *         ('GAUSSIAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN)),
 *         ('TUKEY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_POISSON); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_INCREF(__pyx_n_s_POISSON);
    __Pyx_GIVEREF(__pyx_n_s_POISSON);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_n_s_POISSON)) __PYX_ERR(1, 94, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_10)) __PYX_ERR(1, 94, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":95
 *         ('CAUCHY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY)),
 *         ('POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON)),
 *         ('GAUSSIAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN)),             # <<<<<<<<<<<<<<
 *         ('TUKEY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY)),
 *         ('DOLPH_CHEBYSHEV', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_GAUSSIAN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_INCREF(__pyx_n_s_GAUSSIAN);
    __Pyx_GIVEREF(__pyx_n_s_GAUSSIAN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_n_s_GAUSSIAN)) __PYX_ERR(1, 95, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_10)) __PYX_ERR(1, 95, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":96
 *         ('POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON)),
 *         ('GAUSSIAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN)),
 *         ('TUKEY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY)),             # <<<<<<<<<<<<<<
 *         ('DOLPH_CHEBYSHEV', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV)),
 *         ('HANN_POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_TUKEY); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __Pyx_INCREF(__pyx_n_s_TUKEY);
    __Pyx_GIVEREF(__pyx_n_s_TUKEY);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_n_s_TUKEY)) __PYX_ERR(1, 96, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_10)) __PYX_ERR(1, 96, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":97
 *         ('GAUSSIAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN)),
 *         ('TUKEY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY)),
 *         ('DOLPH_CHEBYSHEV', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV)),             # <<<<<<<<<<<<<<
 *         ('HANN_POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON)),
 *         ('CONNES', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_DOLPH_CHEBYSHEV); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_23 = PyTuple_New(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    __Pyx_INCREF(__pyx_n_s_DOLPH_CHEBYSHEV);
    __Pyx_GIVEREF(__pyx_n_s_DOLPH_CHEBYSHEV);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_n_s_DOLPH_CHEBYSHEV)) __PYX_ERR(1, 97, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_10)) __PYX_ERR(1, 97, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":98
 *         ('TUKEY', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY)),
 *         ('DOLPH_CHEBYSHEV', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV)),
 *         ('HANN_POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON)),             # <<<<<<<<<<<<<<
 *         ('CONNES', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES)),
 *         ('SAMARAKI', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HANN_POISSON); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_INCREF(__pyx_n_s_HANN_POISSON);
    __Pyx_GIVEREF(__pyx_n_s_HANN_POISSON);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_n_s_HANN_POISSON)) __PYX_ERR(1, 98, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_10)) __PYX_ERR(1, 98, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":99
 *         ('DOLPH_CHEBYSHEV', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV)),
 *         ('HANN_POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON)),
 *         ('CONNES', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES)),             # <<<<<<<<<<<<<<
 *         ('SAMARAKI', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI)),
 *         ('ULTRASPHERICAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_CONNES); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_25 = PyTuple_New(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_INCREF(__pyx_n_s_CONNES);
    __Pyx_GIVEREF(__pyx_n_s_CONNES);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_n_s_CONNES)) __PYX_ERR(1, 99, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_10)) __PYX_ERR(1, 99, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":100
 *         ('HANN_POISSON', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON)),
 *         ('CONNES', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES)),
 *         ('SAMARAKI', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI)),             # <<<<<<<<<<<<<<
 *         ('ULTRASPHERICAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL)),
 *         ('BARTLETT_HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_SAMARAKI); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_26 = PyTuple_New(2); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_INCREF(__pyx_n_s_SAMARAKI);
    __Pyx_GIVEREF(__pyx_n_s_SAMARAKI);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_n_s_SAMARAKI)) __PYX_ERR(1, 100, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_t_10)) __PYX_ERR(1, 100, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":101
 *         ('CONNES', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES)),
 *         ('SAMARAKI', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI)),
 *         ('ULTRASPHERICAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL)),             # <<<<<<<<<<<<<<
 *         ('BARTLETT_HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN)),
 *         ('BOHMAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_ULTRASPHERICAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_27 = PyTuple_New(2); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    __Pyx_INCREF(__pyx_n_s_ULTRASPHERICAL);
    __Pyx_GIVEREF(__pyx_n_s_ULTRASPHERICAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_n_s_ULTRASPHERICAL)) __PYX_ERR(1, 101, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_10)) __PYX_ERR(1, 101, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":102
 *         ('SAMARAKI', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI)),
 *         ('ULTRASPHERICAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL)),
 *         ('BARTLETT_HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN)),             # <<<<<<<<<<<<<<
 *         ('BOHMAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN)),
 *         ('FLAT_TOP', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BARTLETT_HANN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_INCREF(__pyx_n_s_BARTLETT_HANN);
    __Pyx_GIVEREF(__pyx_n_s_BARTLETT_HANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_n_s_BARTLETT_HANN)) __PYX_ERR(1, 102, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_10)) __PYX_ERR(1, 102, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":103
 *         ('ULTRASPHERICAL', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL)),
 *         ('BARTLETT_HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN)),
 *         ('BOHMAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN)),             # <<<<<<<<<<<<<<
 *         ('FLAT_TOP', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP)),
 *         ('BLACKMAN5', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BOHMAN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_29 = PyTuple_New(2); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_29);
    __Pyx_INCREF(__pyx_n_s_BOHMAN);
    __Pyx_GIVEREF(__pyx_n_s_BOHMAN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_n_s_BOHMAN)) __PYX_ERR(1, 103, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_29, 1, __pyx_t_10)) __PYX_ERR(1, 103, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":104
 *         ('BARTLETT_HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN)),
 *         ('BOHMAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN)),
 *         ('FLAT_TOP', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN5', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5)),
 *         ('BLACKMAN6', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_FLAT_TOP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_30 = PyTuple_New(2); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_30);
    __Pyx_INCREF(__pyx_n_s_FLAT_TOP);
    __Pyx_GIVEREF(__pyx_n_s_FLAT_TOP);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_n_s_FLAT_TOP)) __PYX_ERR(1, 104, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_30, 1, __pyx_t_10)) __PYX_ERR(1, 104, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":105
 *         ('BOHMAN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN)),
 *         ('FLAT_TOP', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP)),
 *         ('BLACKMAN5', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN6', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6)),
 *         ('BLACKMAN7', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_31 = PyTuple_New(2); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_31);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN5);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_n_s_BLACKMAN5)) __PYX_ERR(1, 105, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_10)) __PYX_ERR(1, 105, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":106
 *         ('FLAT_TOP', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP)),
 *         ('BLACKMAN5', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5)),
 *         ('BLACKMAN6', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN7', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7)),
 *         ('BLACKMAN8', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_32 = PyTuple_New(2); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_32);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN6);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_n_s_BLACKMAN6)) __PYX_ERR(1, 106, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_32, 1, __pyx_t_10)) __PYX_ERR(1, 106, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":107
 *         ('BLACKMAN5', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5)),
 *         ('BLACKMAN6', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6)),
 *         ('BLACKMAN7', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN8', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8)),
 *         ('BLACKMAN9', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN7); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_33 = PyTuple_New(2); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_33);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN7);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_n_s_BLACKMAN7)) __PYX_ERR(1, 107, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_t_10)) __PYX_ERR(1, 107, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":108
 *         ('BLACKMAN6', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6)),
 *         ('BLACKMAN7', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7)),
 *         ('BLACKMAN8', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN9', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9)),
 *         ('BLACKMAN10', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_34 = PyTuple_New(2); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_34);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN8);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_34, 0, __pyx_n_s_BLACKMAN8)) __PYX_ERR(1, 108, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_34, 1, __pyx_t_10)) __PYX_ERR(1, 108, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":109
 *         ('BLACKMAN7', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7)),
 *         ('BLACKMAN8', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8)),
 *         ('BLACKMAN9', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9)),             # <<<<<<<<<<<<<<
 *         ('BLACKMAN10', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10)),
 *         ('RV2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_35 = PyTuple_New(2); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_35);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN9);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_35, 0, __pyx_n_s_BLACKMAN9)) __PYX_ERR(1, 109, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_35, 1, __pyx_t_10)) __PYX_ERR(1, 109, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":110
 *         ('BLACKMAN8', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8)),
 *         ('BLACKMAN9', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9)),
 *         ('BLACKMAN10', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10)),             # <<<<<<<<<<<<<<
 *         ('RV2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2)),
 *         ('RV3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_36 = PyTuple_New(2); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_36);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN10);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_n_s_BLACKMAN10)) __PYX_ERR(1, 110, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_36, 1, __pyx_t_10)) __PYX_ERR(1, 110, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":111
 *         ('BLACKMAN9', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9)),
 *         ('BLACKMAN10', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10)),
 *         ('RV2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2)),             # <<<<<<<<<<<<<<
 *         ('RV3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3)),
 *         ('RV4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_37 = PyTuple_New(2); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_37);
    __Pyx_INCREF(__pyx_n_s_RV2);
    __Pyx_GIVEREF(__pyx_n_s_RV2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_n_s_RV2)) __PYX_ERR(1, 111, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_t_10)) __PYX_ERR(1, 111, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":112
 *         ('BLACKMAN10', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10)),
 *         ('RV2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2)),
 *         ('RV3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3)),             # <<<<<<<<<<<<<<
 *         ('RV4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4)),
 *         ('MLT_SINE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_38 = PyTuple_New(2); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_38);
    __Pyx_INCREF(__pyx_n_s_RV3);
    __Pyx_GIVEREF(__pyx_n_s_RV3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_38, 0, __pyx_n_s_RV3)) __PYX_ERR(1, 112, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_38, 1, __pyx_t_10)) __PYX_ERR(1, 112, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":113
 *         ('RV2', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2)),
 *         ('RV3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3)),
 *         ('RV4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4)),             # <<<<<<<<<<<<<<
 *         ('MLT_SINE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE)),
 *         ('PAPOULIS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_39 = PyTuple_New(2); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_39);
    __Pyx_INCREF(__pyx_n_s_RV4);
    __Pyx_GIVEREF(__pyx_n_s_RV4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_39, 0, __pyx_n_s_RV4)) __PYX_ERR(1, 113, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_39, 1, __pyx_t_10)) __PYX_ERR(1, 113, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":114
 *         ('RV3', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3)),
 *         ('RV4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4)),
 *         ('MLT_SINE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE)),             # <<<<<<<<<<<<<<
 *         ('PAPOULIS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS)),
 *         ('DPSS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_MLT_SINE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    __Pyx_INCREF(__pyx_n_s_MLT_SINE);
    __Pyx_GIVEREF(__pyx_n_s_MLT_SINE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_n_s_MLT_SINE)) __PYX_ERR(1, 114, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_t_10)) __PYX_ERR(1, 114, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":115
 *         ('RV4', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4)),
 *         ('MLT_SINE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE)),
 *         ('PAPOULIS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS)),             # <<<<<<<<<<<<<<
 *         ('DPSS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS)),
 *         ('SINC', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC)),
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_PAPOULIS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_INCREF(__pyx_n_s_PAPOULIS);
    __Pyx_GIVEREF(__pyx_n_s_PAPOULIS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_n_s_PAPOULIS)) __PYX_ERR(1, 115, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_t_10)) __PYX_ERR(1, 115, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":116
 *         ('MLT_SINE', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE)),
 *         ('PAPOULIS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS)),
 *         ('DPSS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS)),             # <<<<<<<<<<<<<<
 *         ('SINC', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC)),
 * 
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_DPSS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = PyTuple_New(2); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_INCREF(__pyx_n_s_DPSS);
    __Pyx_GIVEREF(__pyx_n_s_DPSS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 0, __pyx_n_s_DPSS)) __PYX_ERR(1, 116, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 1, __pyx_t_10)) __PYX_ERR(1, 116, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":117
 *         ('PAPOULIS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS)),
 *         ('DPSS', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS)),
 *         ('SINC', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC)),             # <<<<<<<<<<<<<<
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 */
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_SINC); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_INCREF(__pyx_n_s_SINC);
    __Pyx_GIVEREF(__pyx_n_s_SINC);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_n_s_SINC)) __PYX_ERR(1, 117, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_t_10)) __PYX_ERR(1, 117, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":80
 * 
 * 
 *     Window = __Pyx_FlagBase('Window', [             # <<<<<<<<<<<<<<
 *         ('RECTANGULAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR)),
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),
 */
    __pyx_t_10 = PyList_New(37); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_13)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_11)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 4, __pyx_t_5)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 5, __pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 6, __pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_14);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 7, __pyx_t_14)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_15);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 8, __pyx_t_15)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_16);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 9, __pyx_t_16)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_17);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 10, __pyx_t_17)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_18);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 11, __pyx_t_18)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_19);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 12, __pyx_t_19)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_20);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 13, __pyx_t_20)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_21);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 14, __pyx_t_21)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_22);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 15, __pyx_t_22)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_23);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 16, __pyx_t_23)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_24);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 17, __pyx_t_24)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_25);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 18, __pyx_t_25)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_26);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 19, __pyx_t_26)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_27);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 20, __pyx_t_27)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_28);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 21, __pyx_t_28)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_29);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 22, __pyx_t_29)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_30);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 23, __pyx_t_30)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_31);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 24, __pyx_t_31)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_32);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 25, __pyx_t_32)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_33);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 26, __pyx_t_33)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_34);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 27, __pyx_t_34)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_35);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 28, __pyx_t_35)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_36);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 29, __pyx_t_36)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_37);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 30, __pyx_t_37)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_38);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 31, __pyx_t_38)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_39);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 32, __pyx_t_39)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_40);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 33, __pyx_t_40)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 34, __pyx_t_41)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_42);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 35, __pyx_t_42)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 36, __pyx_t_43)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_13 = 0;
    __pyx_t_4 = 0;
    __pyx_t_12 = 0;
    __pyx_t_11 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_20 = 0;
    __pyx_t_21 = 0;
    __pyx_t_22 = 0;
    __pyx_t_23 = 0;
    __pyx_t_24 = 0;
    __pyx_t_25 = 0;
    __pyx_t_26 = 0;
    __pyx_t_27 = 0;
    __pyx_t_28 = 0;
    __pyx_t_29 = 0;
    __pyx_t_30 = 0;
    __pyx_t_31 = 0;
    __pyx_t_32 = 0;
    __pyx_t_33 = 0;
    __pyx_t_34 = 0;
    __pyx_t_35 = 0;
    __pyx_t_36 = 0;
    __pyx_t_37 = 0;
    __pyx_t_38 = 0;
    __pyx_t_39 = 0;
    __pyx_t_40 = 0;
    __pyx_t_41 = 0;
    __pyx_t_42 = 0;
    __pyx_t_43 = 0;
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_INCREF(__pyx_n_s_Window);
    __Pyx_GIVEREF(__pyx_n_s_Window);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_n_s_Window)) __PYX_ERR(1, 80, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_t_10)) __PYX_ERR(1, 80, __pyx_L1_error);
    __pyx_t_10 = 0;

    /* "EnumType":119
 *         ('SINC', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC)),
 * 
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))             # <<<<<<<<<<<<<<
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:
 */
    __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(1, 119, __pyx_L1_error)
    }
    __pyx_t_42 = __Pyx_PyDict_GetItemDefault(__Pyx_globals, __pyx_n_s_module, __pyx_n_s_pysndlib_clm); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_module_2, __pyx_t_42) < 0) __PYX_ERR(1, 119, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":80
 * 
 * 
 *     Window = __Pyx_FlagBase('Window', [             # <<<<<<<<<<<<<<
 *         ('RECTANGULAR', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR)),
 *         ('HANN', __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN)),
 */
    __pyx_t_42 = __Pyx_PyObject_Call(__Pyx_FlagBase, __pyx_t_43, __pyx_t_10); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Window, __pyx_t_42) < 0) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":121
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = (PY_VERSION_HEX >= 0x030B0000);
    if (__pyx_t_2) {

      /* "EnumType":126
 * 
 * 
 *         Window._member_names_ = list(Window.__members__)             # <<<<<<<<<<<<<<
 * 
 *     Window.__doc__ = '\n    many useful windows\n    '
 */
      __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_42);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_members); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
      __pyx_t_42 = __Pyx_PySequence_ListKeepNew(__pyx_t_10); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_42);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_10, __pyx_n_s_member_names, __pyx_t_42) < 0) __PYX_ERR(1, 126, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "EnumType":121
 *     ], module=__Pyx_globals.get("__module__", 'pysndlib.clm'))
 * 
 *     if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    }

    /* "EnumType":128
 *         Window._member_names_ = list(Window.__members__)
 * 
 *     Window.__doc__ = '\n    many useful windows\n    '             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RECTANGULAR'] = Window.RECTANGULAR
 *     __Pyx_globals['HANN'] = Window.HANN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_10, __pyx_n_s_doc, __pyx_kp_s_many_useful_windows) < 0) __PYX_ERR(1, 128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":129
 * 
 *     Window.__doc__ = '\n    many useful windows\n    '
 *     __Pyx_globals['RECTANGULAR'] = Window.RECTANGULAR             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HANN'] = Window.HANN
 *     __Pyx_globals['WELCH'] = Window.WELCH
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_RECTANGULAR); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 129, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RECTANGULAR, __pyx_t_42) < 0))) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":130
 *     Window.__doc__ = '\n    many useful windows\n    '
 *     __Pyx_globals['RECTANGULAR'] = Window.RECTANGULAR
 *     __Pyx_globals['HANN'] = Window.HANN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['WELCH'] = Window.WELCH
 *     __Pyx_globals['PARZEN'] = Window.PARZEN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_HANN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 130, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HANN, __pyx_t_10) < 0))) __PYX_ERR(1, 130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":131
 *     __Pyx_globals['RECTANGULAR'] = Window.RECTANGULAR
 *     __Pyx_globals['HANN'] = Window.HANN
 *     __Pyx_globals['WELCH'] = Window.WELCH             # <<<<<<<<<<<<<<
 *     __Pyx_globals['PARZEN'] = Window.PARZEN
 *     __Pyx_globals['BARTLETT'] = Window.BARTLETT
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_WELCH); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 131, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_WELCH, __pyx_t_42) < 0))) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":132
 *     __Pyx_globals['HANN'] = Window.HANN
 *     __Pyx_globals['WELCH'] = Window.WELCH
 *     __Pyx_globals['PARZEN'] = Window.PARZEN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BARTLETT'] = Window.BARTLETT
 *     __Pyx_globals['HAMMING'] = Window.HAMMING
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_PARZEN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 132, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_PARZEN, __pyx_t_10) < 0))) __PYX_ERR(1, 132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":133
 *     __Pyx_globals['WELCH'] = Window.WELCH
 *     __Pyx_globals['PARZEN'] = Window.PARZEN
 *     __Pyx_globals['BARTLETT'] = Window.BARTLETT             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HAMMING'] = Window.HAMMING
 *     __Pyx_globals['BLACKMAN2'] = Window.BLACKMAN2
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BARTLETT); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 133, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BARTLETT, __pyx_t_42) < 0))) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":134
 *     __Pyx_globals['PARZEN'] = Window.PARZEN
 *     __Pyx_globals['BARTLETT'] = Window.BARTLETT
 *     __Pyx_globals['HAMMING'] = Window.HAMMING             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN2'] = Window.BLACKMAN2
 *     __Pyx_globals['BLACKMAN3'] = Window.BLACKMAN3
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_HAMMING); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 134, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HAMMING, __pyx_t_10) < 0))) __PYX_ERR(1, 134, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":135
 *     __Pyx_globals['BARTLETT'] = Window.BARTLETT
 *     __Pyx_globals['HAMMING'] = Window.HAMMING
 *     __Pyx_globals['BLACKMAN2'] = Window.BLACKMAN2             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN3'] = Window.BLACKMAN3
 *     __Pyx_globals['BLACKMAN4'] = Window.BLACKMAN4
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BLACKMAN2); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 135, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN2, __pyx_t_42) < 0))) __PYX_ERR(1, 135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":136
 *     __Pyx_globals['HAMMING'] = Window.HAMMING
 *     __Pyx_globals['BLACKMAN2'] = Window.BLACKMAN2
 *     __Pyx_globals['BLACKMAN3'] = Window.BLACKMAN3             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN4'] = Window.BLACKMAN4
 *     __Pyx_globals['EXPONENTIAL'] = Window.EXPONENTIAL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_BLACKMAN3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 136, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN3, __pyx_t_10) < 0))) __PYX_ERR(1, 136, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":137
 *     __Pyx_globals['BLACKMAN2'] = Window.BLACKMAN2
 *     __Pyx_globals['BLACKMAN3'] = Window.BLACKMAN3
 *     __Pyx_globals['BLACKMAN4'] = Window.BLACKMAN4             # <<<<<<<<<<<<<<
 *     __Pyx_globals['EXPONENTIAL'] = Window.EXPONENTIAL
 *     __Pyx_globals['RIEMANN'] = Window.RIEMANN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BLACKMAN4); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 137, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN4, __pyx_t_42) < 0))) __PYX_ERR(1, 137, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":138
 *     __Pyx_globals['BLACKMAN3'] = Window.BLACKMAN3
 *     __Pyx_globals['BLACKMAN4'] = Window.BLACKMAN4
 *     __Pyx_globals['EXPONENTIAL'] = Window.EXPONENTIAL             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RIEMANN'] = Window.RIEMANN
 *     __Pyx_globals['KAISER'] = Window.KAISER
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_EXPONENTIAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 138, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_EXPONENTIAL, __pyx_t_10) < 0))) __PYX_ERR(1, 138, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":139
 *     __Pyx_globals['BLACKMAN4'] = Window.BLACKMAN4
 *     __Pyx_globals['EXPONENTIAL'] = Window.EXPONENTIAL
 *     __Pyx_globals['RIEMANN'] = Window.RIEMANN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['KAISER'] = Window.KAISER
 *     __Pyx_globals['CAUCHY'] = Window.CAUCHY
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_RIEMANN); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 139, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RIEMANN, __pyx_t_42) < 0))) __PYX_ERR(1, 139, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":140
 *     __Pyx_globals['EXPONENTIAL'] = Window.EXPONENTIAL
 *     __Pyx_globals['RIEMANN'] = Window.RIEMANN
 *     __Pyx_globals['KAISER'] = Window.KAISER             # <<<<<<<<<<<<<<
 *     __Pyx_globals['CAUCHY'] = Window.CAUCHY
 *     __Pyx_globals['POISSON'] = Window.POISSON
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_KAISER); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 140, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_KAISER, __pyx_t_10) < 0))) __PYX_ERR(1, 140, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":141
 *     __Pyx_globals['RIEMANN'] = Window.RIEMANN
 *     __Pyx_globals['KAISER'] = Window.KAISER
 *     __Pyx_globals['CAUCHY'] = Window.CAUCHY             # <<<<<<<<<<<<<<
 *     __Pyx_globals['POISSON'] = Window.POISSON
 *     __Pyx_globals['GAUSSIAN'] = Window.GAUSSIAN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_CAUCHY); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 141, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_CAUCHY, __pyx_t_42) < 0))) __PYX_ERR(1, 141, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":142
 *     __Pyx_globals['KAISER'] = Window.KAISER
 *     __Pyx_globals['CAUCHY'] = Window.CAUCHY
 *     __Pyx_globals['POISSON'] = Window.POISSON             # <<<<<<<<<<<<<<
 *     __Pyx_globals['GAUSSIAN'] = Window.GAUSSIAN
 *     __Pyx_globals['TUKEY'] = Window.TUKEY
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_POISSON); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 142, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_POISSON, __pyx_t_10) < 0))) __PYX_ERR(1, 142, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":143
 *     __Pyx_globals['CAUCHY'] = Window.CAUCHY
 *     __Pyx_globals['POISSON'] = Window.POISSON
 *     __Pyx_globals['GAUSSIAN'] = Window.GAUSSIAN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['TUKEY'] = Window.TUKEY
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window.DOLPH_CHEBYSHEV
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GAUSSIAN); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 143, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_GAUSSIAN, __pyx_t_42) < 0))) __PYX_ERR(1, 143, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":144
 *     __Pyx_globals['POISSON'] = Window.POISSON
 *     __Pyx_globals['GAUSSIAN'] = Window.GAUSSIAN
 *     __Pyx_globals['TUKEY'] = Window.TUKEY             # <<<<<<<<<<<<<<
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window.DOLPH_CHEBYSHEV
 *     __Pyx_globals['HANN_POISSON'] = Window.HANN_POISSON
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_TUKEY); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 144, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_TUKEY, __pyx_t_10) < 0))) __PYX_ERR(1, 144, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":145
 *     __Pyx_globals['GAUSSIAN'] = Window.GAUSSIAN
 *     __Pyx_globals['TUKEY'] = Window.TUKEY
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window.DOLPH_CHEBYSHEV             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HANN_POISSON'] = Window.HANN_POISSON
 *     __Pyx_globals['CONNES'] = Window.CONNES
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DOLPH_CHEBYSHEV); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 145, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_DOLPH_CHEBYSHEV, __pyx_t_42) < 0))) __PYX_ERR(1, 145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":146
 *     __Pyx_globals['TUKEY'] = Window.TUKEY
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window.DOLPH_CHEBYSHEV
 *     __Pyx_globals['HANN_POISSON'] = Window.HANN_POISSON             # <<<<<<<<<<<<<<
 *     __Pyx_globals['CONNES'] = Window.CONNES
 *     __Pyx_globals['SAMARAKI'] = Window.SAMARAKI
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_HANN_POISSON); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 146, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HANN_POISSON, __pyx_t_10) < 0))) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":147
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window.DOLPH_CHEBYSHEV
 *     __Pyx_globals['HANN_POISSON'] = Window.HANN_POISSON
 *     __Pyx_globals['CONNES'] = Window.CONNES             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SAMARAKI'] = Window.SAMARAKI
 *     __Pyx_globals['ULTRASPHERICAL'] = Window.ULTRASPHERICAL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_CONNES); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 147, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_CONNES, __pyx_t_42) < 0))) __PYX_ERR(1, 147, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":148
 *     __Pyx_globals['HANN_POISSON'] = Window.HANN_POISSON
 *     __Pyx_globals['CONNES'] = Window.CONNES
 *     __Pyx_globals['SAMARAKI'] = Window.SAMARAKI             # <<<<<<<<<<<<<<
 *     __Pyx_globals['ULTRASPHERICAL'] = Window.ULTRASPHERICAL
 *     __Pyx_globals['BARTLETT_HANN'] = Window.BARTLETT_HANN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_SAMARAKI); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 148, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SAMARAKI, __pyx_t_10) < 0))) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":149
 *     __Pyx_globals['CONNES'] = Window.CONNES
 *     __Pyx_globals['SAMARAKI'] = Window.SAMARAKI
 *     __Pyx_globals['ULTRASPHERICAL'] = Window.ULTRASPHERICAL             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BARTLETT_HANN'] = Window.BARTLETT_HANN
 *     __Pyx_globals['BOHMAN'] = Window.BOHMAN
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ULTRASPHERICAL); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 149, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_ULTRASPHERICAL, __pyx_t_42) < 0))) __PYX_ERR(1, 149, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":150
 *     __Pyx_globals['SAMARAKI'] = Window.SAMARAKI
 *     __Pyx_globals['ULTRASPHERICAL'] = Window.ULTRASPHERICAL
 *     __Pyx_globals['BARTLETT_HANN'] = Window.BARTLETT_HANN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BOHMAN'] = Window.BOHMAN
 *     __Pyx_globals['FLAT_TOP'] = Window.FLAT_TOP
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_BARTLETT_HANN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 150, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BARTLETT_HANN, __pyx_t_10) < 0))) __PYX_ERR(1, 150, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":151
 *     __Pyx_globals['ULTRASPHERICAL'] = Window.ULTRASPHERICAL
 *     __Pyx_globals['BARTLETT_HANN'] = Window.BARTLETT_HANN
 *     __Pyx_globals['BOHMAN'] = Window.BOHMAN             # <<<<<<<<<<<<<<
 *     __Pyx_globals['FLAT_TOP'] = Window.FLAT_TOP
 *     __Pyx_globals['BLACKMAN5'] = Window.BLACKMAN5
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BOHMAN); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 151, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BOHMAN, __pyx_t_42) < 0))) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":152
 *     __Pyx_globals['BARTLETT_HANN'] = Window.BARTLETT_HANN
 *     __Pyx_globals['BOHMAN'] = Window.BOHMAN
 *     __Pyx_globals['FLAT_TOP'] = Window.FLAT_TOP             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN5'] = Window.BLACKMAN5
 *     __Pyx_globals['BLACKMAN6'] = Window.BLACKMAN6
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_FLAT_TOP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 152, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_FLAT_TOP, __pyx_t_10) < 0))) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":153
 *     __Pyx_globals['BOHMAN'] = Window.BOHMAN
 *     __Pyx_globals['FLAT_TOP'] = Window.FLAT_TOP
 *     __Pyx_globals['BLACKMAN5'] = Window.BLACKMAN5             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN6'] = Window.BLACKMAN6
 *     __Pyx_globals['BLACKMAN7'] = Window.BLACKMAN7
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BLACKMAN5); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 153, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN5, __pyx_t_42) < 0))) __PYX_ERR(1, 153, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":154
 *     __Pyx_globals['FLAT_TOP'] = Window.FLAT_TOP
 *     __Pyx_globals['BLACKMAN5'] = Window.BLACKMAN5
 *     __Pyx_globals['BLACKMAN6'] = Window.BLACKMAN6             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN7'] = Window.BLACKMAN7
 *     __Pyx_globals['BLACKMAN8'] = Window.BLACKMAN8
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_BLACKMAN6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 154, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN6, __pyx_t_10) < 0))) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":155
 *     __Pyx_globals['BLACKMAN5'] = Window.BLACKMAN5
 *     __Pyx_globals['BLACKMAN6'] = Window.BLACKMAN6
 *     __Pyx_globals['BLACKMAN7'] = Window.BLACKMAN7             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN8'] = Window.BLACKMAN8
 *     __Pyx_globals['BLACKMAN9'] = Window.BLACKMAN9
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BLACKMAN7); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 155, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN7, __pyx_t_42) < 0))) __PYX_ERR(1, 155, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":156
 *     __Pyx_globals['BLACKMAN6'] = Window.BLACKMAN6
 *     __Pyx_globals['BLACKMAN7'] = Window.BLACKMAN7
 *     __Pyx_globals['BLACKMAN8'] = Window.BLACKMAN8             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN9'] = Window.BLACKMAN9
 *     __Pyx_globals['BLACKMAN10'] = Window.BLACKMAN10
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_BLACKMAN8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 156, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN8, __pyx_t_10) < 0))) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":157
 *     __Pyx_globals['BLACKMAN7'] = Window.BLACKMAN7
 *     __Pyx_globals['BLACKMAN8'] = Window.BLACKMAN8
 *     __Pyx_globals['BLACKMAN9'] = Window.BLACKMAN9             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN10'] = Window.BLACKMAN10
 *     __Pyx_globals['RV2'] = Window.RV2
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_BLACKMAN9); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 157, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN9, __pyx_t_42) < 0))) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":158
 *     __Pyx_globals['BLACKMAN8'] = Window.BLACKMAN8
 *     __Pyx_globals['BLACKMAN9'] = Window.BLACKMAN9
 *     __Pyx_globals['BLACKMAN10'] = Window.BLACKMAN10             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV2'] = Window.RV2
 *     __Pyx_globals['RV3'] = Window.RV3
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_BLACKMAN10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 158, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN10, __pyx_t_10) < 0))) __PYX_ERR(1, 158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":159
 *     __Pyx_globals['BLACKMAN9'] = Window.BLACKMAN9
 *     __Pyx_globals['BLACKMAN10'] = Window.BLACKMAN10
 *     __Pyx_globals['RV2'] = Window.RV2             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV3'] = Window.RV3
 *     __Pyx_globals['RV4'] = Window.RV4
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_RV2); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 159, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV2, __pyx_t_42) < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":160
 *     __Pyx_globals['BLACKMAN10'] = Window.BLACKMAN10
 *     __Pyx_globals['RV2'] = Window.RV2
 *     __Pyx_globals['RV3'] = Window.RV3             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV4'] = Window.RV4
 *     __Pyx_globals['MLT_SINE'] = Window.MLT_SINE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_RV3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 160, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV3, __pyx_t_10) < 0))) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":161
 *     __Pyx_globals['RV2'] = Window.RV2
 *     __Pyx_globals['RV3'] = Window.RV3
 *     __Pyx_globals['RV4'] = Window.RV4             # <<<<<<<<<<<<<<
 *     __Pyx_globals['MLT_SINE'] = Window.MLT_SINE
 *     __Pyx_globals['PAPOULIS'] = Window.PAPOULIS
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_RV4); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 161, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV4, __pyx_t_42) < 0))) __PYX_ERR(1, 161, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":162
 *     __Pyx_globals['RV3'] = Window.RV3
 *     __Pyx_globals['RV4'] = Window.RV4
 *     __Pyx_globals['MLT_SINE'] = Window.MLT_SINE             # <<<<<<<<<<<<<<
 *     __Pyx_globals['PAPOULIS'] = Window.PAPOULIS
 *     __Pyx_globals['DPSS'] = Window.DPSS
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_MLT_SINE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 162, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_MLT_SINE, __pyx_t_10) < 0))) __PYX_ERR(1, 162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":163
 *     __Pyx_globals['RV4'] = Window.RV4
 *     __Pyx_globals['MLT_SINE'] = Window.MLT_SINE
 *     __Pyx_globals['PAPOULIS'] = Window.PAPOULIS             # <<<<<<<<<<<<<<
 *     __Pyx_globals['DPSS'] = Window.DPSS
 *     __Pyx_globals['SINC'] = Window.SINC
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_PAPOULIS); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 163, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_PAPOULIS, __pyx_t_42) < 0))) __PYX_ERR(1, 163, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":164
 *     __Pyx_globals['MLT_SINE'] = Window.MLT_SINE
 *     __Pyx_globals['PAPOULIS'] = Window.PAPOULIS
 *     __Pyx_globals['DPSS'] = Window.DPSS             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SINC'] = Window.SINC
 * else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_Window); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_DPSS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 164, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_DPSS, __pyx_t_10) < 0))) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":165
 *     __Pyx_globals['PAPOULIS'] = Window.PAPOULIS
 *     __Pyx_globals['DPSS'] = Window.DPSS
 *     __Pyx_globals['SINC'] = Window.SINC             # <<<<<<<<<<<<<<
 * else:
 *     class Window(__Pyx_FlagBase):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_SINC); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 165, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SINC, __pyx_t_42) < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "EnumType":77
 * 
 * cdef dict __Pyx_globals = globals()
 * if PY_VERSION_HEX >= 0x03060000:             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L39;
  }

  /* "EnumType":167
 *     __Pyx_globals['SINC'] = Window.SINC
 * else:
 *     class Window(__Pyx_FlagBase):             # <<<<<<<<<<<<<<
 *         '\n    many useful windows\n    '
 *     __Pyx_globals['RECTANGULAR'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR), 'RECTANGULAR')
 */
  /*else*/ {
    __pyx_t_42 = PyTuple_New(1); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_INCREF(__Pyx_FlagBase);
    __Pyx_GIVEREF(__Pyx_FlagBase);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 0, __Pyx_FlagBase)) __PYX_ERR(1, 167, __pyx_L1_error);
    __pyx_t_10 = __Pyx_PEP560_update_bases(__pyx_t_42); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_CalculateMetaclass(NULL, __pyx_t_10); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_Py3MetaclassPrepare(__pyx_t_43, __pyx_t_10, __pyx_n_s_Window, __pyx_n_s_Window, (PyObject *) NULL, __pyx_n_s_EnumType, __pyx_kp_s_many_useful_windows); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    if (__pyx_t_10 != __pyx_t_42) {
      if (unlikely((PyDict_SetItemString(__pyx_t_41, "__orig_bases__", __pyx_t_42) < 0))) __PYX_ERR(1, 167, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __pyx_t_42 = __Pyx_Py3ClassCreate(__pyx_t_43, __pyx_n_s_Window, __pyx_t_10, __pyx_t_41, NULL, 0, 0); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_Window, __pyx_t_42) < 0) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":169
 *     class Window(__Pyx_FlagBase):
 *         '\n    many useful windows\n    '
 *     __Pyx_globals['RECTANGULAR'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR), 'RECTANGULAR')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN), 'HANN')
 *     __Pyx_globals['WELCH'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH), 'WELCH')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RECTANGULAR); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 169, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RECTANGULAR);
    __Pyx_GIVEREF(__pyx_n_s_RECTANGULAR);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_RECTANGULAR)) __PYX_ERR(1, 169, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 169, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RECTANGULAR, __pyx_t_43) < 0))) __PYX_ERR(1, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":170
 *         '\n    many useful windows\n    '
 *     __Pyx_globals['RECTANGULAR'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR), 'RECTANGULAR')
 *     __Pyx_globals['HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN), 'HANN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['WELCH'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH), 'WELCH')
 *     __Pyx_globals['PARZEN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN), 'PARZEN')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HANN); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 170, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_HANN);
    __Pyx_GIVEREF(__pyx_n_s_HANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_HANN)) __PYX_ERR(1, 170, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 170, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HANN, __pyx_t_41) < 0))) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":171
 *     __Pyx_globals['RECTANGULAR'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RECTANGULAR), 'RECTANGULAR')
 *     __Pyx_globals['HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN), 'HANN')
 *     __Pyx_globals['WELCH'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH), 'WELCH')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['PARZEN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN), 'PARZEN')
 *     __Pyx_globals['BARTLETT'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT), 'BARTLETT')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_WELCH); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_WELCH);
    __Pyx_GIVEREF(__pyx_n_s_WELCH);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_WELCH)) __PYX_ERR(1, 171, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 171, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_WELCH, __pyx_t_10) < 0))) __PYX_ERR(1, 171, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":172
 *     __Pyx_globals['HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN), 'HANN')
 *     __Pyx_globals['WELCH'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH), 'WELCH')
 *     __Pyx_globals['PARZEN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN), 'PARZEN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BARTLETT'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT), 'BARTLETT')
 *     __Pyx_globals['HAMMING'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING), 'HAMMING')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_PARZEN); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 172, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_PARZEN);
    __Pyx_GIVEREF(__pyx_n_s_PARZEN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_PARZEN)) __PYX_ERR(1, 172, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 172, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_PARZEN, __pyx_t_43) < 0))) __PYX_ERR(1, 172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":173
 *     __Pyx_globals['WELCH'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(WELCH), 'WELCH')
 *     __Pyx_globals['PARZEN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN), 'PARZEN')
 *     __Pyx_globals['BARTLETT'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT), 'BARTLETT')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HAMMING'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING), 'HAMMING')
 *     __Pyx_globals['BLACKMAN2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2), 'BLACKMAN2')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BARTLETT); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 173, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BARTLETT);
    __Pyx_GIVEREF(__pyx_n_s_BARTLETT);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_BARTLETT)) __PYX_ERR(1, 173, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 173, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BARTLETT, __pyx_t_41) < 0))) __PYX_ERR(1, 173, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":174
 *     __Pyx_globals['PARZEN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PARZEN), 'PARZEN')
 *     __Pyx_globals['BARTLETT'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT), 'BARTLETT')
 *     __Pyx_globals['HAMMING'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING), 'HAMMING')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2), 'BLACKMAN2')
 *     __Pyx_globals['BLACKMAN3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3), 'BLACKMAN3')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HAMMING); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 174, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_HAMMING);
    __Pyx_GIVEREF(__pyx_n_s_HAMMING);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_HAMMING)) __PYX_ERR(1, 174, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 174, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HAMMING, __pyx_t_10) < 0))) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":175
 *     __Pyx_globals['BARTLETT'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT), 'BARTLETT')
 *     __Pyx_globals['HAMMING'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING), 'HAMMING')
 *     __Pyx_globals['BLACKMAN2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2), 'BLACKMAN2')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3), 'BLACKMAN3')
 *     __Pyx_globals['BLACKMAN4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4), 'BLACKMAN4')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 175, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN2);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_BLACKMAN2)) __PYX_ERR(1, 175, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 175, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN2, __pyx_t_43) < 0))) __PYX_ERR(1, 175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":176
 *     __Pyx_globals['HAMMING'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HAMMING), 'HAMMING')
 *     __Pyx_globals['BLACKMAN2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2), 'BLACKMAN2')
 *     __Pyx_globals['BLACKMAN3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3), 'BLACKMAN3')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4), 'BLACKMAN4')
 *     __Pyx_globals['EXPONENTIAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL), 'EXPONENTIAL')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN3); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 176, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN3);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_BLACKMAN3)) __PYX_ERR(1, 176, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 176, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN3, __pyx_t_41) < 0))) __PYX_ERR(1, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":177
 *     __Pyx_globals['BLACKMAN2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN2), 'BLACKMAN2')
 *     __Pyx_globals['BLACKMAN3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3), 'BLACKMAN3')
 *     __Pyx_globals['BLACKMAN4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4), 'BLACKMAN4')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['EXPONENTIAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL), 'EXPONENTIAL')
 *     __Pyx_globals['RIEMANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN), 'RIEMANN')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN4);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_BLACKMAN4)) __PYX_ERR(1, 177, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 177, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN4, __pyx_t_10) < 0))) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":178
 *     __Pyx_globals['BLACKMAN3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN3), 'BLACKMAN3')
 *     __Pyx_globals['BLACKMAN4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4), 'BLACKMAN4')
 *     __Pyx_globals['EXPONENTIAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL), 'EXPONENTIAL')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RIEMANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN), 'RIEMANN')
 *     __Pyx_globals['KAISER'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER), 'KAISER')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_EXPONENTIAL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 178, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_EXPONENTIAL);
    __Pyx_GIVEREF(__pyx_n_s_EXPONENTIAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_EXPONENTIAL)) __PYX_ERR(1, 178, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 178, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_EXPONENTIAL, __pyx_t_43) < 0))) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":179
 *     __Pyx_globals['BLACKMAN4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN4), 'BLACKMAN4')
 *     __Pyx_globals['EXPONENTIAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL), 'EXPONENTIAL')
 *     __Pyx_globals['RIEMANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN), 'RIEMANN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['KAISER'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER), 'KAISER')
 *     __Pyx_globals['CAUCHY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY), 'CAUCHY')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RIEMANN); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 179, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RIEMANN);
    __Pyx_GIVEREF(__pyx_n_s_RIEMANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_RIEMANN)) __PYX_ERR(1, 179, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 179, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RIEMANN, __pyx_t_41) < 0))) __PYX_ERR(1, 179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":180
 *     __Pyx_globals['EXPONENTIAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(EXPONENTIAL), 'EXPONENTIAL')
 *     __Pyx_globals['RIEMANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN), 'RIEMANN')
 *     __Pyx_globals['KAISER'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER), 'KAISER')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['CAUCHY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY), 'CAUCHY')
 *     __Pyx_globals['POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON), 'POISSON')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_KAISER); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 180, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_KAISER);
    __Pyx_GIVEREF(__pyx_n_s_KAISER);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_KAISER)) __PYX_ERR(1, 180, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 180, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_KAISER, __pyx_t_10) < 0))) __PYX_ERR(1, 180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":181
 *     __Pyx_globals['RIEMANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RIEMANN), 'RIEMANN')
 *     __Pyx_globals['KAISER'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER), 'KAISER')
 *     __Pyx_globals['CAUCHY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY), 'CAUCHY')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON), 'POISSON')
 *     __Pyx_globals['GAUSSIAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN), 'GAUSSIAN')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_CAUCHY); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 181, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_CAUCHY);
    __Pyx_GIVEREF(__pyx_n_s_CAUCHY);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_CAUCHY)) __PYX_ERR(1, 181, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 181, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_CAUCHY, __pyx_t_43) < 0))) __PYX_ERR(1, 181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":182
 *     __Pyx_globals['KAISER'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(KAISER), 'KAISER')
 *     __Pyx_globals['CAUCHY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY), 'CAUCHY')
 *     __Pyx_globals['POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON), 'POISSON')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['GAUSSIAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN), 'GAUSSIAN')
 *     __Pyx_globals['TUKEY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY), 'TUKEY')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_POISSON); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_POISSON);
    __Pyx_GIVEREF(__pyx_n_s_POISSON);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_POISSON)) __PYX_ERR(1, 182, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 182, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_POISSON, __pyx_t_41) < 0))) __PYX_ERR(1, 182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":183
 *     __Pyx_globals['CAUCHY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CAUCHY), 'CAUCHY')
 *     __Pyx_globals['POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON), 'POISSON')
 *     __Pyx_globals['GAUSSIAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN), 'GAUSSIAN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['TUKEY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY), 'TUKEY')
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV), 'DOLPH_CHEBYSHEV')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_GAUSSIAN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 183, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_GAUSSIAN);
    __Pyx_GIVEREF(__pyx_n_s_GAUSSIAN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_GAUSSIAN)) __PYX_ERR(1, 183, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 183, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_GAUSSIAN, __pyx_t_10) < 0))) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":184
 *     __Pyx_globals['POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(POISSON), 'POISSON')
 *     __Pyx_globals['GAUSSIAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN), 'GAUSSIAN')
 *     __Pyx_globals['TUKEY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY), 'TUKEY')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV), 'DOLPH_CHEBYSHEV')
 *     __Pyx_globals['HANN_POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON), 'HANN_POISSON')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_TUKEY); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 184, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_TUKEY);
    __Pyx_GIVEREF(__pyx_n_s_TUKEY);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_TUKEY)) __PYX_ERR(1, 184, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 184, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_TUKEY, __pyx_t_43) < 0))) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":185
 *     __Pyx_globals['GAUSSIAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(GAUSSIAN), 'GAUSSIAN')
 *     __Pyx_globals['TUKEY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY), 'TUKEY')
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV), 'DOLPH_CHEBYSHEV')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['HANN_POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON), 'HANN_POISSON')
 *     __Pyx_globals['CONNES'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES), 'CONNES')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_DOLPH_CHEBYSHEV); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 185, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_DOLPH_CHEBYSHEV);
    __Pyx_GIVEREF(__pyx_n_s_DOLPH_CHEBYSHEV);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_DOLPH_CHEBYSHEV)) __PYX_ERR(1, 185, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 185, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_DOLPH_CHEBYSHEV, __pyx_t_41) < 0))) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":186
 *     __Pyx_globals['TUKEY'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(TUKEY), 'TUKEY')
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV), 'DOLPH_CHEBYSHEV')
 *     __Pyx_globals['HANN_POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON), 'HANN_POISSON')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['CONNES'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES), 'CONNES')
 *     __Pyx_globals['SAMARAKI'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI), 'SAMARAKI')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_HANN_POISSON); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 186, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_HANN_POISSON);
    __Pyx_GIVEREF(__pyx_n_s_HANN_POISSON);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_HANN_POISSON)) __PYX_ERR(1, 186, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 186, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_HANN_POISSON, __pyx_t_10) < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":187
 *     __Pyx_globals['DOLPH_CHEBYSHEV'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DOLPH_CHEBYSHEV), 'DOLPH_CHEBYSHEV')
 *     __Pyx_globals['HANN_POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON), 'HANN_POISSON')
 *     __Pyx_globals['CONNES'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES), 'CONNES')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SAMARAKI'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI), 'SAMARAKI')
 *     __Pyx_globals['ULTRASPHERICAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL), 'ULTRASPHERICAL')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_CONNES); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 187, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_CONNES);
    __Pyx_GIVEREF(__pyx_n_s_CONNES);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_CONNES)) __PYX_ERR(1, 187, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 187, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_CONNES, __pyx_t_43) < 0))) __PYX_ERR(1, 187, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":188
 *     __Pyx_globals['HANN_POISSON'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(HANN_POISSON), 'HANN_POISSON')
 *     __Pyx_globals['CONNES'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES), 'CONNES')
 *     __Pyx_globals['SAMARAKI'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI), 'SAMARAKI')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['ULTRASPHERICAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL), 'ULTRASPHERICAL')
 *     __Pyx_globals['BARTLETT_HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN), 'BARTLETT_HANN')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_SAMARAKI); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 188, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_SAMARAKI);
    __Pyx_GIVEREF(__pyx_n_s_SAMARAKI);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_SAMARAKI)) __PYX_ERR(1, 188, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 188, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SAMARAKI, __pyx_t_41) < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":189
 *     __Pyx_globals['CONNES'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(CONNES), 'CONNES')
 *     __Pyx_globals['SAMARAKI'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI), 'SAMARAKI')
 *     __Pyx_globals['ULTRASPHERICAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL), 'ULTRASPHERICAL')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BARTLETT_HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN), 'BARTLETT_HANN')
 *     __Pyx_globals['BOHMAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN), 'BOHMAN')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_ULTRASPHERICAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 189, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_ULTRASPHERICAL);
    __Pyx_GIVEREF(__pyx_n_s_ULTRASPHERICAL);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_ULTRASPHERICAL)) __PYX_ERR(1, 189, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 189, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_ULTRASPHERICAL, __pyx_t_10) < 0))) __PYX_ERR(1, 189, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":190
 *     __Pyx_globals['SAMARAKI'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SAMARAKI), 'SAMARAKI')
 *     __Pyx_globals['ULTRASPHERICAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL), 'ULTRASPHERICAL')
 *     __Pyx_globals['BARTLETT_HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN), 'BARTLETT_HANN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BOHMAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN), 'BOHMAN')
 *     __Pyx_globals['FLAT_TOP'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP), 'FLAT_TOP')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BARTLETT_HANN); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 190, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BARTLETT_HANN);
    __Pyx_GIVEREF(__pyx_n_s_BARTLETT_HANN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_BARTLETT_HANN)) __PYX_ERR(1, 190, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 190, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BARTLETT_HANN, __pyx_t_43) < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":191
 *     __Pyx_globals['ULTRASPHERICAL'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(ULTRASPHERICAL), 'ULTRASPHERICAL')
 *     __Pyx_globals['BARTLETT_HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN), 'BARTLETT_HANN')
 *     __Pyx_globals['BOHMAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN), 'BOHMAN')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['FLAT_TOP'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP), 'FLAT_TOP')
 *     __Pyx_globals['BLACKMAN5'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5), 'BLACKMAN5')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BOHMAN); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 191, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BOHMAN);
    __Pyx_GIVEREF(__pyx_n_s_BOHMAN);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_BOHMAN)) __PYX_ERR(1, 191, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 191, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BOHMAN, __pyx_t_41) < 0))) __PYX_ERR(1, 191, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":192
 *     __Pyx_globals['BARTLETT_HANN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BARTLETT_HANN), 'BARTLETT_HANN')
 *     __Pyx_globals['BOHMAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN), 'BOHMAN')
 *     __Pyx_globals['FLAT_TOP'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP), 'FLAT_TOP')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN5'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5), 'BLACKMAN5')
 *     __Pyx_globals['BLACKMAN6'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6), 'BLACKMAN6')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_FLAT_TOP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 192, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_FLAT_TOP);
    __Pyx_GIVEREF(__pyx_n_s_FLAT_TOP);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_FLAT_TOP)) __PYX_ERR(1, 192, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 192, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_FLAT_TOP, __pyx_t_10) < 0))) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":193
 *     __Pyx_globals['BOHMAN'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BOHMAN), 'BOHMAN')
 *     __Pyx_globals['FLAT_TOP'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP), 'FLAT_TOP')
 *     __Pyx_globals['BLACKMAN5'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5), 'BLACKMAN5')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN6'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6), 'BLACKMAN6')
 *     __Pyx_globals['BLACKMAN7'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7), 'BLACKMAN7')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN5); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 193, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN5);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_BLACKMAN5)) __PYX_ERR(1, 193, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 193, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN5, __pyx_t_43) < 0))) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":194
 *     __Pyx_globals['FLAT_TOP'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(FLAT_TOP), 'FLAT_TOP')
 *     __Pyx_globals['BLACKMAN5'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5), 'BLACKMAN5')
 *     __Pyx_globals['BLACKMAN6'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6), 'BLACKMAN6')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN7'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7), 'BLACKMAN7')
 *     __Pyx_globals['BLACKMAN8'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8), 'BLACKMAN8')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN6); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 194, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN6);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_BLACKMAN6)) __PYX_ERR(1, 194, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 194, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN6, __pyx_t_41) < 0))) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":195
 *     __Pyx_globals['BLACKMAN5'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN5), 'BLACKMAN5')
 *     __Pyx_globals['BLACKMAN6'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6), 'BLACKMAN6')
 *     __Pyx_globals['BLACKMAN7'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7), 'BLACKMAN7')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN8'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8), 'BLACKMAN8')
 *     __Pyx_globals['BLACKMAN9'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9), 'BLACKMAN9')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN7); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 195, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN7);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_BLACKMAN7)) __PYX_ERR(1, 195, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 195, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN7, __pyx_t_10) < 0))) __PYX_ERR(1, 195, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":196
 *     __Pyx_globals['BLACKMAN6'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN6), 'BLACKMAN6')
 *     __Pyx_globals['BLACKMAN7'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7), 'BLACKMAN7')
 *     __Pyx_globals['BLACKMAN8'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8), 'BLACKMAN8')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN9'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9), 'BLACKMAN9')
 *     __Pyx_globals['BLACKMAN10'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10), 'BLACKMAN10')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN8); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 196, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN8);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_BLACKMAN8)) __PYX_ERR(1, 196, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 196, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN8, __pyx_t_43) < 0))) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":197
 *     __Pyx_globals['BLACKMAN7'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN7), 'BLACKMAN7')
 *     __Pyx_globals['BLACKMAN8'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8), 'BLACKMAN8')
 *     __Pyx_globals['BLACKMAN9'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9), 'BLACKMAN9')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['BLACKMAN10'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10), 'BLACKMAN10')
 *     __Pyx_globals['RV2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2), 'RV2')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN9); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 197, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN9);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_BLACKMAN9)) __PYX_ERR(1, 197, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 197, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN9, __pyx_t_41) < 0))) __PYX_ERR(1, 197, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":198
 *     __Pyx_globals['BLACKMAN8'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN8), 'BLACKMAN8')
 *     __Pyx_globals['BLACKMAN9'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9), 'BLACKMAN9')
 *     __Pyx_globals['BLACKMAN10'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10), 'BLACKMAN10')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2), 'RV2')
 *     __Pyx_globals['RV3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3), 'RV3')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_BLACKMAN10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 198, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_BLACKMAN10);
    __Pyx_GIVEREF(__pyx_n_s_BLACKMAN10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_BLACKMAN10)) __PYX_ERR(1, 198, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 198, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_BLACKMAN10, __pyx_t_10) < 0))) __PYX_ERR(1, 198, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":199
 *     __Pyx_globals['BLACKMAN9'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN9), 'BLACKMAN9')
 *     __Pyx_globals['BLACKMAN10'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10), 'BLACKMAN10')
 *     __Pyx_globals['RV2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2), 'RV2')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3), 'RV3')
 *     __Pyx_globals['RV4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4), 'RV4')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 199, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RV2);
    __Pyx_GIVEREF(__pyx_n_s_RV2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_RV2)) __PYX_ERR(1, 199, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 199, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV2, __pyx_t_43) < 0))) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":200
 *     __Pyx_globals['BLACKMAN10'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(BLACKMAN10), 'BLACKMAN10')
 *     __Pyx_globals['RV2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2), 'RV2')
 *     __Pyx_globals['RV3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3), 'RV3')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['RV4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4), 'RV4')
 *     __Pyx_globals['MLT_SINE'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE), 'MLT_SINE')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV3); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 200, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RV3);
    __Pyx_GIVEREF(__pyx_n_s_RV3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_RV3)) __PYX_ERR(1, 200, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 200, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV3, __pyx_t_41) < 0))) __PYX_ERR(1, 200, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":201
 *     __Pyx_globals['RV2'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV2), 'RV2')
 *     __Pyx_globals['RV3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3), 'RV3')
 *     __Pyx_globals['RV4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4), 'RV4')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['MLT_SINE'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE), 'MLT_SINE')
 *     __Pyx_globals['PAPOULIS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS), 'PAPOULIS')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_RV4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 201, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_RV4);
    __Pyx_GIVEREF(__pyx_n_s_RV4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_RV4)) __PYX_ERR(1, 201, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 201, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_RV4, __pyx_t_10) < 0))) __PYX_ERR(1, 201, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":202
 *     __Pyx_globals['RV3'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV3), 'RV3')
 *     __Pyx_globals['RV4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4), 'RV4')
 *     __Pyx_globals['MLT_SINE'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE), 'MLT_SINE')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['PAPOULIS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS), 'PAPOULIS')
 *     __Pyx_globals['DPSS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS), 'DPSS')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_MLT_SINE); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 202, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_MLT_SINE);
    __Pyx_GIVEREF(__pyx_n_s_MLT_SINE);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_MLT_SINE)) __PYX_ERR(1, 202, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 202, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_MLT_SINE, __pyx_t_43) < 0))) __PYX_ERR(1, 202, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

    /* "EnumType":203
 *     __Pyx_globals['RV4'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(RV4), 'RV4')
 *     __Pyx_globals['MLT_SINE'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE), 'MLT_SINE')
 *     __Pyx_globals['PAPOULIS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS), 'PAPOULIS')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['DPSS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS), 'DPSS')
 *     __Pyx_globals['SINC'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC), 'SINC')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_Window); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_PAPOULIS); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_41);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_41)) __PYX_ERR(1, 203, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_PAPOULIS);
    __Pyx_GIVEREF(__pyx_n_s_PAPOULIS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_PAPOULIS)) __PYX_ERR(1, 203, __pyx_L1_error);
    __pyx_t_41 = 0;
    __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_10, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 203, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_PAPOULIS, __pyx_t_41) < 0))) __PYX_ERR(1, 203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

    /* "EnumType":204
 *     __Pyx_globals['MLT_SINE'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(MLT_SINE), 'MLT_SINE')
 *     __Pyx_globals['PAPOULIS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS), 'PAPOULIS')
 *     __Pyx_globals['DPSS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS), 'DPSS')             # <<<<<<<<<<<<<<
 *     __Pyx_globals['SINC'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC), 'SINC')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_Window); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __pyx_t_10 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_DPSS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(1, 204, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_DPSS);
    __Pyx_GIVEREF(__pyx_n_s_DPSS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_n_s_DPSS)) __PYX_ERR(1, 204, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 204, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_DPSS, __pyx_t_10) < 0))) __PYX_ERR(1, 204, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "EnumType":205
 *     __Pyx_globals['PAPOULIS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(PAPOULIS), 'PAPOULIS')
 *     __Pyx_globals['DPSS'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(DPSS), 'DPSS')
 *     __Pyx_globals['SINC'] = Window(__Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(SINC), 'SINC')             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Window); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_43 = __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(__pyx_e_8pysndlib_3clm_SINC); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_41);
    __Pyx_GIVEREF(__pyx_t_43);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43)) __PYX_ERR(1, 205, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_SINC);
    __Pyx_GIVEREF(__pyx_n_s_SINC);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_n_s_SINC)) __PYX_ERR(1, 205, __pyx_L1_error);
    __pyx_t_43 = 0;
    __pyx_t_43 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_41, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_43);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
    if (unlikely(__Pyx_globals == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 205, __pyx_L1_error)
    }
    if (unlikely((PyDict_SetItem(__Pyx_globals, __pyx_n_s_SINC, __pyx_t_43) < 0))) __PYX_ERR(1, 205, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  }
  __pyx_L39:;

  /* "pysndlib/clm.pyx":10
 * 
 * 
 * import ctypes             # <<<<<<<<<<<<<<
 * import functools
 * import math
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_ctypes, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_43) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":11
 * 
 * import ctypes
 * import functools             # <<<<<<<<<<<<<<
 * import math
 * import os
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_functools, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_functools, __pyx_t_43) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":12
 * import ctypes
 * import functools
 * import math             # <<<<<<<<<<<<<<
 * import os
 * import random
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_math, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_43) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":13
 * import functools
 * import math
 * import os             # <<<<<<<<<<<<<<
 * import random
 * import subprocess
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_43) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":14
 * import math
 * import os
 * import random             # <<<<<<<<<<<<<<
 * import subprocess
 * import sys
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_random, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_43) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":15
 * import os
 * import random
 * import subprocess             # <<<<<<<<<<<<<<
 * import sys
 * import tempfile
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_subprocess, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_43) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":16
 * import random
 * import subprocess
 * import sys             # <<<<<<<<<<<<<<
 * import tempfile
 * import time
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_43) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":17
 * import subprocess
 * import sys
 * import tempfile             # <<<<<<<<<<<<<<
 * import time
 * import types
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_tempfile, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tempfile, __pyx_t_43) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":18
 * import sys
 * import tempfile
 * import time             # <<<<<<<<<<<<<<
 * import types
 * import cython
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_time, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_43) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":19
 * import tempfile
 * import time
 * import types             # <<<<<<<<<<<<<<
 * import cython
 * from cython.cimports.cpython.mem import PyMem_Malloc, PyMem_Realloc, PyMem_Free
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_types, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_43) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":23
 * from cython.cimports.cpython.mem import PyMem_Malloc, PyMem_Realloc, PyMem_Free
 * from cython cimport view
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport pysndlib.cclm as cclm
 */
  __pyx_t_43 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_43) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":34
 * 
 * # --------------- function types for ctypes ---------------- #
 * _inputcallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int)             # <<<<<<<<<<<<<<
 * _editcallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p)
 * _analyzecallback = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_c_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_43, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_c_int); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __pyx_t_43 = PyTuple_New(3); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_10)) __PYX_ERR(0, 34, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_42);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 1, __pyx_t_42)) __PYX_ERR(0, 34, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_43, 2, __pyx_t_40)) __PYX_ERR(0, 34, __pyx_L1_error);
  __pyx_t_10 = 0;
  __pyx_t_42 = 0;
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_43, NULL); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_inputcallback, __pyx_t_40) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":35
 * # --------------- function types for ctypes ---------------- #
 * _inputcallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int)
 * _editcallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p)             # <<<<<<<<<<<<<<
 * _analyzecallback = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int))
 * _synthesizecallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_c_int); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_41)) __PYX_ERR(0, 35, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_42);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_t_42)) __PYX_ERR(0, 35, __pyx_L1_error);
  __pyx_t_41 = 0;
  __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_Call(__pyx_t_43, __pyx_t_40, NULL); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_editcallback, __pyx_t_42) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

  /* "pysndlib/clm.pyx":36
 * _inputcallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int)
 * _editcallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p)
 * _analyzecallback = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int))             # <<<<<<<<<<<<<<
 * _synthesizecallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p)
 * _locsigdetourcallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_longlong)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_c_bool); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_c_double); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_39);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_38);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_c_int); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = PyTuple_New(3); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_GIVEREF(__pyx_t_39);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 0, __pyx_t_39)) __PYX_ERR(0, 36, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_38);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 1, __pyx_t_38)) __PYX_ERR(0, 36, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 2, __pyx_t_37)) __PYX_ERR(0, 36, __pyx_L1_error);
  __pyx_t_39 = 0;
  __pyx_t_38 = 0;
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_42, NULL); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = PyTuple_New(3); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_GIVEREF(__pyx_t_43);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 0, __pyx_t_43)) __PYX_ERR(0, 36, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 1, __pyx_t_41)) __PYX_ERR(0, 36, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 2, __pyx_t_37)) __PYX_ERR(0, 36, __pyx_L1_error);
  __pyx_t_43 = 0;
  __pyx_t_41 = 0;
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_PyObject_Call(__pyx_t_40, __pyx_t_42, NULL); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_analyzecallback, __pyx_t_37) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":37
 * _editcallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p)
 * _analyzecallback = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int))
 * _synthesizecallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p)             # <<<<<<<<<<<<<<
 * _locsigdetourcallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_longlong)
 * _envfunction = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double) # for env_any
 */
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_c_double); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = PyTuple_New(2); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_40)) __PYX_ERR(0, 37, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_t_41)) __PYX_ERR(0, 37, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_42, __pyx_t_37, NULL); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_synthesizecallback, __pyx_t_41) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":38
 * _analyzecallback = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p, ctypes.c_int))
 * _synthesizecallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p)
 * _locsigdetourcallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_longlong)             # <<<<<<<<<<<<<<
 * _envfunction = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double) # for env_any
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_41, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_41, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_41, __pyx_n_s_c_longlong); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __pyx_t_41 = PyTuple_New(3); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, Py_None)) __PYX_ERR(0, 38, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_42);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_t_42)) __PYX_ERR(0, 38, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 2, __pyx_t_40)) __PYX_ERR(0, 38, __pyx_L1_error);
  __pyx_t_42 = 0;
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_41, NULL); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsigdetourcallback, __pyx_t_40) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":39
 * _synthesizecallback = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_void_p)
 * _locsigdetourcallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_longlong)
 * _envfunction = ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double) # for env_any             # <<<<<<<<<<<<<<
 * 
 * #these may need to be set based on system type etc
 */
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_CFUNCTYPE); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_c_double); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_c_double); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_37)) __PYX_ERR(0, 39, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_42);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_t_42)) __PYX_ERR(0, 39, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_Call(__pyx_t_41, __pyx_t_40, NULL); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_envfunction, __pyx_t_42) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

  /* "pysndlib/clm.pyx":42
 * 
 * #these may need to be set based on system type etc
 * DEFAULT_OUTPUT_SRATE = 44100             # <<<<<<<<<<<<<<
 * DEFAULT_OUTPUT_CHANS = 1
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_SRATE, __pyx_int_44100) < 0) __PYX_ERR(0, 42, __pyx_L1_error)

  /* "pysndlib/clm.pyx":43
 * #these may need to be set based on system type etc
 * DEFAULT_OUTPUT_SRATE = 44100
 * DEFAULT_OUTPUT_CHANS = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_CHANS, __pyx_int_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error)

  /* "pysndlib/clm.pyx":47
 * 
 * 
 * DEFAULT_FILE_PLAYER = None             # <<<<<<<<<<<<<<
 * 
 * if sys.platform.startswith("darwin"):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILE_PLAYER, Py_None) < 0) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "pysndlib/clm.pyx":49
 * DEFAULT_FILE_PLAYER = None
 * 
 * if sys.platform.startswith("darwin"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'afplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_sys); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_platform); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_startswith); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_Call(__pyx_t_42, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_40); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":50
 * 
 * if sys.platform.startswith("darwin"):
 *     DEFAULT_FILE_PLAYER = 'afplay'             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILE_PLAYER, __pyx_n_u_afplay) < 0) __PYX_ERR(0, 50, __pyx_L1_error)

    /* "pysndlib/clm.pyx":51
 * if sys.platform.startswith("darwin"):
 *     DEFAULT_FILE_PLAYER = 'afplay'
 *     DEFAULT_FILE_NAME = 'test.wav'             # <<<<<<<<<<<<<<
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILE_NAME, __pyx_kp_u_test_wav) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

    /* "pysndlib/clm.pyx":52
 *     DEFAULT_FILE_PLAYER = 'afplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF             # <<<<<<<<<<<<<<
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 * 
 */
    __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(__pyx_e_8pysndlib_6sndlib_RIFF); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE, __pyx_t_40) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

    /* "pysndlib/clm.pyx":53
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT             # <<<<<<<<<<<<<<
 * 
 * if sys.platform.startswith("linux"):
 */
    __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_LFLOAT); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE, __pyx_t_40) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

    /* "pysndlib/clm.pyx":49
 * DEFAULT_FILE_PLAYER = None
 * 
 * if sys.platform.startswith("darwin"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'afplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  }

  /* "pysndlib/clm.pyx":55
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 * 
 * if sys.platform.startswith("linux"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'aplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_sys); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_platform); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_startswith); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_Call(__pyx_t_40, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_42); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":56
 * 
 * if sys.platform.startswith("linux"):
 *     DEFAULT_FILE_PLAYER = 'aplay'             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILE_PLAYER, __pyx_n_u_aplay) < 0) __PYX_ERR(0, 56, __pyx_L1_error)

    /* "pysndlib/clm.pyx":57
 * if sys.platform.startswith("linux"):
 *     DEFAULT_FILE_PLAYER = 'aplay'
 *     DEFAULT_FILE_NAME = 'test.wav'             # <<<<<<<<<<<<<<
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILE_NAME, __pyx_kp_u_test_wav) < 0) __PYX_ERR(0, 57, __pyx_L1_error)

    /* "pysndlib/clm.pyx":58
 *     DEFAULT_FILE_PLAYER = 'aplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF             # <<<<<<<<<<<<<<
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 * 
 */
    __pyx_t_42 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Header_to_py(__pyx_e_8pysndlib_6sndlib_RIFF); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE, __pyx_t_42) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "pysndlib/clm.pyx":59
 *     DEFAULT_FILE_NAME = 'test.wav'
 *     DEFAULT_OUTPUT_HEADER_TYPE = Header.RIFF
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT             # <<<<<<<<<<<<<<
 * 
 * # --------------- main clm prefs ---------------- #
 */
    __pyx_t_42 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_6sndlib_Sample_to_py(__pyx_e_8pysndlib_6sndlib_LFLOAT); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE, __pyx_t_42) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

    /* "pysndlib/clm.pyx":55
 *     DEFAULT_OUTPUT_SAMPLE_TYPE = Sample.LFLOAT
 * 
 * if sys.platform.startswith("linux"):             # <<<<<<<<<<<<<<
 *     DEFAULT_FILE_PLAYER = 'aplay'
 *     DEFAULT_FILE_NAME = 'test.wav'
 */
  }

  /* "pysndlib/clm.pyx":63
 * # --------------- main clm prefs ---------------- #
 * 
 * default  = types.SimpleNamespace(             # <<<<<<<<<<<<<<
 *     file_name = DEFAULT_FILE_NAME,
 *     srate = DEFAULT_OUTPUT_SRATE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_types); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_SimpleNamespace); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;

  /* "pysndlib/clm.pyx":64
 * 
 * default  = types.SimpleNamespace(
 *     file_name = DEFAULT_FILE_NAME,             # <<<<<<<<<<<<<<
 *     srate = DEFAULT_OUTPUT_SRATE,
 *     channels = DEFAULT_OUTPUT_CHANS,
 */
  __pyx_t_42 = __Pyx_PyDict_NewPresized(19); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_FILE_NAME); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_file_name, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":65
 * default  = types.SimpleNamespace(
 *     file_name = DEFAULT_FILE_NAME,
 *     srate = DEFAULT_OUTPUT_SRATE,             # <<<<<<<<<<<<<<
 *     channels = DEFAULT_OUTPUT_CHANS,
 *     sample_type = DEFAULT_OUTPUT_SAMPLE_TYPE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_OUTPUT_SRATE); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_srate, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":66
 *     file_name = DEFAULT_FILE_NAME,
 *     srate = DEFAULT_OUTPUT_SRATE,
 *     channels = DEFAULT_OUTPUT_CHANS,             # <<<<<<<<<<<<<<
 *     sample_type = DEFAULT_OUTPUT_SAMPLE_TYPE,
 *     header_type = DEFAULT_OUTPUT_HEADER_TYPE,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_OUTPUT_CHANS); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_channels, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":67
 *     srate = DEFAULT_OUTPUT_SRATE,
 *     channels = DEFAULT_OUTPUT_CHANS,
 *     sample_type = DEFAULT_OUTPUT_SAMPLE_TYPE,             # <<<<<<<<<<<<<<
 *     header_type = DEFAULT_OUTPUT_HEADER_TYPE,
 *     player = DEFAULT_FILE_PLAYER,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_OUTPUT_SAMPLE_TYPE); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_sample_type, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":68
 *     channels = DEFAULT_OUTPUT_CHANS,
 *     sample_type = DEFAULT_OUTPUT_SAMPLE_TYPE,
 *     header_type = DEFAULT_OUTPUT_HEADER_TYPE,             # <<<<<<<<<<<<<<
 *     player = DEFAULT_FILE_PLAYER,
 *     verbose = False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_OUTPUT_HEADER_TYPE); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_header_type, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":69
 *     sample_type = DEFAULT_OUTPUT_SAMPLE_TYPE,
 *     header_type = DEFAULT_OUTPUT_HEADER_TYPE,
 *     player = DEFAULT_FILE_PLAYER,             # <<<<<<<<<<<<<<
 *     verbose = False,
 *     play = False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_DEFAULT_FILE_PLAYER); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_player, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":70
 *     header_type = DEFAULT_OUTPUT_HEADER_TYPE,
 *     player = DEFAULT_FILE_PLAYER,
 *     verbose = False,             # <<<<<<<<<<<<<<
 *     play = False,
 *     statistics = False,
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_verbose, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":71
 *     player = DEFAULT_FILE_PLAYER,
 *     verbose = False,
 *     play = False,             # <<<<<<<<<<<<<<
 *     statistics = False,
 *     reverb = None,
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_play, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":72
 *     verbose = False,
 *     play = False,
 *     statistics = False,             # <<<<<<<<<<<<<<
 *     reverb = None,
 *     reverb_channels = 1,
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_statistics, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":73
 *     play = False,
 *     statistics = False,
 *     reverb = None,             # <<<<<<<<<<<<<<
 *     reverb_channels = 1,
 *     reverb_data = None,
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_reverb, Py_None) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_reverb_channels, __pyx_int_1) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":75
 *     reverb = None,
 *     reverb_channels = 1,
 *     reverb_data = None,             # <<<<<<<<<<<<<<
 *     reverb_file_name = 'test.rev',
 *     table_size = 512,
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_reverb_data, Py_None) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_reverb_file_name, __pyx_kp_u_test_rev) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_table_size, __pyx_int_512) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_buffer_size, __pyx_int_65536) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":79
 *     table_size = 512,
 *     buffer_size = 65536,
 *     locsig_type = Interp.LINEAR,             # <<<<<<<<<<<<<<
 *     clipped = False,
 *     output = False,
 */
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_locsig_type, __pyx_t_41) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":80
 *     buffer_size = 65536,
 *     locsig_type = Interp.LINEAR,
 *     clipped = False,             # <<<<<<<<<<<<<<
 *     output = False,
 *     delete_reverb = False
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_clipped, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":81
 *     locsig_type = Interp.LINEAR,
 *     clipped = False,
 *     output = False,             # <<<<<<<<<<<<<<
 *     delete_reverb = False
 * )
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_output, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":82
 *     clipped = False,
 *     output = False,
 *     delete_reverb = False             # <<<<<<<<<<<<<<
 * )
 * 
 */
  if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_delete_reverb, Py_False) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "pysndlib/clm.pyx":63
 * # --------------- main clm prefs ---------------- #
 * 
 * default  = types.SimpleNamespace(             # <<<<<<<<<<<<<<
 *     file_name = DEFAULT_FILE_NAME,
 *     srate = DEFAULT_OUTPUT_SRATE,
 */
  __pyx_t_41 = __Pyx_PyObject_Call(__pyx_t_40, __pyx_empty_tuple, __pyx_t_42); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default, __pyx_t_41) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":86
 * 
 * 
 * if os.path.exists(os.path.expanduser('~/.pysndlib')):             # <<<<<<<<<<<<<<
 *     exec(open(os.path.expanduser('~/.pysndlib')).read())
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_41, __pyx_n_s_os); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_41, __pyx_n_s_path); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_exists); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_os); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_path); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_expanduser); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_Call(__pyx_t_42, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyObject_CallOneArg(__pyx_t_41, __pyx_t_40); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_42); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  if (__pyx_t_2) {

    /* "pysndlib/clm.pyx":87
 * 
 * if os.path.exists(os.path.expanduser('~/.pysndlib')):
 *     exec(open(os.path.expanduser('~/.pysndlib')).read())             # <<<<<<<<<<<<<<
 * 
 * # --------------- initializations ---------------- #
 */
    __Pyx_GetModuleGlobalName(__pyx_t_42, __pyx_n_s_os); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_path); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_expanduser); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
    __pyx_t_40 = __Pyx_PyObject_Call(__pyx_t_42, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __pyx_t_42 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_t_40); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
    __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_42, __pyx_n_s_read); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __pyx_t_42 = __Pyx_PyObject_CallNoArg(__pyx_t_40); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_42);
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
    __pyx_t_40 = __Pyx_PyExecGlobals(__pyx_t_42); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_40);
    __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
    __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

    /* "pysndlib/clm.pyx":86
 * 
 * 
 * if os.path.exists(os.path.expanduser('~/.pysndlib')):             # <<<<<<<<<<<<<<
 *     exec(open(os.path.expanduser('~/.pysndlib')).read())
 * 
 */
  }

  /* "pysndlib/clm.pyx":91
 * # --------------- initializations ---------------- #
 * 
 * cclm.mus_initialize()             # <<<<<<<<<<<<<<
 * cclm.mus_set_rand_seed(int(time.time()))
 * csndlib.mus_sound_initialize()
 */
  mus_initialize();

  /* "pysndlib/clm.pyx":92
 * 
 * cclm.mus_initialize()
 * cclm.mus_set_rand_seed(int(time.time()))             # <<<<<<<<<<<<<<
 * csndlib.mus_sound_initialize()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_time); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_time); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_PyObject_CallNoArg(__pyx_t_42); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = __Pyx_PyNumber_Int(__pyx_t_40); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_44 = __Pyx_PyInt_As_uint64_t(__pyx_t_42); if (unlikely((__pyx_t_44 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  mus_set_rand_seed(__pyx_t_44);

  /* "pysndlib/clm.pyx":93
 * cclm.mus_initialize()
 * cclm.mus_set_rand_seed(int(time.time()))
 * csndlib.mus_sound_initialize()             # <<<<<<<<<<<<<<
 * 
 * cdef void clm_error_handler(int error_type, char* msg):
 */
  (void)(mus_sound_initialize());

  /* "pysndlib/clm.pyx":99
 *     raise SNDLibError(message)
 * 
 * class SNDLibError(Exception):             # <<<<<<<<<<<<<<
 *     """
 *     this is general class to raise an print errors as defined in sndlib. it is to be used internally by the defined error handler registered with sndlib
 */
  __pyx_t_42 = PyTuple_New(1); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_42, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 99, __pyx_L1_error);
  __pyx_t_40 = __Pyx_PEP560_update_bases(__pyx_t_42); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_41 = __Pyx_CalculateMetaclass(NULL, __pyx_t_40); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_37 = __Pyx_Py3MetaclassPrepare(__pyx_t_41, __pyx_t_40, __pyx_n_s_SNDLibError, __pyx_n_s_SNDLibError, (PyObject *) NULL, __pyx_n_s_pysndlib_clm, __pyx_kp_s_this_is_general_class_to_raise); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (__pyx_t_40 != __pyx_t_42) {
    if (unlikely((PyDict_SetItemString(__pyx_t_37, "__orig_bases__", __pyx_t_42) < 0))) __PYX_ERR(0, 99, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  __pyx_t_42 = PyList_New(0); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_42);

  /* "pysndlib/clm.pyx":106
 *     """
 * 
 *     def ___init___(self, message):             # <<<<<<<<<<<<<<
 *         super().__init__(self.message)
 * 
 */
  __pyx_t_43 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_11SNDLibError_1___init___, 0, __pyx_n_s_SNDLibError____init, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __Pyx_INCREF(__pyx_t_43);
  PyList_Append(__pyx_t_42, __pyx_t_43);
  __Pyx_GIVEREF(__pyx_t_43);
  if (__Pyx_SetNameInClass(__pyx_t_37, __pyx_n_s_init_2, __pyx_t_43) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":99
 *     raise SNDLibError(message)
 * 
 * class SNDLibError(Exception):             # <<<<<<<<<<<<<<
 *     """
 *     this is general class to raise an print errors as defined in sndlib. it is to be used internally by the defined error handler registered with sndlib
 */
  __pyx_t_43 = __Pyx_Py3ClassCreate(__pyx_t_41, __pyx_n_s_SNDLibError, __pyx_t_40, __pyx_t_37, NULL, 0, 0); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (__Pyx_CyFunction_InitClassCell(__pyx_t_42, __pyx_t_43) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SNDLibError, __pyx_t_43) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":111
 * 
 * 
 * cpdef check_ndim(arr: npt.NDArray[np.float64], dim=1):             # <<<<<<<<<<<<<<
 *     if arr.ndim != dim:
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 */
  __pyx_t_40 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_t_40, __pyx_n_s_arr, __pyx_kp_s_npt_NDArray_np_float64) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_1check_ndim, 0, __pyx_n_s_check_ndim, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__103);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_41, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_ndim, __pyx_t_41) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":115
 *         raise TypeError(f'expecting {dim} dimemsions but received {arr.ndim}.')
 * 
 * cpdef check_range(arg: str, x, low=None, high=None):             # <<<<<<<<<<<<<<
 *     if x is None:
 *         return
 */
  __pyx_t_41 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_arg, __pyx_n_s_str_2) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_3check_range, 0, __pyx_n_s_check_range, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__106);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_40, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_range, __pyx_t_40) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":126
 * 
 * 
 * cpdef compare_shapes(arr1: npt.NDArray[np.float64], arr2: npt.NDArray[np.float64]):             # <<<<<<<<<<<<<<
 *     if arr1.shape != arr2.shape:
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 */
  __pyx_t_40 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_t_40, __pyx_n_s_arr1, __pyx_kp_s_npt_NDArray_np_float64) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_40, __pyx_n_s_arr2, __pyx_kp_s_npt_NDArray_np_float64) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_5compare_shapes, 0, __pyx_n_s_compare_shapes, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_41, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_compare_shapes, __pyx_t_41) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":130
 *         raise RuntimeError(f'ndarrays of unequal shape {arr1.shape } vs. {arr2.shape }.')
 * 
 * csndlib.mus_error_set_handler(<csndlib.mus_error_handler_t *>clm_error_handler)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (void)(mus_error_set_handler(((mus_error_handler_t *)__pyx_f_8pysndlib_3clm_clm_error_handler)));

  /* "pysndlib/clm.pyx":212
 *         return wrapper
 * 
 *     cpdef cache_append(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_7cache_append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_cache_append, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_cache_append, __pyx_t_41) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":218
 *         self._cache.append(obj)
 * 
 *     cpdef cache_extend(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_9cache_extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_cache_extend, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_cache_extend, __pyx_t_41) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":226
 *     # this stuff with view.array is to work around an apparent bug when automatic string handling is turned on
 *     # https://github.com/cython/cython/issues/4521
 *     cpdef set_up_data(self , cython.int length=0):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_11set_up_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_set_up_data, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__114);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_set_up_data, __pyx_t_41) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":245
 *             self._data = None
 * 
 *     cpdef set_up_xcoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_13set_up_xcoeffs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_set_up_xcoeffs, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_set_up_xcoeffs, __pyx_t_41) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":272
 *             self._xcoeffs = np.asarray(arr)
 * 
 *     cpdef set_up_ycoeffs(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_15set_up_ycoeffs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_set_up_ycoeffs, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_set_up_ycoeffs, __pyx_t_41) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":300
 * 
 * 
 *     cpdef set_up_pv_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         :meta private:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_17set_up_pv_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_set_up_pv_data, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_set_up_pv_data, __pyx_t_41) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":342
 *         return f'{mus_any} {cclm.mus_describe(self._ptr)}'
 * 
 *     cpdef mus_reset(self):             # <<<<<<<<<<<<<<
 *         cclm.mus_reset(self._ptr)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_23mus_reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_mus_reset, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_mus_reset, __pyx_t_41) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "pysndlib/clm.pyx":345
 *         cclm.mus_reset(self._ptr)
 * 
 *     cpdef next(self, cython.double arg1=0.0, cython.double arg2=0.0):             # <<<<<<<<<<<<<<
 *         return cclm.mus_run(self._ptr, arg1,arg2)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_25next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_next, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__121);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_mus_any, __pyx_n_s_next, __pyx_t_41) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_mus_any);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any___reduce_cython, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_41) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7mus_any_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any___setstate_cython, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_41) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_13mus_any_array_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_array___reduce_cython, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_41) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_13mus_any_array_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_mus_any_array___setstate_cython, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_41) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":614
 * 
 * # --------------- file2ndarray, ndarray2file ---------------- #
 * cpdef file2ndarray(str filename, channel=None, beg=None, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an ndarray with samples from file and the sample rate of the data
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_7file2ndarray, 0, __pyx_n_s_file2ndarray_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__63);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_file2ndarray_2, __pyx_t_41) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":644
 *     return out, sr
 * 
 * cpdef ndarray2file(str filename, np.ndarray arr, size=None, sr=None, sample_type=None, header_type=None, comment=None ):             # <<<<<<<<<<<<<<
 *     """
 *     write an ndarray of samples to file
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_9ndarray2file, 0, __pyx_n_s_ndarray2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__130);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ndarray2file, __pyx_t_41) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":698
 * 
 * # --------------- with sound context manager ---------------- #
 * class Sound(object):             # <<<<<<<<<<<<<<
 *     """
 *     context manager which handles creating output and other options
 */
  __pyx_t_41 = __Pyx_PEP560_update_bases(__pyx_tuple__132); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_40 = __Pyx_CalculateMetaclass(NULL, __pyx_t_41); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = __Pyx_Py3MetaclassPrepare(__pyx_t_40, __pyx_t_41, __pyx_n_s_Sound, __pyx_n_s_Sound, (PyObject *) NULL, __pyx_n_s_pysndlib_clm, __pyx_kp_s_context_manager_which_handles_c); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (__pyx_t_41 != __pyx_tuple__132) {
    if (unlikely((PyDict_SetItemString(__pyx_t_37, "__orig_bases__", __pyx_tuple__132) < 0))) __PYX_ERR(0, 698, __pyx_L1_error)
  }

  /* "pysndlib/clm.pyx":722
 *     """
 * 
 *     def __init__(self, output=None,             # <<<<<<<<<<<<<<
 *                         channels=None,
 *                         srate=None,
 */
  __pyx_t_43 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_5Sound_1__init__, 0, __pyx_n_s_Sound___init, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_43, __pyx_tuple__135);
  if (__Pyx_SetNameInClass(__pyx_t_37, __pyx_n_s_init, __pyx_t_43) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":762
 *         self.finalize = finalize
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if not self.clipped:
 *             if (self.scaled_by or self.scaled_to) and (self.sample_type in [Sample.BFLOAT, Sample.LFLOAT, Sample.BDOUBLE, Sample.LDOUBLE]):
 */
  __pyx_t_43 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_5Sound_3__enter__, 0, __pyx_n_s_Sound___enter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (__Pyx_SetNameInClass(__pyx_t_37, __pyx_n_s_enter, __pyx_t_43) < 0) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":802
 *         return self
 * 
 *     def __exit__(self, *args):             # <<<<<<<<<<<<<<
 *         cdef cclm.mus_float_t [:] vals_view = None
 *         cdef cclm.mus_long_t [:] times_view = None
 */
  __pyx_t_43 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_5Sound_5__exit__, 0, __pyx_n_s_Sound___exit, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (__Pyx_SetNameInClass(__pyx_t_37, __pyx_n_s_exit, __pyx_t_43) < 0) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;

  /* "pysndlib/clm.pyx":698
 * 
 * # --------------- with sound context manager ---------------- #
 * class Sound(object):             # <<<<<<<<<<<<<<
 *     """
 *     context manager which handles creating output and other options
 */
  __pyx_t_43 = __Pyx_Py3ClassCreate(__pyx_t_40, __pyx_n_s_Sound, __pyx_t_41, __pyx_t_37, NULL, 0, 0); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_43);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sound, __pyx_t_43) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":928
 * 
 * 
 * cpdef is_list_or_ndarray(x):             # <<<<<<<<<<<<<<
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_11is_list_or_ndarray, 0, __pyx_n_s_is_list_or_ndarray, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_list_or_ndarray, __pyx_t_41) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":931
 *     return isinstance(x, list) or isinstance(x, np.ndarray)
 * 
 * cpdef is_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return (((x) - 1) & (x)) == 0
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_13is_power_of_2, 0, __pyx_n_s_is_power_of_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_power_of_2, __pyx_t_41) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":934
 *     return (((x) - 1) & (x)) == 0
 * 
 * cpdef next_power_of_2(x):             # <<<<<<<<<<<<<<
 *     return 2**int(1 + (float(math.log(x + 1)) / math.log(2.0)))
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_15next_power_of_2, 0, __pyx_n_s_next_power_of_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_next_power_of_2, __pyx_t_41) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":939
 * 
 * # TODO: could be simplified now
 * cpdef np.ndarray to_partials(harms):             # <<<<<<<<<<<<<<
 *     if isinstance(harms, list):
 *         p = harms[::2]
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_17to_partials, 0, __pyx_n_s_to_partials, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_partials, __pyx_t_41) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":965
 * 
 * 
 * cpdef int mus_close(mus_any obj):             # <<<<<<<<<<<<<<
 *     return cclm.mus_close_file(obj._ptr)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_19mus_close, 0, __pyx_n_s_mus_close, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_close, __pyx_t_41) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":968
 *     return cclm.mus_close_file(obj._ptr)
 * 
 * cpdef bint mus_is_output(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_21mus_is_output, 0, __pyx_n_s_mus_is_output, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_is_output, __pyx_t_41) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":974
 *     return cclm.mus_is_output(obj._ptr)
 * 
 * cpdef bint mus_is_input(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a type of output
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_23mus_is_input, 0, __pyx_n_s_mus_is_input, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_is_input, __pyx_t_41) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":980
 *     return cclm.mus_is_input(obj._ptr)
 * 
 * cpdef mus_reset(mus_any obj):             # <<<<<<<<<<<<<<
 *     """
 *     set gen to default starting state
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_25mus_reset, 0, __pyx_n_s_mus_reset, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_reset, __pyx_t_41) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":991
 * # --------------- length ---------------- #
 * 
 * cpdef cython.long get_length(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in samples of a sound file, list, ndarray, or generator"""
 *     #assume file
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_27get_length, 0, __pyx_n_s_get_length, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_length, __pyx_t_41) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1019
 * # --------------- channels ---------------- #
 * 
 * cpdef cython.long get_channels(obj):             # <<<<<<<<<<<<<<
 *     """Returns number of channels of a sound file, list, ndarray"""
 *     if isinstance(obj, str):
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_29get_channels, 0, __pyx_n_s_get_channels, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_channels, __pyx_t_41) < 0) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1042
 * 
 * 
 * cpdef cython.double get_srate(obj=None):             # <<<<<<<<<<<<<<
 *     """Return current sample rate"""
 *     if obj is None:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_31get_srate, 0, __pyx_n_s_get_srate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_srate, __pyx_t_41) < 0) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1051
 * # --------------- framples ---------------- #
 * 
 * cpdef cython.long get_framples(obj):             # <<<<<<<<<<<<<<
 *     """Returns length in frames of a sound file, list, ndarray, or generator"""
 *     if isinstance(obj, str):
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_33get_framples, 0, __pyx_n_s_get_framples, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_framples, __pyx_t_41) < 0) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1074
 * # --------------- clm random ---------------- #
 * 
 * cpdef cython.double random(cython.double x=1.0):             # <<<<<<<<<<<<<<
 *     """Returns random number +- x"""
 *     return cclm.mus_random(x)
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_35random, 0, __pyx_n_s_random, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__156);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_41) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1079
 * # --------------- just some extra utils ---------------- #
 * 
 * def validate_envelope(e):             # <<<<<<<<<<<<<<
 *     # is env even number length
 *     if len(e) < 2:
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_37validate_envelope, 0, __pyx_n_s_validate_envelope, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_validate_envelope, __pyx_t_41) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1092
 * 
 * 
 * cpdef bint is_zero(cython.double x):             # <<<<<<<<<<<<<<
 *     return x == 0
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_39is_zero, 0, __pyx_n_s_is_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_zero, __pyx_t_41) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1095
 *     return x == 0
 * 
 * cpdef bint is_number(n):             # <<<<<<<<<<<<<<
 *     return type(n) == int or type(n) == float
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_41is_number, 0, __pyx_n_s_is_number, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_number, __pyx_t_41) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1098
 *     return type(n) == int or type(n) == float
 * 
 * cpdef bint is_odd(n):             # <<<<<<<<<<<<<<
 *     return n % 2 == 0
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_43is_odd, 0, __pyx_n_s_is_odd, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_odd, __pyx_t_41) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1101
 *     return n % 2 == 0
 * 
 * cpdef bint is_even(n):             # <<<<<<<<<<<<<<
 *     return n % 2 != 0
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_45is_even, 0, __pyx_n_s_is_even, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_even, __pyx_t_41) < 0) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1106
 * # # --------------- clm utility functions ---------------- #
 * #
 * cpdef cython.double radians2hz(cython.double radians ):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians per sample to frequency:  `hz = rads * srate / (2 * pi)`.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_47radians2hz, 0, __pyx_n_s_radians2hz, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_radians2hz, __pyx_t_41) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1116
 *     return cclm.mus_radians_to_hz(radians)
 * 
 * cpdef cython.double hz2radians(cython.double hz):             # <<<<<<<<<<<<<<
 *     """
 *     convert frequency in hz to radians per sample:  `hz * 2 * pi / srate`.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_49hz2radians, 0, __pyx_n_s_hz2radians, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hz2radians, __pyx_t_41) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1126
 *     return cclm.mus_hz_to_radians(hz)
 * 
 * cpdef cython.double degrees2radians(cython.double degrees):             # <<<<<<<<<<<<<<
 *     """
 *     convert degrees to radians:  `degrees * 2 * pi / 360`.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_51degrees2radians, 0, __pyx_n_s_degrees2radians, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_degrees2radians, __pyx_t_41) < 0) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1137
 *     return cclm.mus_degrees_to_radians(degrees)
 * 
 * cpdef cython.double radians2degrees(cython.double radians):             # <<<<<<<<<<<<<<
 *     """
 *     convert radians to degrees: `rads * 360 / (2 * pi)`.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_53radians2degrees, 0, __pyx_n_s_radians2degrees, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_radians2degrees, __pyx_t_41) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1149
 *     return cclm.mus_radians_to_degrees(radians)
 * 
 * cpdef cython.double db2linear(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert decibel value db to linear value: `pow(10, db / 20)`.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_55db2linear, 0, __pyx_n_s_db2linear, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_db2linear, __pyx_t_41) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1161
 *     return cclm.mus_db_to_linear(x)
 * 
 * cpdef cython.double linear2db(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     convert linear value to decibels 20 * log10(lin).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_57linear2db, 0, __pyx_n_s_linear2db, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_linear2db, __pyx_t_41) < 0) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1173
 *     return cclm.mus_linear_to_db(x)
 * 
 * cpdef cython.double odd_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest odd integer to x.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_59odd_multiple, 0, __pyx_n_s_odd_multiple, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_odd_multiple, __pyx_t_41) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1186
 *     return cclm.mus_odd_multiple(x,y)
 * 
 * cpdef cython.double even_multiple(cython.double x, cython.double y):             # <<<<<<<<<<<<<<
 *     """
 *     return y times the nearest even integer to x.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_61even_multiple, 0, __pyx_n_s_even_multiple, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_even_multiple, __pyx_t_41) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1198
 *     return cclm.mus_even_multiple(x,y)
 * 
 * cpdef cython.double odd_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is even) and 1.0 (x is odd).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_63odd_weight, 0, __pyx_n_s_odd_weight, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_odd_weight, __pyx_t_41) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1210
 *     return cclm.mus_odd_weight(x)
 * 
 * cpdef cython.double even_weight(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     return a number between 0.0 (x is odd) and 1.0 (x is even).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_65even_weight, 0, __pyx_n_s_even_weight, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_even_weight, __pyx_t_41) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1231
 * #     return cclm.mus_srate()
 * 
 * cpdef cython.double set_srate(cython.double r):             # <<<<<<<<<<<<<<
 *     """
 *     set current sample rate.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_67set_srate, 0, __pyx_n_s_set_srate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_srate, __pyx_t_41) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1237
 *     return cclm.mus_set_srate(r)
 * 
 * cpdef cython.long seconds2samples(cython.double secs):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert seconds to samples.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_69seconds2samples, 0, __pyx_n_s_seconds2samples, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_seconds2samples, __pyx_t_41) < 0) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1247
 *     return cclm.mus_seconds_to_samples(secs)
 * 
 * cpdef cython.double samples2seconds(cython.long samples):             # <<<<<<<<<<<<<<
 *     """
 *     use mus_srate to convert samples to seconds.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_71samples2seconds, 0, __pyx_n_s_samples2seconds, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_samples2seconds, __pyx_t_41) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1258
 *     return cclm.mus_samples_to_seconds(samples)
 * 
 * cpdef cython.double ring_modulate(cython.double s1, cython.double s2):             # <<<<<<<<<<<<<<
 *     """
 *     return s1 * s2 (sample by sample multiply).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_73ring_modulate, 0, __pyx_n_s_ring_modulate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ring_modulate, __pyx_t_41) < 0) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1271
 *     return cclm.mus_ring_modulate(s1, s2)
 * 
 * cpdef cython.double amplitude_modulate(cython.double s1, cython.double s2, cython.double s3):             # <<<<<<<<<<<<<<
 *     """
 *     carrier in1 in2): in1 * (carrier + in2).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_75amplitude_modulate, 0, __pyx_n_s_amplitude_modulate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_amplitude_modulate, __pyx_t_41) < 0) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1284
 *     return cclm.mus_amplitude_modulate(s1, s2, s3)
 * 
 * cpdef cython.double contrast_enhancement(cython.double insig, cython.double fm_index= 1.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     returns insig (index 1.0)): sin(sig * pi / 2 + fm_index * sin(sig * 2 * pi))
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_77contrast_enhancement, 0, __pyx_n_s_contrast_enhancement, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__190);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_contrast_enhancement, __pyx_t_41) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1298
 * 
 * 
 * cpdef cython.double dot_product(np.ndarray data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     returns v1 v2 (size)): sum of v1[i] * v2[i] (also named scalar product).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_79dot_product, 0, __pyx_n_s_dot_product, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dot_product, __pyx_t_41) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1317
 * 
 * # changed 11-26-23 to not modify inplace
 * cpdef cython.double polynomial(np.ndarray coeffs, cython.double x ):             # <<<<<<<<<<<<<<
 *     """
 *     evaluate a polynomial at x.  coeffs are in order of degree, so coeff[0] is the constant term.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_81polynomial, 0, __pyx_n_s_polynomial, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polynomial, __pyx_t_41) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1331
 *     return cclm.mus_polynomial(&coeffs_view[0], x, len(coeffs))
 * 
 * cpdef cython.double array_interp(np.ndarray  fn, cython.double  x):             # <<<<<<<<<<<<<<
 *     """
 *     taking into account wrap-around (size is size of data), with linear interpolation if phase is not an integer.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_83array_interp, 0, __pyx_n_s_array_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_interp, __pyx_t_41) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1345
 *     return cclm.mus_array_interp(&fn_view[0], x, len(fn))
 * 
 * cpdef cython.double bessi0(cython.double x):             # <<<<<<<<<<<<<<
 *     """
 *     bessel function of zeroth order
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_85bessi0, 0, __pyx_n_s_bessi0, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bessi0, __pyx_t_41) < 0) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1351
 *     return cclm.mus_bessi0(x)
 * 
 * cpdef cython.double mus_interpolate(Interp interp_type, cython.double x, np.ndarray table, cython.double y1 =0.):             # <<<<<<<<<<<<<<
 *     """
 *     interpolate in data ('table' is a ndarray) using interpolation 'type', such as Interp.linear.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_87mus_interpolate, 0, __pyx_n_s_mus_interpolate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__200);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_interpolate, __pyx_t_41) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1366
 *     return cclm.mus_interpolate(<cclm.mus_interp_t>interp_type, x, &table_view[0], len(table), y1)
 * 
 * cpdef np.ndarray make_fft_window(Window window_type, cython.int size, cython.double beta=0.0 , cython.double alpha=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     fft data window (a ndarray). type is one of the sndlib fft window identifiers such as
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_89make_fft_window, 0, __pyx_n_s_make_fft_window, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__203);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fft_window, __pyx_t_41) < 0) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1386
 *     return win
 * 
 * cpdef np.ndarray mus_fft(np.ndarray rdat, np.ndarray  idat, cython.int fft_size , cython.int sign):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_91mus_fft, 0, __pyx_n_s_mus_fft, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_fft, __pyx_t_41) < 0) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1409
 * 
 * 
 * cpdef np.ndarray fft(np.ndarray rdat, np.ndarray idat,  cython.int fft_size, cython.int sign ):             # <<<<<<<<<<<<<<
 *     """
 *     return the fft of rl and im which contain the real and imaginary parts of the data; len should be a
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_93fft, 0, __pyx_n_s_fft, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fft, __pyx_t_41) < 0) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1436
 * 
 * 
 * cpdef np.ndarray mus_rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in s rl and im from rectangular form (fft output) to polar form (a
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_95mus_rectangular2polar, 0, __pyx_n_s_mus_rectangular2polar, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_rectangular2polar, __pyx_t_41) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1458
 *     return rdat
 * 
 * cpdef tuple rectangular2polar(np.ndarray  rdat, np.ndarray  idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rdat and idat from rectangular form (fft output) to polar form (a
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_97rectangular2polar, 0, __pyx_n_s_rectangular2polar, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rectangular2polar, __pyx_t_41) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1483
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_99mus_rectangular2magnitudes, 0, __pyx_n_s_mus_rectangular2magnitudes, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_rectangular2magnitudes, __pyx_t_41) < 0) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1503
 *     return rdat
 * 
 * cpdef tuple rectangular2magnitudes(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     convert real/imaginary data in rl and im from rectangular form (fft output) to polar form, but
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_101rectangular2magnitudes, 0, __pyx_n_s_rectangular2magnitudes, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rectangular2magnitudes, __pyx_t_41) < 0) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1526
 *     return rdat_cpy, idat_cpy
 * 
 * cpdef np.ndarray mus_polar2rectangular( np.ndarray rdat,  np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_103mus_polar2rectangular, 0, __pyx_n_s_mus_polar2rectangular, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_polar2rectangular, __pyx_t_41) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1545
 * 
 * 
 * cpdef tuple polar2rectangular(np.ndarray rdat, np.ndarray idat):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convert real/imaginary data in rl and im from polar (spectrum) to rectangular (fft).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_105polar2rectangular, 0, __pyx_n_s_polar2rectangular, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polar2rectangular, __pyx_t_41) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1568
 * 
 * 
 * cpdef np.ndarray mus_spectrum(np.ndarray  rdat, np.ndarray   idat, np.ndarray  window, Spectrum norm_type= Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */
  __pyx_k__27 = __pyx_e_8pysndlib_3clm_IN_DB;
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py(__pyx_e_8pysndlib_3clm_IN_DB); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_40 = PyTuple_New(1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_41)) __PYX_ERR(0, 1568, __pyx_L1_error);
  __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_107mus_spectrum, 0, __pyx_n_s_mus_spectrum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_spectrum, __pyx_t_41) < 0) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1602
 * 
 * 
 * cpdef tuple spectrum(np.ndarray rdat,np.ndarray  idat,np.ndarray window, Spectrum norm_type=Spectrum.IN_DB):             # <<<<<<<<<<<<<<
 *     """
 *     real and imaginary data in ndarrays rl and im, returns (in rl) the spectrum thereof; window is the
 */
  __pyx_k__28 = __pyx_e_8pysndlib_3clm_IN_DB;
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Spectrum_to_py(__pyx_e_8pysndlib_3clm_IN_DB); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_40 = PyTuple_New(1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_41)) __PYX_ERR(0, 1602, __pyx_L1_error);
  __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_109spectrum, 0, __pyx_n_s_spectrum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_spectrum, __pyx_t_41) < 0) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1637
 * 
 * 
 * cpdef np.ndarray mus_convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     in-place operation. convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_111mus_convolution, 0, __pyx_n_s_mus_convolution, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__219);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_convolution, __pyx_t_41) < 0) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1660
 * 
 * 
 * cpdef np.ndarray convolution(np.ndarray  rl1, np.ndarray  rl2, fft_size = 512):             # <<<<<<<<<<<<<<
 *     """
 *     convolution of ndarrays v1 with v2, using fft of size len (a power of 2), result in v1.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_113convolution, 0, __pyx_n_s_convolution, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__219);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_convolution, __pyx_t_41) < 0) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1686
 *     return rl1_cpy
 * 
 * cpdef np.ndarray mus_autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     in place autocorrelation of data (a ndarray).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_115mus_autocorrelate, 0, __pyx_n_s_mus_autocorrelate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_autocorrelate, __pyx_t_41) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1703
 * 
 * 
 * cpdef np.ndarray autocorrelate(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     autocorrelation of data (a ndarray).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_117autocorrelate, 0, __pyx_n_s_autocorrelate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_autocorrelate, __pyx_t_41) < 0) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1720
 *     return data_cpy
 * 
 * cpdef np.ndarray mus_correlate( np.ndarray  data1,  np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     in place cross-correlation of data1 and data2 (both ndarrays).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_119mus_correlate, 0, __pyx_n_s_mus_correlate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_correlate, __pyx_t_41) < 0) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1743
 * 
 * 
 * cpdef np.ndarray correlate(np.ndarray  data1, np.ndarray  data2):             # <<<<<<<<<<<<<<
 *     """
 *     cross-correlation of data1 and data2 (both ndarrays).
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_121correlate, 0, __pyx_n_s_correlate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_correlate, __pyx_t_41) < 0) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1767
 *     return data1_cpy
 * 
 * cpdef np.ndarray mus_cepstrum( np.ndarray  data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_123mus_cepstrum, 0, __pyx_n_s_mus_cepstrum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mus_cepstrum, __pyx_t_41) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1781
 *     return data
 * 
 * cpdef np.ndarray cepstrum(np.ndarray data):             # <<<<<<<<<<<<<<
 *     """
 *     return cepstrum of signal
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_125cepstrum, 0, __pyx_n_s_cepstrum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cepstrum, __pyx_t_41) < 0) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1796
 *     return data_cpy
 * 
 * cpdef np.ndarray partials2wave(partials,  np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list or np.ndarray of partials (harmonic number and associated amplitude) and produce a
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_127partials2wave, 0, __pyx_n_s_partials2wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__230);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partials2wave, __pyx_t_41) < 0) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1834
 *     return wave
 * 
 * cpdef np.ndarray phase_partials2wave(partials, np.ndarray wave=None, table_size=None, bint norm=True ):             # <<<<<<<<<<<<<<
 *     """
 *     take a list of partials (harmonic number, amplitude, initial phase) and produce a waveform for use
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_129phase_partials2wave, 0, __pyx_n_s_phase_partials2wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__232);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_partials2wave, __pyx_t_41) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1868
 *     return wave
 * 
 * cpdef np.ndarray partials2polynomial(partials, Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 *     """
 *     returns a chebyshev polynomial suitable for use with the polynomial generator to create (via
 */
  __pyx_k__29 = __pyx_e_8pysndlib_3clm_FIRST_KIND;
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(__pyx_e_8pysndlib_3clm_FIRST_KIND); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_40 = PyTuple_New(1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_41)) __PYX_ERR(0, 1868, __pyx_L1_error);
  __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_131partials2polynomial, 0, __pyx_n_s_partials2polynomial, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partials2polynomial, __pyx_t_41) < 0) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1892
 * 
 * 
 * cpdef np.ndarray normalize_partials(partials):             # <<<<<<<<<<<<<<
 *     """
 *     scales the partial amplitudes in the list/array or list 'partials' by the inverse of their sum (so
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_133normalize_partials, 0, __pyx_n_s_normalize_partials, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_normalize_partials, __pyx_t_41) < 0) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1921
 *     return result
 * 
 * cpdef cython.double chebyshev_tu_sum( cython.double x, tcoeffs, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn and un, with phase x
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_135chebyshev_tu_sum, 0, __pyx_n_s_chebyshev_tu_sum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chebyshev_tu_sum, __pyx_t_41) < 0) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1943
 * 
 * 
 * cpdef cython.double chebyshev_t_sum(cython.double x, tcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials tn
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_137chebyshev_t_sum, 0, __pyx_n_s_chebyshev_t_sum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chebyshev_t_sum, __pyx_t_41) < 0) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1958
 *     return cclm.mus_chebyshev_t_sum(x,len(tcoeffs_cpy), &tcoeffs_view[0])
 * 
 * cpdef cython.double chebyshev_u_sum(cython.double x, ucoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     returns the sum of the weighted chebyshev polynomials un
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_139chebyshev_u_sum, 0, __pyx_n_s_chebyshev_u_sum, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chebyshev_u_sum, __pyx_t_41) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1978
 * 
 * # ---------------- oscil ---------------- #
 * cpdef mus_any make_oscil(cython.double frequency=0.,cython.double  initial_phase = 0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil (sinewave) generator
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_141make_oscil, 0, __pyx_n_s_make_oscil, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__245);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_oscil, __pyx_t_41) < 0) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1992
 * 
 * ## Changing to avoid None overhead. Think it slows thing s down even if mus_oscil_unmodulated can be used.
 * cpdef cython.double oscil(mus_any gen, cython.double fm=0.0, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen: val = sin(phase + pm); phase += (freq + fm)
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_143oscil, 0, __pyx_n_s_oscil, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__248);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_oscil, __pyx_t_41) < 0) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2004
 *     return cclm.mus_oscil(gen._ptr, fm, pm)
 * 
 * cpdef cython.double oscil_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from oscil gen. no modulation
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_145oscil_unmodulated, 0, __pyx_n_s_oscil_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_oscil_unmodulated, __pyx_t_41) < 0) __PYX_ERR(0, 2004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2014
 *     return cclm.mus_oscil_unmodulated(gen._ptr)
 * 
 * cpdef bint is_oscil(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_147is_oscil, 0, __pyx_n_s_is_oscil, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_oscil, __pyx_t_41) < 0) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2026
 * # ---------------- oscil-bank ---------------- #
 * 
 * cpdef mus_any make_oscil_bank(freqs, phases, amps=None, bint stable=False):             # <<<<<<<<<<<<<<
 *     """
 *     return a new oscil_bank generator. (freqs in radians)
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_149make_oscil_bank, 0, __pyx_n_s_make_oscil_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__253);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_oscil_bank, __pyx_t_41) < 0) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2065
 *     return gen
 * 
 * cpdef cython.double oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of oscils
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_151oscil_bank, 0, __pyx_n_s_oscil_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_oscil_bank, __pyx_t_41) < 0) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2074
 *     return cclm.mus_oscil_bank(gen._ptr)
 * 
 * cpdef bint is_oscil_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an oscil_bank
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_153is_oscil_bank, 0, __pyx_n_s_is_oscil_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_oscil_bank, __pyx_t_41) < 0) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2087
 * 
 * # ---------------- env ---------------- #
 * cpdef mus_any make_env(envelope, cython.double duration=1.0, cython.double scaler=1.0, cython.double offset=0.0, cython.double base=1.0, cython.int length=0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new envelope generator.  'envelope' is a list/array of break-point pairs. to create the
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_155make_env, 0, __pyx_n_s_make_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__258);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_env, __pyx_t_41) < 0) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2122
 *     return gen
 * 
 * cpdef cython.double env(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_157env, 0, __pyx_n_s_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_env, __pyx_t_41) < 0) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2131
 *     return cclm.mus_env(gen._ptr)
 * 
 * cpdef bint is_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is an env.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_159is_env, 0, __pyx_n_s_is_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_env, __pyx_t_41) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2140
 *     return cclm.mus_is_env(gen._ptr)
 * 
 * cpdef cython.double env_interp(cython.double x , mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_161env_interp, 0, __pyx_n_s_env_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_env_interp, __pyx_t_41) < 0) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2150
 *     return cclm.mus_env_interp(x, env._ptr)
 * 
 * cpdef cython.double envelope_interp(cython.double x ,  mus_any env):             # <<<<<<<<<<<<<<
 *     """
 *     value of envelope env at x.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_163envelope_interp, 0, __pyx_n_s_envelope_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_envelope_interp, __pyx_t_41) < 0) __PYX_ERR(0, 2150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2162
 * 
 * # #mus_env_rates
 * cpdef np.ndarray env_rates(gen: mus_any):             # <<<<<<<<<<<<<<
 *     cdef view.array arr = None
 *     cdef cclm.mus_long_t size = cclm.mus_length(gen._ptr)
 */
  __pyx_t_41 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_gen, __pyx_n_s_mus_any) < 0) __PYX_ERR(0, 2162, __pyx_L1_error)
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_165env_rates, 0, __pyx_n_s_env_rates, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_40, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_env_rates, __pyx_t_40) < 0) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2174
 * # this is slow because of needing ctypes to define function at runtime
 * # but no other way to do it with cython without changing sndlib code
 * cpdef cython.double env_any(mus_any gen, connection_function):             # <<<<<<<<<<<<<<
 *     """
 *     generate env output using conncection_func to 'connect the dots'.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_167env_any, 0, __pyx_n_s_env_any, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_env_any, __pyx_t_40) < 0) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2190
 * 
 * # ---------------- pulsed-env ---------------- #
 * cpdef mus_any make_pulsed_env(envelope, cython.double duration , cython.double frequency ):             # <<<<<<<<<<<<<<
 *     """
 *     produces a repeating envelope. env sticks at its last value, but pulsed-env repeats it over and over.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_169make_pulsed_env, 0, __pyx_n_s_make_pulsed_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_pulsed_env, __pyx_t_40) < 0) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2215
 *     return gen
 * 
 * cpdef cython.double pulsed_env(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_171pulsed_env, 0, __pyx_n_s_pulsed_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__271);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pulsed_env, __pyx_t_40) < 0) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2225
 *     return cclm.mus_pulsed_env(gen._ptr, fm)
 * 
 * cpdef cython.double pulsed_env_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from envelope generator. no modulations
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_173pulsed_env_unmodulated, 0, __pyx_n_s_pulsed_env_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pulsed_env_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2234
 *     return cclm.mus_pulsed_env_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulsed_env(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulsed_env.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_175is_pulsed_env, 0, __pyx_n_s_is_pulsed_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_pulsed_env, __pyx_t_40) < 0) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2246
 * 
 * # ---------------- table-lookup ---------------- #
 * cpdef mus_any make_table_lookup(cython.double frequency=0.0, cython.double initial_phase=0.0, wave= None, size=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator. the default table size is 512; use size to set some other
 */
  __pyx_k__32 = __pyx_e_8pysndlib_3clm_LINEAR;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_41 = PyTuple_New(5); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_float_0_0)) __PYX_ERR(0, 2246, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_float_0_0)) __PYX_ERR(0, 2246, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 2, Py_None)) __PYX_ERR(0, 2246, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 3, Py_None)) __PYX_ERR(0, 2246, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 4, __pyx_t_40)) __PYX_ERR(0, 2246, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_177make_table_lookup, 0, __pyx_n_s_make_table_lookup, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_table_lookup, __pyx_t_40) < 0) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2279
 *     return gen
 * 
 * cpdef cython.double table_lookup(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_179table_lookup, 0, __pyx_n_s_table_lookup, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__277);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_table_lookup, __pyx_t_40) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2289
 *     return cclm.mus_table_lookup(gen._ptr, fm)
 * 
 * cpdef cython.double table_lookup_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     return next sample from table_lookup generator. unmodulated
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_181table_lookup_unmodulated, 0, __pyx_n_s_table_lookup_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_table_lookup_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2298
 *     return cclm.mus_table_lookup_unmodulated(gen._ptr)
 * 
 * cpdef bint is_table_lookup(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a table_lookup.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_183is_table_lookup, 0, __pyx_n_s_is_table_lookup, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_table_lookup, __pyx_t_40) < 0) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2308
 * 
 * 
 * cpdef mus_any make_table_lookup_with_env(cython.double frequency, envelope, size= None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new table_lookup generator with the envelope loaded \in with size.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_185make_table_lookup_with_env, 0, __pyx_n_s_make_table_lookup_with_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_table_lookup_with_env, __pyx_t_40) < 0) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2334
 * 
 * # ---------------- polywave ---------------- #
 * cpdef mus_any make_polywave(cython.double frequency,  partials = [0.,1.], Polynomial kind=Polynomial.FIRST_KIND, xcoeffs=None, ycoeffs=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new polynomial-based waveshaping generator. make_polywave(440.0, partials=[1.0,1.0]) is
 */
  __pyx_t_40 = PyList_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_GIVEREF(__pyx_float_0_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_40, 0, __pyx_float_0_)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_40, 1, __pyx_float_1_)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __pyx_k__33 = __pyx_t_40;
  __Pyx_GIVEREF(__pyx_t_40);
  __pyx_t_40 = 0;
  __pyx_k__34 = __pyx_e_8pysndlib_3clm_FIRST_KIND;
  __pyx_t_40 = PyList_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_GIVEREF(__pyx_float_0_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_40, 0, __pyx_float_0_)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_40, 1, __pyx_float_1_)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(__pyx_e_8pysndlib_3clm_FIRST_KIND); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __pyx_t_37 = PyTuple_New(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_40)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_t_41)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, Py_None)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_41 = 0;
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_187make_polywave, 0, __pyx_n_s_make_polywave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_polywave, __pyx_t_41) < 0) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2394
 * 
 * 
 * cpdef cython.double polywave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_189polywave, 0, __pyx_n_s_polywave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__285);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polywave, __pyx_t_41) < 0) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2405
 * 
 * 
 * cpdef cython.double polywave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polywave waveshaper. unmodulated
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_191polywave_unmodulated, 0, __pyx_n_s_polywave_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polywave_unmodulated, __pyx_t_41) < 0) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2414
 *     return cclm.mus_polywave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_polywave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polywave.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_193is_polywave, 0, __pyx_n_s_is_polywave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_polywave, __pyx_t_41) < 0) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":2427
 * # ---------------- polyshape ---------------- #
 * 
 * cpdef mus_any make_polyshape(cython.double frequency, cython.double initial_phase=0.0, coeffs = None, partials = [1.,1.], Polynomial kind=Polynomial.FIRST_KIND):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_t_41 = PyList_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_41, 0, __pyx_float_1_)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_41, 1, __pyx_float_1_)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __pyx_k__35 = __pyx_t_41;
  __Pyx_GIVEREF(__pyx_t_41);
  __pyx_t_41 = 0;
  __pyx_k__36 = __pyx_e_8pysndlib_3clm_FIRST_KIND;
  __pyx_t_41 = PyList_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_41, 0, __pyx_float_1_)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_41, 1, __pyx_float_1_)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __pyx_t_37 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Polynomial_to_py(__pyx_e_8pysndlib_3clm_FIRST_KIND); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = PyTuple_New(4); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_float_0_0)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, Py_None)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_41);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 2, __pyx_t_41)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 3, __pyx_t_37)) __PYX_ERR(0, 2427, __pyx_L1_error);
  __pyx_t_41 = 0;
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_195make_polyshape, 0, __pyx_n_s_make_polyshape, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_polyshape, __pyx_t_37) < 0) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2460
 *     return gen
 * 
 * cpdef cython.double polyshape(mus_any gen, cython.double index=1.0, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_197polyshape, 0, __pyx_n_s_polyshape, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__292);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polyshape, __pyx_t_37) < 0) __PYX_ERR(0, 2460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2474
 *         return cclm.mus_polyshape_unmodulated(gen._ptr, index)
 * 
 * cpdef cython.double polyshape_unmodulated(mus_any gen, cython.double index=1.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of polynomial-based waveshaper. unmodulated
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_199polyshape_unmodulated, 0, __pyx_n_s_polyshape_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__295);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polyshape_unmodulated, __pyx_t_37) < 0) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2485
 * 
 * 
 * cpdef bint is_polyshape(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a polyshape.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_201is_polyshape, 0, __pyx_n_s_is_polyshape, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_polyshape, __pyx_t_37) < 0) __PYX_ERR(0, 2485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2496
 * 
 * # ---------------- triangle-wave ---------------- #
 * cpdef mus_any make_triangle_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new triangle_wave generator.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_np); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_pi); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_40); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_k__37 = __pyx_t_45;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_np); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_pi); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_37); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = PyFloat_FromDouble(__pyx_t_45); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_float_1_0)) __PYX_ERR(0, 2496, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_t_37)) __PYX_ERR(0, 2496, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_203make_triangle_wave, 0, __pyx_n_s_make_triangle_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_triangle_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2511
 *     return mus_any.from_ptr(cclm.mus_make_triangle_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double triangle_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_205triangle_wave, 0, __pyx_n_s_triangle_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__300);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangle_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2522
 * 
 * 
 * cpdef cython.double triangle_wave_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next triangle wave sample from generator. unmodulated
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_207triangle_wave_unmodulated, 0, __pyx_n_s_triangle_wave_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangle_wave_unmodulated, __pyx_t_37) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2531
 *     return cclm.mus_triangle_wave_unmodulated(gen._ptr)
 * 
 * cpdef bint is_triangle_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a triangle_wave.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_209is_triangle_wave, 0, __pyx_n_s_is_triangle_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_triangle_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2541
 * 
 * # ---------------- square-wave ---------------- #
 * cpdef mus_any make_square_wave(cython.double frequency , cython.double amplitude=1.0, cython.double phase=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new square_wave generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_211make_square_wave, 0, __pyx_n_s_make_square_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__304);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_square_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2555
 *     return mus_any.from_ptr(cclm.mus_make_square_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double square_wave(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next square wave sample from generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_213square_wave, 0, __pyx_n_s_square_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__306);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_square_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2565
 *     return cclm.mus_square_wave(gen._ptr, fm)
 * 
 * cpdef bint is_square_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a square_wave.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_215is_square_wave, 0, __pyx_n_s_is_square_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_square_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2575
 * 
 * # ---------------- sawtooth-wave ---------------- #
 * cpdef mus_any make_sawtooth_wave(cython.double frequency, cython.double amplitude=1.0, cython.double phase=np.pi):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sawtooth_wave generator.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_np); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_pi); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_40); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_k__38 = __pyx_t_45;
  __Pyx_GetModuleGlobalName(__pyx_t_40, __pyx_n_s_np); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_pi); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_37); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = PyFloat_FromDouble(__pyx_t_45); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_float_1_0)) __PYX_ERR(0, 2575, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_t_37)) __PYX_ERR(0, 2575, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_217make_sawtooth_wave, 0, __pyx_n_s_make_sawtooth_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_sawtooth_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2590
 *     return mus_any.from_ptr(cclm.mus_make_sawtooth_wave(frequency, amplitude, phase))
 * 
 * cpdef cython.double sawtooth_wave(mus_any gen, cython.double fm =0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sawtooth wave sample from generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_219sawtooth_wave, 0, __pyx_n_s_sawtooth_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__310);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sawtooth_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2601
 * 
 * 
 * cpdef bint is_sawtooth_wave(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sawtooth_wave.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_221is_sawtooth_wave, 0, __pyx_n_s_is_sawtooth_wave, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_sawtooth_wave, __pyx_t_37) < 0) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2611
 * 
 * # ---------------- pulse-train ---------------- #
 * cpdef mus_any make_pulse_train(cython.double frequency=1.0, cython.double amplitude=1.0, cython.double phase=(np.pi*2)):             # <<<<<<<<<<<<<<
 *     """
 *     return a new pulse_train generator. this produces a sequence of impulses.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_np); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_pi); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_PyInt_MultiplyObjC(__pyx_t_40, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_37); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_k__39 = __pyx_t_45;
  __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_np); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_pi); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_PyInt_MultiplyObjC(__pyx_t_40, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  __pyx_t_45 = __pyx_PyFloat_AsDouble(__pyx_t_37); if (unlikely((__pyx_t_45 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = PyFloat_FromDouble(__pyx_t_45); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_40 = PyTuple_New(3); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_float_1_0)) __PYX_ERR(0, 2611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 1, __pyx_float_1_0)) __PYX_ERR(0, 2611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_40, 2, __pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_223make_pulse_train, 0, __pyx_n_s_make_pulse_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_pulse_train, __pyx_t_37) < 0) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2626
 *     return mus_any.from_ptr(cclm.mus_make_pulse_train(frequency, amplitude, phase))
 * 
 * cpdef cython.double pulse_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_225pulse_train, 0, __pyx_n_s_pulse_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__313)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__314);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pulse_train, __pyx_t_37) < 0) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2637
 * 
 * 
 * cpdef cython.double pulse_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next pulse train sample from generator. unmodulated
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_227pulse_train_unmodulated, 0, __pyx_n_s_pulse_train_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pulse_train_unmodulated, __pyx_t_37) < 0) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2645
 *     return cclm.mus_pulse_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_pulse_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a pulse_train.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_229is_pulse_train, 0, __pyx_n_s_is_pulse_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_pulse_train, __pyx_t_37) < 0) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2656
 * # ---------------- ncos ---------------- #
 * 
 * cpdef mus_any make_ncos(cython.double frequency, cython.int n=1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ncos generator, producing a sum of 'n' equal amplitude cosines.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_231make_ncos, 0, __pyx_n_s_make_ncos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__318)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__103);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_ncos, __pyx_t_37) < 0) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2669
 *     return mus_any.from_ptr(cclm.mus_make_ncos(frequency, n))
 * 
 * cpdef cython.double ncos(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an ncos generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_233ncos, 0, __pyx_n_s_ncos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__320);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ncos, __pyx_t_37) < 0) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2679
 *     return cclm.mus_ncos(gen._ptr, fm)
 * 
 * cpdef bint is_ncos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ncos.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_235is_ncos, 0, __pyx_n_s_is_ncos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_ncos, __pyx_t_37) < 0) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2690
 * 
 * # ---------------- nsin ---------------- #
 * cpdef mus_any make_nsin(cython.double frequency, cython.int n =1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nsin generator, producing a sum of 'n' equal amplitude sines.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_237make_nsin, 0, __pyx_n_s_make_nsin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__103);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_nsin, __pyx_t_37) < 0) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2705
 *     return mus_any.from_ptr(cclm.mus_make_nsin(frequency, n))
 * 
 * cpdef cython.double nsin(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from 'gen', an nsin generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_239nsin, 0, __pyx_n_s_nsin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__324);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nsin, __pyx_t_37) < 0) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2715
 *     return cclm.mus_nsin(gen._ptr, fm)
 * 
 * cpdef bint is_nsin(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nsin.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_241is_nsin, 0, __pyx_n_s_is_nsin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_nsin, __pyx_t_37) < 0) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2726
 * # ---------------- nrxysin and nrxycos ---------------- #
 * 
 * cpdef mus_any make_nrxysin( cython.double frequency,  cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxysin generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_243make_nrxysin, 0, __pyx_n_s_make_nrxysin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__328);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_nrxysin, __pyx_t_37) < 0) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2743
 *     return mus_any.from_ptr(cclm.mus_make_nrxysin(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxysin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxysin generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_245nrxysin, 0, __pyx_n_s_nrxysin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__329)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__330);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nrxysin, __pyx_t_37) < 0) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2753
 *     return cclm.mus_nrxysin(gen._ptr, fm)
 * 
 * cpdef bint is_nrxysin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxysin.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_247is_nrxysin, 0, __pyx_n_s_is_nrxysin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_nrxysin, __pyx_t_37) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2763
 * 
 * 
 * cpdef mus_any make_nrxycos(cython.double frequency , cython.double ratio=1., cython.int n=1, cython.double r=.5):             # <<<<<<<<<<<<<<
 *     """
 *     return a new nrxycos generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_249make_nrxycos, 0, __pyx_n_s_make_nrxycos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__333);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_nrxycos, __pyx_t_37) < 0) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2781
 *     return mus_any.from_ptr(cclm.mus_make_nrxycos(frequency, ratio, n, r))
 * 
 * cpdef cython.double nrxycos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of nrxycos generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_251nrxycos, 0, __pyx_n_s_nrxycos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__335);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nrxycos, __pyx_t_37) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2791
 *     return cclm.mus_nrxycos(gen._ptr, fm)
 * 
 * cpdef bint is_nrxycos(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a nrxycos.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_253is_nrxycos, 0, __pyx_n_s_is_nrxycos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__336)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_nrxycos, __pyx_t_37) < 0) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2802
 * 
 * # ---------------- rxykcos and rxyksin ---------------- #
 * cpdef mus_any make_rxykcos(cython.double frequency, cython.double phase=0.0, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxykcos generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_255make_rxykcos, 0, __pyx_n_s_make_rxykcos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__338)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__339);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_rxykcos, __pyx_t_37) < 0) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2817
 *     return mus_any.from_ptr(cclm.mus_make_rxykcos(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxykcos(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxykcos generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_257rxykcos, 0, __pyx_n_s_rxykcos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__340)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__341);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rxykcos, __pyx_t_37) < 0) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":2827
 *     return cclm.mus_rxykcos(gen._ptr, fm)
 * 
 * cpdef bint is_rxykcos(gen: mus_any):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxykcos.
 */
  __pyx_t_37 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_gen, __pyx_n_s_mus_any) < 0) __PYX_ERR(0, 2827, __pyx_L1_error)
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_259is_rxykcos, 0, __pyx_n_s_is_rxykcos, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_rxykcos, __pyx_t_40) < 0) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2836
 *     return cclm.mus_is_rxykcos(gen._ptr)
 * 
 * cpdef mus_any make_rxyksin(cython.double frequency, cython.double phase, cython.double r=.5, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rxyksin generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_261make_rxyksin, 0, __pyx_n_s_make_rxyksin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__343)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__344);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_rxyksin, __pyx_t_40) < 0) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2851
 *     return mus_any.from_ptr(cclm.mus_make_rxyksin(frequency, phase, r, ratio))
 * 
 * cpdef cython.double rxyksin(mus_any gen, cython.double fm=0.):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of rxyksin generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_263rxyksin, 0, __pyx_n_s_rxyksin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__345)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__346);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rxyksin, __pyx_t_40) < 0) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2861
 *     return cclm.mus_rxyksin(gen._ptr, fm)
 * 
 * cpdef bint  is_rxyksin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rxyksin.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_265is_rxyksin, 0, __pyx_n_s_is_rxyksin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__347)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_rxyksin, __pyx_t_40) < 0) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2871
 * 
 * # ---------------- ssb-am ---------------- #
 * cpdef mus_any make_ssb_am(cython.double frequency, cython.int order=40):             # <<<<<<<<<<<<<<
 *     """
 *     return a new ssb_am generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_267make_ssb_am, 0, __pyx_n_s_make_ssb_am, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__350);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_ssb_am, __pyx_t_40) < 0) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2884
 *     return mus_any.from_ptr(cclm.mus_make_ssb_am(frequency, order))
 * 
 * cpdef cython.double ssb_am(mus_any gen, cython.double insig , cython.double  fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_269ssb_am, 0, __pyx_n_s_ssb_am, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__352)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__353);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ssb_am, __pyx_t_40) < 0) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2895
 * 
 * 
 * cpdef cython.double ssb_am_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     get the next sample from ssb_am generator. unmodulated.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_271ssb_am_unmodulated, 0, __pyx_n_s_ssb_am_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__355)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ssb_am_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2904
 *     return cclm.mus_ssb_am_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_ssb_am(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a ssb_am.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_273is_ssb_am, 0, __pyx_n_s_is_ssb_am, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_ssb_am, __pyx_t_40) < 0) __PYX_ERR(0, 2904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2916
 * 
 * # ---------------- wave-train ----------------#
 * cpdef mus_any make_wave_train(cython.double frequency, wave=None, cython.double initial_phase=0., Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator (an extension of pulse-train). frequency is the repetition rate
 */
  __pyx_k__40 = __pyx_e_8pysndlib_3clm_LINEAR;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = PyTuple_New(3); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, Py_None)) __PYX_ERR(0, 2916, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_GIVEREF(__pyx_float_0_);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_float_0_)) __PYX_ERR(0, 2916, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, __pyx_t_40)) __PYX_ERR(0, 2916, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_275make_wave_train, 0, __pyx_n_s_make_wave_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__358)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_wave_train, __pyx_t_40) < 0) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2939
 *     return gen
 * 
 * cpdef cython.double wave_train(mus_any gen, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_277wave_train, 0, __pyx_n_s_wave_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__360);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wave_train, __pyx_t_40) < 0) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2950
 * 
 * 
 * cpdef cython.double wave_train_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample of wave_train. unmodulated
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_279wave_train_unmodulated, 0, __pyx_n_s_wave_train_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wave_train_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2959
 *     return cclm.mus_wave_train_unmodulated(gen._ptr)
 * 
 * cpdef bint is_wave_train(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a wave_train.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_281is_wave_train, 0, __pyx_n_s_is_wave_train, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__362)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_wave_train, __pyx_t_40) < 0) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2969
 * 
 * 
 * cpdef mus_any make_wave_train_with_env(cython.double frequency, envelope, size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new wave-train generator with the envelope loaded \in with size.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_283make_wave_train_with_env, 0, __pyx_n_s_make_wave_train_with_env, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__363)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_wave_train_with_env, __pyx_t_40) < 0) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":2993
 * 
 * # ---------------- rand, rand_interp ---------------- #
 * cpdef mus_any make_rand(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand generator, producing a sequence of random numbers (a step  function). frequency
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_285make_rand, 0, __pyx_n_s_make_rand, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__365)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__366);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_rand, __pyx_t_40) < 0) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3016
 *         return mus_any.from_ptr(cclm.mus_make_rand(frequency, amplitude))
 * 
 * cpdef cython.double rand(mus_any gen, cython.double sweep=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_287rand, 0, __pyx_n_s_rand, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__369);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rand, __pyx_t_40) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3027
 *     return cclm.mus_rand(gen._ptr, sweep)
 * 
 * cpdef cython.double rand_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current random number. sweep modulates the rate at which the current number is changed. unmodulated
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_289rand_unmodulated, 0, __pyx_n_s_rand_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__370)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rand_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3037
 *     return cclm.mus_rand_unmodulated(gen._ptr)
 * 
 * cpdef bint is_rand(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_291is_rand, 0, __pyx_n_s_is_rand, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_rand, __pyx_t_40) < 0) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3046
 *     return cclm.mus_is_rand(gen._ptr)
 * 
 * cpdef mus_any make_rand_interp(cython.double frequency, cython.double amplitude=1.0, distribution=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new rand_interp generator, producing linearly interpolated random numbers. frequency is
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_293make_rand_interp, 0, __pyx_n_s_make_rand_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__372)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__373);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_rand_interp, __pyx_t_40) < 0) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3069
 *         return mus_any.from_ptr(cclm.mus_make_rand_interp(frequency, amplitude))
 * 
 * cpdef rand_interp(mus_any gen, cython.double sweep=0.):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_295rand_interp, 0, __pyx_n_s_rand_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__375);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rand_interp, __pyx_t_40) < 0) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3080
 *     return cclm.mus_rand_interp(gen._ptr, sweep)
 * 
 * cpdef rand_interp_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     gen's current (interpolating) random number. fm modulates the rate at which new segment end-points
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_297rand_interp_unmodulated, 0, __pyx_n_s_rand_interp_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rand_interp_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3091
 * 
 * 
 * cpdef bint is_rand_interp(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a rand_interp.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_299is_rand_interp, 0, __pyx_n_s_is_rand_interp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__377)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_rand_interp, __pyx_t_40) < 0) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3101
 * 
 * # ---------------- simple filters ---------------- #
 * cpdef mus_any make_one_pole(cython.double a0, cython.double b1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole filter: y(n) = a0 x(n) - b1 y(n-1)
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_301make_one_pole, 0, __pyx_n_s_make_one_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__379)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_one_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3116
 * 
 * 
 * cpdef cython.double one_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole filter of input.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_303one_pole, 0, __pyx_n_s_one_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_one_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3127
 *     return cclm.mus_one_pole(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_305is_one_pole, 0, __pyx_n_s_is_one_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_one_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3137
 * 
 * 
 * cpdef mus_any make_one_zero(cython.double a0 , cython.double a1):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_zero filter: y(n) = a0 x(n) + a1 x(n-1)
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_307make_one_zero, 0, __pyx_n_s_make_one_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__383)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_one_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3149
 *     return mus_any.from_ptr(cclm.mus_make_one_zero(a0, a1))
 * 
 * cpdef cython.double one_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one zero filter of input.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_309one_zero, 0, __pyx_n_s_one_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__384)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_one_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3159
 *     return cclm.mus_one_zero(gen._ptr, insig)
 * 
 * cpdef bint is_one_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_zero.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_311is_one_zero, 0, __pyx_n_s_is_one_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__385)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_one_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3169
 * 
 * 
 * cpdef make_two_pole(frequency=None, radius=None, a0=None,b1=None,b2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_pole filter: y(n) = a0 x(n) - b1 y(n-1) - b2 y(n-2).
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_313make_two_pole, 0, __pyx_n_s_make_two_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__387)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__130);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_two_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3190
 * 
 * 
 * cpdef cython.double two_pole(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two pole filter of input.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_315two_pole, 0, __pyx_n_s_two_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__388)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_two_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3201
 *     return cclm.mus_two_pole(gen._ptr, insig)
 * 
 * cpdef bint is_two_pole(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_pole.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_317is_two_pole, 0, __pyx_n_s_is_two_pole, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_two_pole, __pyx_t_40) < 0) __PYX_ERR(0, 3201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3211
 * 
 * 
 * cpdef make_two_zero(frequency=None, radius=None, a0=None,a1=None,a2=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new two_zero filter: y(n) = a0 x(n) + a1 x(n-1) + a2 x(n-2).
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_319make_two_zero, 0, __pyx_n_s_make_two_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__130);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_two_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3232
 * 
 * 
 * cpdef cython.double two_zero(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     two zero filter of input.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_321two_zero, 0, __pyx_n_s_two_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__392)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_two_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3242
 *     return cclm.mus_two_zero(gen._ptr, insig)
 * 
 * cpdef bint is_two_zero(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a two_zero.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_323is_two_zero, 0, __pyx_n_s_is_two_zero, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__393)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_two_zero, __pyx_t_40) < 0) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3255
 * 
 * # ---------------- formant ---------------- #
 * cpdef mus_any make_formant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant generator (a resonator). radius sets the pole radius (in terms of the 'unit circle').
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_325make_formant, 0, __pyx_n_s_make_formant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_formant, __pyx_t_40) < 0) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3269
 *     return mus_any.from_ptr(cclm.mus_make_formant(frequency, radius))
 * 
 * cpdef cython.double formant(mus_any gen, cython.double insig, cython.double radians=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from formant generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_327formant, 0, __pyx_n_s_formant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__397)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__398);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_formant, __pyx_t_40) < 0) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3285
 * 
 * 
 * cpdef bint is_formant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_329is_formant, 0, __pyx_n_s_is_formant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__399)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_formant, __pyx_t_40) < 0) __PYX_ERR(0, 3285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3295
 * 
 * # ---------------- formant-bank ---------------- #
 * cpdef mus_any make_formant_bank(list filters, amps=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new formant-bank generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_331make_formant_bank, 0, __pyx_n_s_make_formant_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__401)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_formant_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3325
 * 
 * 
 * cpdef cython.double formant_bank(mus_any gen, inputs):             # <<<<<<<<<<<<<<
 *     """
 *     sum a bank of formant generators.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_333formant_bank, 0, __pyx_n_s_formant_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__403)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_formant_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3345
 *     return res
 * 
 * cpdef bint is_formant_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a formant_bank.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_335is_formant_bank, 0, __pyx_n_s_is_formant_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__404)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_formant_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3355
 * 
 * # ---------------- firmant ---------------- #
 * cpdef mus_any make_firmant(cython.double frequency, cython.double radius):             # <<<<<<<<<<<<<<
 *     """
 *     return a new firmant generator (a resonator).  radius sets the pole radius (in terms of the 'unit
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_337make_firmant, 0, __pyx_n_s_make_firmant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__405)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_firmant, __pyx_t_40) < 0) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3369
 *     return mus_any.from_ptr(cclm.mus_make_firmant(frequency, radius))
 * 
 * cpdef firmant(mus_any gen, cython.double insig, cython.double radians=0.0 ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from resonator generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_339firmant, 0, __pyx_n_s_firmant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__406)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__407);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_firmant, __pyx_t_40) < 0) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3385
 * 
 * 
 * cpdef is_firmant(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a firmant.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_341is_firmant, 0, __pyx_n_s_is_firmant, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__408)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_firmant, __pyx_t_40) < 0) __PYX_ERR(0, 3385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3395
 * 
 * # ---------------- filter ---------------- #
 * cpdef mus_any make_filter(cython.int order, xcoeffs, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new direct form fir/iir filter, coeff args are list/ndarray.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_343make_filter, 0, __pyx_n_s_make_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__410)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3417
 *     return gen
 * 
 * cpdef cython.double filter(mus_any gen, cython.double insig): # todo : conflicts with buitl in function             # <<<<<<<<<<<<<<
 *     """
 *     next sample from filter.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_345filter, 0, __pyx_n_s_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__411)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3427
 *     return cclm.mus_filter(gen._ptr, insig)
 * 
 * cpdef bint is_filter(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filter.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_347is_filter, 0, __pyx_n_s_is_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__412)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3437
 * 
 * # ---------------- fir-filter ---------------- #
 * cpdef mus_any make_fir_filter(cython.int order, xcoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new fir filter, xcoeffs a list/ndarray.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_349make_fir_filter, 0, __pyx_n_s_make_fir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__414)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3458
 *     return gen
 * 
 * cpdef cython.double fir_filter(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from fir filter.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_351fir_filter, 0, __pyx_n_s_fir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__415)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3468
 *     return cclm.mus_fir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_fir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a fir_filter.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_353is_fir_filter, 0, __pyx_n_s_is_fir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__416)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_fir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3479
 * 
 * # ---------------- iir-filter ---------------- #
 * cpdef mus_any make_iir_filter(cython.int order, ycoeffs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new iir filter, ycoeffs a list/ndarray.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_355make_iir_filter, 0, __pyx_n_s_make_iir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__418)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_iir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3500
 *     return gen
 * 
 * cpdef cython.double iir_filter(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from iir filter.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_357iir_filter, 0, __pyx_n_s_iir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3510
 *     return cclm.mus_iir_filter(gen._ptr, insig)
 * 
 * cpdef bint is_iir_filter(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a iir_filter
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_359is_iir_filter, 0, __pyx_n_s_is_iir_filter, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__420)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_iir_filter, __pyx_t_40) < 0) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3518
 *     return cclm.mus_is_iir_filter(gen._ptr)
 * 
 * cpdef np.ndarray make_fir_coeffs(cython.int order, envelope):             # <<<<<<<<<<<<<<
 *     """
 *     translates a frequency response envelope (actually, evenly spaced points \in a float-vector) into
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_361make_fir_coeffs, 0, __pyx_n_s_make_fir_coeffs, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__422)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fir_coeffs, __pyx_t_40) < 0) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3545
 * 
 * # ---------------- delay ---------------- #
 * cpdef mus_any make_delay(cython.long size, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new delay line of size elements. if the delay length will be changing at run-time,
 */
  __pyx_k__43 = __pyx_e_8pysndlib_3clm_NONE;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = PyTuple_New(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, Py_None)) __PYX_ERR(0, 3545, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, Py_None)) __PYX_ERR(0, 3545, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 3545, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, __pyx_t_40)) __PYX_ERR(0, 3545, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_363make_delay, 0, __pyx_n_s_make_delay, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__424)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_delay, __pyx_t_40) < 0) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3589
 *     return gen
 * 
 * cpdef cython.double delay(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_365delay, 0, __pyx_n_s_delay, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__426)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__427);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_delay, __pyx_t_40) < 0) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3604
 * 
 * 
 * cpdef cython.double delay_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length and pm ('phase-modulation').
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_367delay_unmodulated, 0, __pyx_n_s_delay_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__428)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_delay_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3617
 *     return cclm.mus_delay_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_delay(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a delay.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_369is_delay, 0, __pyx_n_s_is_delay, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__429)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_delay, __pyx_t_40) < 0) __PYX_ERR(0, 3617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3626
 *     return cclm.mus_is_delay(gen._ptr)
 * 
 * cpdef cython.double tap(mus_any gen, offset=0.):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_371tap, 0, __pyx_n_s_tap, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__431)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__432);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tap, __pyx_t_40) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3638
 *     return cclm.mus_tap(gen._ptr, offset)
 * 
 * cpdef cython.double tap_unmodulated(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     tap the delay mus_any offset by pm
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_373tap_unmodulated, 0, __pyx_n_s_tap_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__433)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tap_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3649
 *     return cclm.mus_tap_unmodulated(gen._ptr)
 * 
 * cpdef bint is_tap(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a tap.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_375is_tap, 0, __pyx_n_s_is_tap, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__434)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_tap, __pyx_t_40) < 0) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3658
 *     return cclm.mus_is_tap(gen._ptr)
 * 
 * cpdef cython.double delay_tick(mus_any gen, cython.double insig ):             # <<<<<<<<<<<<<<
 *     """
 *     delay val according to the delay line's length. this merely 'ticks' the delay line forward.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_377delay_tick, 0, __pyx_n_s_delay_tick, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__435)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_delay_tick, __pyx_t_40) < 0) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3670
 * 
 * # ---------------- comb ---------------- #
 * cpdef mus_any make_comb(cython.double feedback=1.0,size=None, initial_contents=None, initial_element=None, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb filter (a delay line with a scaler on the feedback) of size elements. if the comb
 */
  __pyx_k__44 = __pyx_e_8pysndlib_3clm_NONE;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = PyTuple_New(6); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_float_1_0)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, Py_None)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, Py_None)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 4, Py_None)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 5, __pyx_t_40)) __PYX_ERR(0, 3670, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_379make_comb, 0, __pyx_n_s_make_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__437)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3715
 *     return gen
 * 
 * cpdef cython.double comb(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     comb filter val, pm changes the delay length.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_381comb, 0, __pyx_n_s_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__438)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3729
 *         return cclm.mus_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_383is_comb, 0, __pyx_n_s_is_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__439)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3739
 * 
 * # ---------------- comb-bank ---------------- #
 * cpdef mus_any make_comb_bank(list combs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new comb-bank generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_385make_comb_bank, 0, __pyx_n_s_make_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__441)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3759
 *     return gen
 * 
 * cpdef cython.double comb_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of comb filters.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_387comb_bank, 0, __pyx_n_s_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3769
 *     return cclm.mus_comb_bank(gen._ptr, insig)
 * 
 * cpdef bint is_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a comb_bank
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_389is_comb_bank, 0, __pyx_n_s_is_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__443)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3780
 * 
 * # ---------------- filtered-comb ---------------- #
 * cpdef mus_any make_filtered_comb(cython.double feedback,cython.long size, mus_any filter, initial_contents=None,  cython.double initial_element=0.0, max_size=None, Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_k__45 = __pyx_e_8pysndlib_3clm_NONE;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = PyTuple_New(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, Py_None)) __PYX_ERR(0, 3780, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_float_0_0)) __PYX_ERR(0, 3780, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 3780, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, __pyx_t_40)) __PYX_ERR(0, 3780, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_391make_filtered_comb, 0, __pyx_n_s_make_filtered_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__445)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_filtered_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3824
 *     return gen
 * 
 * cpdef cython.double filtered_comb(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_393filtered_comb, 0, __pyx_n_s_filtered_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__446)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__447);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_filtered_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3836
 * 
 * 
 * cpdef cython.double filtered_comb_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     filtered comb filter val, pm changes the delay length. unmodulated
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_395filtered_comb_unmodulated, 0, __pyx_n_s_filtered_comb_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__448)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_filtered_comb_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3847
 *     return cclm.mus_filtered_comb_unmodulated(gen._ptr, insig)
 * 
 * cpdef bint is_filtered_comb(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_397is_filtered_comb, 0, __pyx_n_s_is_filtered_comb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__449)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_filtered_comb, __pyx_t_40) < 0) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3857
 * 
 * # ---------------- filtered-comb-bank ---------------- #
 * cpdef mus_any make_filtered_comb_bank(list fcombs):             # <<<<<<<<<<<<<<
 *     """
 *     return a new filtered_comb-bank generator.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_399make_filtered_comb_bank, 0, __pyx_n_s_make_filtered_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__451)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_filtered_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3875
 *     return gen
 * 
 * cpdef cython.double filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of filtered_comb filters.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_401filtered_comb_bank, 0, __pyx_n_s_filtered_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__452)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_filtered_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3885
 *     return cclm.mus_filtered_comb_bank(gen._ptr, input)
 * 
 * cpdef bint is_filtered_comb_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a filtered_comb_bank.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_403is_filtered_comb_bank, 0, __pyx_n_s_is_filtered_comb_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__453)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_filtered_comb_bank, __pyx_t_40) < 0) __PYX_ERR(0, 3885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3899
 *                 cython.double initial_element=0.0,
 *                 max_size=None,
 *                 Interp interp_type=Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_k__47 = __pyx_e_8pysndlib_3clm_NONE;

  /* "pysndlib/clm.pyx":3898
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 *                 max_size=None,             # <<<<<<<<<<<<<<
 *                 Interp interp_type=Interp.NONE):
 * 
 */
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);

  /* "pysndlib/clm.pyx":3895
 * 
 * # ---------------- notch ---------------- #
 * cpdef mus_any make_notch(cython.double feedforward=1.0,size=None,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0,
 */
  __pyx_t_37 = PyTuple_New(6); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_float_1_0)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, Py_None)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, __pyx_float_0_0)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 4, Py_None)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 5, __pyx_t_40)) __PYX_ERR(0, 3895, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_405make_notch, 0, __pyx_n_s_make_notch, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__455)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_notch, __pyx_t_40) < 0) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3945
 *     return gen
 * 
 * cpdef cython.double notch(mus_any gen, cython.double insig, cython.double pm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_407notch, 0, __pyx_n_s_notch, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__456)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__457);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_notch, __pyx_t_40) < 0) __PYX_ERR(0, 3945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3957
 * 
 * 
 * cpdef cython.double notch_unmodulated(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     notch filter val, pm changes the delay length. unmodulated
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_409notch_unmodulated, 0, __pyx_n_s_notch_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__458)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_notch_unmodulated, __pyx_t_40) < 0) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3968
 * 
 * 
 * cpdef bint is_notch(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a notch.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_411is_notch, 0, __pyx_n_s_is_notch, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_notch, __pyx_t_40) < 0) __PYX_ERR(0, 3968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":3978
 * 
 * # ---------------- all-pass ---------------- #
 * cpdef mus_any make_all_pass(cython.double feedback, cython.double  feedforward, cython.long  size, initial_contents= None, cython.double  initial_element = 0.0,  max_size= None, Interp interp_type = Interp.NONE):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_k__48 = __pyx_e_8pysndlib_3clm_NONE;
  __pyx_t_40 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_NONE); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = PyTuple_New(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 0, Py_None)) __PYX_ERR(0, 3978, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 1, __pyx_float_0_0)) __PYX_ERR(0, 3978, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 2, Py_None)) __PYX_ERR(0, 3978, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_37, 3, __pyx_t_40)) __PYX_ERR(0, 3978, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_413make_all_pass, 0, __pyx_n_s_make_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__461)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_all_pass, __pyx_t_40) < 0) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4026
 *     return gen
 * 
 * cpdef cython.double all_pass(mus_any gen, cython.double insig, pm=None):             # <<<<<<<<<<<<<<
 *     """
 *     all-pass filter insig value, pm changes the delay length.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_415all_pass, 0, __pyx_n_s_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__462)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all_pass, __pyx_t_40) < 0) __PYX_ERR(0, 4026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4040
 *         return cclm.mus_all_pass_unmodulated(gen._ptr, insig)
 * 
 * cpdef is_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_417is_all_pass, 0, __pyx_n_s_is_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__463)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_all_pass, __pyx_t_40) < 0) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4051
 * 
 * # ---------------- all-pass-bank ---------------- #
 * cpdef mus_any make_all_pass_bank(all_passes: list):             # <<<<<<<<<<<<<<
 *     """
 *     return a new all_pass-bank generator.
 */
  __pyx_t_40 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_t_40, __pyx_n_s_all_passes, __pyx_n_s_list) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_419make_all_pass_bank, 0, __pyx_n_s_make_all_pass_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__465)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_37, __pyx_t_40);
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_all_pass_bank, __pyx_t_37) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4068
 *     return gen
 * 
 * cpdef cython.double all_pass_bank(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     sum an array of all_pass filters.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_421all_pass_bank, 0, __pyx_n_s_all_pass_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__466)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all_pass_bank, __pyx_t_37) < 0) __PYX_ERR(0, 4068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4078
 *     return cclm.mus_all_pass_bank(gen._ptr, insig)
 * 
 * cpdef bint is_all_pass_bank(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a all_pass_bank.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_423is_all_pass_bank, 0, __pyx_n_s_is_all_pass_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__467)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_all_pass_bank, __pyx_t_37) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4090
 * 
 * # ---------------- one_pole_all_pass ---------------- #
 * cpdef mus_any make_one_pole_all_pass(cython.long size, cython.double coeff):             # <<<<<<<<<<<<<<
 *     """
 *     return a new one_pole all_pass filter size, coeff.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_425make_one_pole_all_pass, 0, __pyx_n_s_make_one_pole_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__469)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_one_pole_all_pass, __pyx_t_37) < 0) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4102
 *     return mus_any.from_ptr(cclm.mus_make_one_pole_all_pass(size, coeff))
 * 
 * cpdef cython.double one_pole_all_pass(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     one pole all pass filter of input.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_427one_pole_all_pass, 0, __pyx_n_s_one_pole_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__470)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_one_pole_all_pass, __pyx_t_37) < 0) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4112
 *     return cclm.mus_one_pole_all_pass(gen._ptr, insig)
 * 
 * cpdef bint is_one_pole_all_pass(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a one_pole_all_pass.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_429is_one_pole_all_pass, 0, __pyx_n_s_is_one_pole_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__471)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_one_pole_all_pass, __pyx_t_37) < 0) __PYX_ERR(0, 4112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4122
 * 
 * # ---------------- moving-average ---------------- #
 * cpdef mus_any make_moving_average(cython.long size, initial_contents=None, cython.double initial_element=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving_average generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_431make_moving_average, 0, __pyx_n_s_make_moving_average, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__473)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__474);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_moving_average, __pyx_t_37) < 0) __PYX_ERR(0, 4122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4155
 * 
 * 
 * cpdef cython.double moving_average(mus_any gen, cython.double  insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window average.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_433moving_average, 0, __pyx_n_s_moving_average, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__475)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_moving_average, __pyx_t_37) < 0) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4165
 *     return cclm.mus_moving_average(gen._ptr, insig)
 * 
 * cpdef bint is_moving_average(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_average.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_435is_moving_average, 0, __pyx_n_s_is_moving_average, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__476)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_moving_average, __pyx_t_37) < 0) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4175
 * 
 * # ---------------- moving-max ---------------- #
 * cpdef mus_any make_moving_max(cython.long size,             # <<<<<<<<<<<<<<
 *                 initial_contents=None,
 *                 cython.double initial_element=0.0):
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_437make_moving_max, 0, __pyx_n_s_make_moving_max, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__477)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__478);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_moving_max, __pyx_t_37) < 0) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4211
 *     return gen
 * 
 * cpdef cython.double moving_max(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window max.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_439moving_max, 0, __pyx_n_s_moving_max, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__479)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_moving_max, __pyx_t_37) < 0) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4221
 *     return cclm.mus_moving_max(gen._ptr, insig)
 * 
 * cpdef bint is_moving_max(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_max.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_441is_moving_max, 0, __pyx_n_s_is_moving_max, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__480)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_moving_max, __pyx_t_37) < 0) __PYX_ERR(0, 4221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4231
 * 
 * # ---------------- moving-norm ---------------- #
 * cpdef mus_any make_moving_norm(cython.long size, initial_contents=None, cython.double scaler=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new moving-norm generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_443make_moving_norm, 0, __pyx_n_s_make_moving_norm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__482)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__483);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_moving_norm, __pyx_t_37) < 0) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4261
 *     return gen
 * 
 * cpdef cython.double moving_norm(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     """
 *     moving window norm.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_445moving_norm, 0, __pyx_n_s_moving_norm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__484)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_moving_norm, __pyx_t_37) < 0) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4271
 *     return cclm.mus_moving_norm(gen._ptr, insig)
 * 
 * cpdef is_moving_norm(mus_any gen ):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a moving_norm.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_447is_moving_norm, 0, __pyx_n_s_is_moving_norm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__485)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_moving_norm, __pyx_t_37) < 0) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4282
 * 
 * # ---------------- asymmetric-fm ---------------- #
 * cpdef mus_any make_asymmetric_fm(cython.double frequency, cython.double initial_phase=0.0, cython.double r=1.0, cython.double ratio=1.):             # <<<<<<<<<<<<<<
 *     """
 *     return a new asymmetric_fm generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_449make_asymmetric_fm, 0, __pyx_n_s_make_asymmetric_fm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__487)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__488);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_asymmetric_fm, __pyx_t_37) < 0) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4298
 *     return mus_any.from_ptr(cclm.mus_make_asymmetric_fm(frequency, initial_phase, r, ratio))
 * 
 * cpdef cython.double asymmetric_fm(mus_any gen, cython.double index, cython.double fm=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_451asymmetric_fm, 0, __pyx_n_s_asymmetric_fm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__489)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__490);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_asymmetric_fm, __pyx_t_37) < 0) __PYX_ERR(0, 4298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4310
 * 
 * 
 * cpdef cython.double asymmetric_fm_unmodulated(mus_any gen, cython.double index):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from asymmetric fm generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_453asymmetric_fm_unmodulated, 0, __pyx_n_s_asymmetric_fm_unmodulated, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__491)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_asymmetric_fm_unmodulated, __pyx_t_37) < 0) __PYX_ERR(0, 4310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4320
 *     return cclm.mus_asymmetric_fm_unmodulated(gen._ptr, index)
 * 
 * cpdef bint is_asymmetric_fm(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a asymmetric_fm.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_455is_asymmetric_fm, 0, __pyx_n_s_is_asymmetric_fm, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__492)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_asymmetric_fm, __pyx_t_37) < 0) __PYX_ERR(0, 4320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4330
 * 
 * # ---------------- file-to-sample ---------------- #
 * cpdef mus_any make_file2sample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading 'filename' (a sound file).
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_457make_file2sample, 0, __pyx_n_s_make_file2sample, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__494)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_file2sample, __pyx_t_37) < 0) __PYX_ERR(0, 4330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4345
 *     return mus_any.from_ptr(cclm.mus_make_file_to_sample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef cython.double file2sample(mus_any gen, cython.long loc, cython.int chan=0):             # <<<<<<<<<<<<<<
 *     """
 *     sample value \in sound file read by 'obj' \in channel chan at sample.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_459file2sample, 0, __pyx_n_s_file2sample_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__496)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__114);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_file2sample_2, __pyx_t_37) < 0) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4356
 *     return cclm.mus_file_to_sample(gen._ptr, loc, chan)
 * 
 * cpdef bint is_file2sample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2sample.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_461is_file2sample, 0, __pyx_n_s_is_file2sample, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_file2sample, __pyx_t_37) < 0) __PYX_ERR(0, 4356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4366
 * 
 * # ---------------- sample-to-file ---------------- #
 * cpdef mus_any make_sample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have chans'
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_463make_sample2file, 0, __pyx_n_s_make_sample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__499)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__500);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_sample2file, __pyx_t_37) < 0) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4386
 *         return mus_any.from_ptr(cclm.mus_make_sample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, comment))
 * 
 * cpdef cython.double sample2file(mus_any gen, cython.long samp, cython.int chan ,  cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     add val to the output stream handled by the output generator 'obj', \in channel 'chan' at frample 'samp'.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_465sample2file, 0, __pyx_n_s_sample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__502)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sample2file, __pyx_t_37) < 0) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4398
 *     return cclm.mus_sample_to_file(gen._ptr, samp, chan, val)
 * 
 * cpdef bint is_sample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a sample2file.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_467is_sample2file, 0, __pyx_n_s_is_sample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__503)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_sample2file, __pyx_t_37) < 0) __PYX_ERR(0, 4398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4407
 *     return cclm.mus_is_sample_to_file(gen._ptr)
 * 
 * cpdef mus_any continue_sample2file(name: str):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */
  __pyx_t_37 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_name, __pyx_n_s_str_2) < 0) __PYX_ERR(0, 4407, __pyx_L1_error)
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_469continue_sample2file, 0, __pyx_n_s_continue_sample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__505)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_40, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_continue_sample2file, __pyx_t_40) < 0) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4419
 * 
 * # ---------------- file-to-frample ---------------- #
 * cpdef mus_any make_file2frample(str filename, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an input generator reading all channels of 'filename' (a sound file).
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_471make_file2frample, 0, __pyx_n_s_make_file2frample, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__506)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_file2frample, __pyx_t_40) < 0) __PYX_ERR(0, 4419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4433
 *     return  mus_any.from_ptr(cclm.mus_make_file_to_frample_with_buffer_size(filename, buffer_size))
 * 
 * cpdef file2frample(mus_any gen, cython.long loc):             # <<<<<<<<<<<<<<
 *     """
 *     frample of samples at frample 'samp' \in sound file read by 'obj'.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_473file2frample, 0, __pyx_n_s_file2frample_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__508)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_file2frample_2, __pyx_t_40) < 0) __PYX_ERR(0, 4433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4446
 *     return outf
 * 
 * cpdef is_file2frample(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a file2frample.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_475is_file2frample, 0, __pyx_n_s_is_file2frample, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__509)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_file2frample, __pyx_t_40) < 0) __PYX_ERR(0, 4446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4457
 * 
 * # ---------------- frample-to-file ---------------- #
 * cpdef mus_any make_frample2file(str filename, cython.int chans=1, sample_type=None, header_type=None, comment=None):             # <<<<<<<<<<<<<<
 *     """
 *     return an output generator writing the sound file 'filename' which is set up to have 'chans'
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_477make_frample2file, 0, __pyx_n_s_make_frample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__510)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__500);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_frample2file, __pyx_t_40) < 0) __PYX_ERR(0, 4457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4477
 *         return mus_any.from_ptr(cclm.mus_make_frample_to_file_with_comment(filename, chans, <csndlib.mus_sample_t>sample_type, <csndlib.mus_header_t>header_type, NULL))
 * 
 * cpdef cython.double frample2file(mus_any gen, cython.long samp, vals):             # <<<<<<<<<<<<<<
 *     """
 *     add frample 'val' to the output stream handled by the output generator 'obj' at frample 'samp'.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_479frample2file, 0, __pyx_n_s_frample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__512)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_frample2file, __pyx_t_40) < 0) __PYX_ERR(0, 4477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4497
 *     return vals
 * 
 * cpdef bint is_frample2file(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a frample2file.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_481is_frample2file, 0, __pyx_n_s_is_frample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__513)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_frample2file, __pyx_t_40) < 0) __PYX_ERR(0, 4497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4507
 * 
 * 
 * cpdef mus_any continue_frample2file(str name):             # <<<<<<<<<<<<<<
 *     """
 *     reopen an existing file to continue adding sound data to it.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_483continue_frample2file, 0, __pyx_n_s_continue_frample2file, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__514)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_continue_frample2file, __pyx_t_40) < 0) __PYX_ERR(0, 4507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4519
 * 
 * # ---------------- readin ---------------- #
 * cpdef mus_any make_readin(str filename, cython.int chan=0, cython.long start=0, cython.int direction=1, buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new readin (file input) generator reading the sound file 'file' starting at frample
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_485make_readin, 0, __pyx_n_s_make_readin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__516)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_40, __pyx_tuple__517);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_readin, __pyx_t_40) < 0) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4541
 *     return mus_any.from_ptr(cclm.mus_make_readin_with_buffer_size(filename, chan, start, direction, buffer_size))
 * 
 * cpdef cython.double readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from readin generator (a sound file reader).
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_487readin, 0, __pyx_n_s_readin_2, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__518)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_readin_2, __pyx_t_40) < 0) __PYX_ERR(0, 4541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4550
 *     return cclm.mus_readin(gen._ptr)
 * 
 * cpdef is_readin(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a readin.
 */
  __pyx_t_40 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_489is_readin, 0, __pyx_n_s_is_readin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__519)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_readin, __pyx_t_40) < 0) __PYX_ERR(0, 4550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;

  /* "pysndlib/clm.pyx":4561
 * 
 * # ---------------- src ---------------- #
 * def make_src(inp , cython.double srate=1.0, cython.int width=10):             # <<<<<<<<<<<<<<
 *     """
 *     return a new sampling-rate conversion generator (using 'warped sinc interpolation'). 'srate' is the
 */
  __pyx_t_40 = PyFloat_FromDouble(((double)1.0)); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_40);
  __pyx_t_37 = __Pyx_PyInt_From_int(((int)10)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_GIVEREF(__pyx_t_40);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_40)) __PYX_ERR(0, 4561, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_t_37)) __PYX_ERR(0, 4561, __pyx_L1_error);
  __pyx_t_40 = 0;
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_491make_src, 0, __pyx_n_s_make_src, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__521)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_src, __pyx_t_37) < 0) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4600
 *     return res
 * 
 * cpdef cython.double src(mus_any gen, cython.double sr_change=0.0):             # <<<<<<<<<<<<<<
 *     """
 *     next sampling rate conversion sample. 'pm' can be used to change the sampling rate on a
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_493src, 0, __pyx_n_s_src, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__523)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__524);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_src, __pyx_t_37) < 0) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4616
 *         return 0.0
 * 
 * cpdef bint is_src(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a src.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_495is_src, 0, __pyx_n_s_is_src, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__525)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_src, __pyx_t_37) < 0) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4628
 * # ---------------- convolve ---------------- #
 * 
 * def make_convolve(inp, filt, cython.long fft_size=512, filter_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     return a new convolution generator which convolves its input with the impulse response 'filter'.
 */
  __pyx_t_37 = __Pyx_PyInt_From_long(((long)0x200)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_37)) __PYX_ERR(0, 4628, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, Py_None)) __PYX_ERR(0, 4628, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_497make_convolve, 0, __pyx_n_s_make_convolve, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__527)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_convolve, __pyx_t_37) < 0) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4694
 * 
 * 
 * cpdef cython.double convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from convolution generator.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_499convolve, 0, __pyx_n_s_convolve, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__528)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_convolve, __pyx_t_37) < 0) __PYX_ERR(0, 4694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4703
 *     return cclm.mus_convolve(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_convolve(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a convolve.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_501is_convolve, 0, __pyx_n_s_is_convolve, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__529)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_convolve, __pyx_t_37) < 0) __PYX_ERR(0, 4703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4714
 * 
 * # --------------- granulate ----------------
 * def make_granulate(inp,             # <<<<<<<<<<<<<<
 *                     expansion: Optional[float]=1.0,
 *                     length: Optional[float]=.15,
 */
  __pyx_t_37 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_expansion, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_length, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_scaler, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_hop, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_ramp, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_jitter, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_max_size, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_503make_granulate, 0, __pyx_n_s_make_granulate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__531)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__532);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_41, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_granulate, __pyx_t_41) < 0) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":4784
 * 
 * #todo: mus_granulate_grain_max_length
 * cpdef cython.double granulate(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next sample from granular synthesis generator.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_505granulate, 0, __pyx_n_s_granulate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__533)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_granulate, __pyx_t_41) < 0) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":4798
 * 
 * 
 * cpdef bint is_granulate(mus_any e):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a granulate.
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_507is_granulate, 0, __pyx_n_s_is_granulate, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__535)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_granulate, __pyx_t_41) < 0) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":4808
 * 
 * #--------------- phase-vocoder ----------------#
 * def make_phase_vocoder(inp,             # <<<<<<<<<<<<<<
 *                         fft_size: Optional[int]=512,
 *                         overlap: Optional[int]=4,
 */
  __pyx_t_41 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_fft_size, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_overlap, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_interp, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_pitch, __pyx_kp_s_Optional_float) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_509make_phase_vocoder, 0, __pyx_n_s_make_phase_vocoder, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__537)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__538);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_37, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_phase_vocoder, __pyx_t_37) < 0) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4897
 * 
 * 
 * cpdef cython.double phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     next phase vocoder value.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_511phase_vocoder, 0, __pyx_n_s_phase_vocoder, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__539)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder, __pyx_t_37) < 0) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4909
 *         return cclm.mus_phase_vocoder(gen._ptr, gen._inputcallback)
 * 
 * cpdef bint is_phase_vocoder(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a phase_vocoder.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_513is_phase_vocoder, 0, __pyx_n_s_is_phase_vocoder, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__540)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_phase_vocoder, __pyx_t_37) < 0) __PYX_ERR(0, 4909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4919
 * 
 * 
 * cpdef np.ndarray phase_vocoder_amp_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitude increments per sample.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_515phase_vocoder_amp_increments, 0, __pyx_n_s_phase_vocoder_amp_increments, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__541)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder_amp_increments, __pyx_t_37) < 0) __PYX_ERR(0, 4919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4925
 *     return gen._pv_amp_increments
 * 
 * cpdef np.ndarray phase_vocoder_amps(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid amplitudes.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_517phase_vocoder_amps, 0, __pyx_n_s_phase_vocoder_amps, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__542)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder_amps, __pyx_t_37) < 0) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4931
 *     return gen._pv_amps
 * 
 * cpdef np.ndarray phase_vocoder_freqs(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid frequencies.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_519phase_vocoder_freqs, 0, __pyx_n_s_phase_vocoder_freqs, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__543)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder_freqs, __pyx_t_37) < 0) __PYX_ERR(0, 4931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4937
 *     return gen._pv_freqs
 * 
 * cpdef np.ndarray phase_vocoder_phases(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phases.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_521phase_vocoder_phases, 0, __pyx_n_s_phase_vocoder_phases, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__544)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder_phases, __pyx_t_37) < 0) __PYX_ERR(0, 4937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4943
 *     return gen._pv_phases
 * 
 * cpdef np.ndarray phase_vocoder_phase_increments(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns a ndarray containing the current output sinusoid phase increments.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_523phase_vocoder_phase_increments, 0, __pyx_n_s_phase_vocoder_phase_increments, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__545)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_vocoder_phase_increments, __pyx_t_37) < 0) __PYX_ERR(0, 4943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4950
 * 
 * # --------------- out-any ---------------- #
 * cpdef out_any(cython.long loc, cython.double data, cython.int channel, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_525out_any, 0, __pyx_n_s_out_any, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__547)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_any, __pyx_t_37) < 0) __PYX_ERR(0, 4950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4971
 * 
 * # --------------- outa ---------------- #
 * cpdef outa(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 0.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_527outa, 0, __pyx_n_s_outa, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__549)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_outa, __pyx_t_37) < 0) __PYX_ERR(0, 4971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":4987
 * 
 * # --------------- outb ---------------- #
 * cpdef outb(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 1.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_529outb, 0, __pyx_n_s_outb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__550)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 4987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_outb, __pyx_t_37) < 0) __PYX_ERR(0, 4987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5003
 * 
 * # --------------- outc ---------------- #
 * cpdef outc(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 2.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_531outc, 0, __pyx_n_s_outc, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__551)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_outc, __pyx_t_37) < 0) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5019
 * 
 * # --------------- outd ---------------- #
 * cpdef outd(cython.long loc, cython.double data, output=None):             # <<<<<<<<<<<<<<
 *     """
 *     add data to output \in channel 3.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_533outd, 0, __pyx_n_s_outd, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__552)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_outd, __pyx_t_37) < 0) __PYX_ERR(0, 5019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5036
 *    #
 * # --------------- out-bank ---------------- #
 * cpdef out_bank(gens, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     calls each generator \in the gens list, passing it the argument val, then sends that output to the output channels \in the list order (the first generator writes to outa, the second to outb, etc)."
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_535out_bank, 0, __pyx_n_s_out_bank, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__554)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_bank, __pyx_t_37) < 0) __PYX_ERR(0, 5036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5052
 * 
 * #--------------- in-any ----------------#
 * cpdef in_any(cython.long loc, cython.int channel, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel chan.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_537in_any, 0, __pyx_n_s_in_any, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__556)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_in_any, __pyx_t_37) < 0) __PYX_ERR(0, 5052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5073
 * 
 * #--------------- ina ----------------#
 * cpdef ina(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 0.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_539ina, 0, __pyx_n_s_ina, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__558)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ina, __pyx_t_37) < 0) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5085
 * 
 * #--------------- inb ----------------#
 * cpdef inb(cython.long loc, inp):             # <<<<<<<<<<<<<<
 *     """
 *     input stream sample at loc \in channel 1.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_541inb, 0, __pyx_n_s_inb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__559)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_inb, __pyx_t_37) < 0) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5100
 * 
 * # --------------- locsig ---------------- #
 * cpdef mus_any make_locsig(cython.double degree=0.0, cython.double distance=1., cython.double reverb=0.0, output=None, revout=None, channels=None, reverb_channels=None, Interp interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_k__61 = __pyx_e_8pysndlib_3clm_LINEAR;
  __pyx_t_37 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __pyx_t_41 = PyTuple_New(8); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_float_0_0)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 1, __pyx_float_1_)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 2, __pyx_float_0_0)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 3, Py_None)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 4, Py_None)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 5, Py_None)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 6, Py_None)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_37);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_41, 7, __pyx_t_37)) __PYX_ERR(0, 5100, __pyx_L1_error);
  __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_543make_locsig, 0, __pyx_n_s_make_locsig, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__561)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_locsig, __pyx_t_37) < 0) __PYX_ERR(0, 5100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5158
 *         raise TypeError(f"output needs to be a clm gen or np.array not a {type(output)}")
 * 
 * cpdef cython.double locsig(mus_any gen, cython.long loc, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     locsig 'gen' channel 'chan' scaler.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_545locsig, 0, __pyx_n_s_locsig, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__563)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsig, __pyx_t_37) < 0) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5170
 *     cclm.mus_locsig(gen._ptr, loc, val)
 * 
 * cpdef bint is_locsig(mus_any gen):             # <<<<<<<<<<<<<<
 *     """
 *     returns True if gen is a locsig.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_547is_locsig, 0, __pyx_n_s_is_locsig, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__564)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_locsig, __pyx_t_37) < 0) __PYX_ERR(0, 5170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5180
 *     return cclm.mus_is_locsig(gen._ptr)
 * 
 * cpdef cython.double locsig_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig 'gen' channel 'chan' scaler for main output.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_549locsig_ref, 0, __pyx_n_s_locsig_ref, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__566)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsig_ref, __pyx_t_37) < 0) __PYX_ERR(0, 5180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5191
 *     return cclm.mus_locsig_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig generator's channel 'chan' scaler to 'val'  for main output.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_551locsig_set, 0, __pyx_n_s_locsig_set, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__568)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsig_set, __pyx_t_37) < 0) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5203
 *     return cclm.mus_locsig_set(gen._ptr, chan, val)
 * 
 * cpdef cython.double locsig_reverb_ref(mus_any gen, cython.int chan):             # <<<<<<<<<<<<<<
 *     """
 *     get locsig reverb channel 'chan' scaler.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_553locsig_reverb_ref, 0, __pyx_n_s_locsig_reverb_ref, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__569)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsig_reverb_ref, __pyx_t_37) < 0) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5215
 *     return cclm.mus_locsig_reverb_ref(gen._ptr, chan)
 * 
 * cpdef cython.double locsig_reverb_set(mus_any gen, cython.int chan, cython.double val):             # <<<<<<<<<<<<<<
 *     """
 *     set the locsig reverb channel 'chan' scaler to 'val'.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_555locsig_reverb_set, 0, __pyx_n_s_locsig_reverb_set, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__570)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locsig_reverb_set, __pyx_t_37) < 0) __PYX_ERR(0, 5215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5227
 *     return cclm.mus_locsig_reverb_set(gen._ptr, chan, val)
 * 
 * cpdef move_locsig(mus_any gen,  cython.double degree, cython.double distance):             # <<<<<<<<<<<<<<
 *     """
 *     move locsig gen to reflect degree and distance.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_557move_locsig, 0, __pyx_n_s_move_locsig, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__572)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_move_locsig, __pyx_t_37) < 0) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5239
 * 
 * # added some options . todo: what about sample rate conversion
 * cpdef convolve_files(str file1, str file2, cython.double maxamp=1., str outputfile='test.aif', sample_type=None, header_type=None):             # <<<<<<<<<<<<<<
 *     """
 *     convolve-files handles a very common special case: convolve two files, then normalize the result to some maxamp.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_559convolve_files, 0, __pyx_n_s_convolve_files, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__574)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__575);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_convolve_files, __pyx_t_37) < 0) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5275
 * # --------------- dcblock ---------------- #
 * 
 * cpdef mus_any make_dcblock():             # <<<<<<<<<<<<<<
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_561make_dcblock, 0, __pyx_n_s_make_dcblock, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__576)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_dcblock, __pyx_t_37) < 0) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5278
 *     return make_filter(2, [1,-1], [1, -.99])
 * 
 * cpdef cython.double dcblock(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_563dcblock, 0, __pyx_n_s_dcblock, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__577)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dcblock, __pyx_t_37) < 0) __PYX_ERR(0, 5278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5284
 * # --------------- biquad ---------------- #
 * 
 * cpdef mus_any make_biquad(cython.double a0, cython.double a1, cython.double a2, cython.double b1, cython.double b2):             # <<<<<<<<<<<<<<
 *     """returns a biquad filter (use with the CLM filter gen)"""
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_565make_biquad, 0, __pyx_n_s_make_biquad, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__579)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad, __pyx_t_37) < 0) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5288
 *     return make_filter(3, np.array([a0,a1,a2]), np.array([0.0,b1,b2]))
 * 
 * cpdef cython.double biquad(mus_any gen, cython.double insig):             # <<<<<<<<<<<<<<
 *     return filter(gen, insig)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_567biquad, 0, __pyx_n_s_biquad, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__580)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_biquad, __pyx_t_37) < 0) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5291
 *     return filter(gen, insig)
 * 
 * cpdef bint is_biquad(mus_any gen):             # <<<<<<<<<<<<<<
 *     return is_filter(gen) and (gen.mus_order == 3)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_569is_biquad, 0, __pyx_n_s_is_biquad, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__581)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_biquad, __pyx_t_37) < 0) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5295
 * 
 * 
 * cpdef mus_any make_biquad_notch(cython.double fc, cython.double radius):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double a0 = 1.0
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_571make_biquad_notch, 0, __pyx_n_s_make_biquad_notch, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__583)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_notch, __pyx_t_37) < 0) __PYX_ERR(0, 5295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5304
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_low_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_573make_biquad_low_pass, 0, __pyx_n_s_make_biquad_low_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__585)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_low_pass, __pyx_t_37) < 0) __PYX_ERR(0, 5304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5318
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_high_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_575make_biquad_high_pass, 0, __pyx_n_s_make_biquad_high_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__586)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_high_pass, __pyx_t_37) < 0) __PYX_ERR(0, 5318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5332
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_577make_biquad_band_pass, 0, __pyx_n_s_make_biquad_band_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__587)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_band_pass, __pyx_t_37) < 0) __PYX_ERR(0, 5332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5346
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_band_reject(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_579make_biquad_band_reject, 0, __pyx_n_s_make_biquad_band_reject, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__588)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_band_reject, __pyx_t_37) < 0) __PYX_ERR(0, 5346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5360
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef mus_any make_biquad_all_pass(cython.double fc, cython.double q):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     cdef cython.double k = math.tan(np.pi * fc / sr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_581make_biquad_all_pass, 0, __pyx_n_s_make_biquad_all_pass, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__589)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_biquad_all_pass, __pyx_t_37) < 0) __PYX_ERR(0, 5360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5374
 *     return make_biquad(a0, a1, a2, b1, b2)
 * 
 * cpdef biquad_set_resonance(mus_any gen, cython.double fc, cython.double radius, bint normalize=False):             # <<<<<<<<<<<<<<
 *     cdef cython.double sr = get_srate()
 *     gen.mus_ycoeffs[2] = radius * radius
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_583biquad_set_resonance, 0, __pyx_n_s_biquad_set_resonance, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__591)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__592);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_biquad_set_resonance, __pyx_t_37) < 0) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5388
 *         gen.mus_xcoeffs[2] = 0.0
 * 
 * cpdef biquad_set_equal_gain_zeroes(mus_any gen):             # <<<<<<<<<<<<<<
 *     gen.mus_xcoeffs[0] = 1.0
 *     gen.mus_xcoeffs[1] = 0.0
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_585biquad_set_equal_gain_zeroes, 0, __pyx_n_s_biquad_set_equal_gain_zeroes, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__593)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_biquad_set_equal_gain_zeroes, __pyx_t_37) < 0) __PYX_ERR(0, 5388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5394
 * 
 * 
 * def convert_frequency(gen):             # <<<<<<<<<<<<<<
 *     gen.frequency = hz2radians(gen.frequency)
 *     return gen
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_587convert_frequency, 0, __pyx_n_s_convert_frequency, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__594)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert_frequency, __pyx_t_37) < 0) __PYX_ERR(0, 5394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_16array_readin_gen_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_array_readin_gen___reduce_cython, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__595)); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_array_readin_gen, __pyx_n_s_reduce_cython, __pyx_t_37) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_array_readin_gen);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_array_readin_gen, (type(self), 0xb0d31f2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_array_readin_gen__set_state(self, __pyx_state)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_16array_readin_gen_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_array_readin_gen___setstate_cyth, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__596)); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8pysndlib_3clm_array_readin_gen, __pyx_n_s_setstate_cython, __pyx_t_37) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  PyType_Modified(__pyx_ptype_8pysndlib_3clm_array_readin_gen);

  /* "pysndlib/clm.pyx":5447
 *         return self._val
 * 
 * cpdef array_readin_gen make_array_readin(arr: npt.NDArray[np.float64], chan: Optional[int]=0, start: Optional[int]=0, direction: Optional[int]=1):             # <<<<<<<<<<<<<<
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 */
  __pyx_t_37 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_arr, __pyx_kp_s_npt_NDArray_np_float64) < 0) __PYX_ERR(0, 5447, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_chan, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 5447, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_start, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 5447, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_37, __pyx_n_s_direction, __pyx_kp_s_Optional_int) < 0) __PYX_ERR(0, 5447, __pyx_L1_error)
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_589make_array_readin, 0, __pyx_n_s_make_array_readin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__598)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__599);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_41, __pyx_t_37);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_array_readin, __pyx_t_41) < 0) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5450
 *     return array_readin_gen(arr, chan, start, direction)
 * 
 * cpdef array_readin(gen: array_readin_gen):             # <<<<<<<<<<<<<<
 *     return gen()
 * 
 */
  __pyx_t_41 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_gen, __pyx_n_s_array_readin_gen) < 0) __PYX_ERR(0, 5450, __pyx_L1_error)
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_591array_readin, 0, __pyx_n_s_array_readin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__600)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_37, __pyx_t_41);
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_readin, __pyx_t_37) < 0) __PYX_ERR(0, 5450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5453
 *     return gen()
 * 
 * cpdef is_array_readin(gen):             # <<<<<<<<<<<<<<
 *     return isinstance(gen, array_readin_gen)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_593is_array_readin, 0, __pyx_n_s_is_array_readin, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__601)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_array_readin, __pyx_t_37) < 0) __PYX_ERR(0, 5453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5488
 * 
 * 
 * def clamp(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_595clamp, 0, __pyx_n_s_clamp, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__603)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clamp, __pyx_t_37) < 0) __PYX_ERR(0, 5488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5494
 * 
 * 
 * def _clip(x, lo, hi):             # <<<<<<<<<<<<<<
 *     return max(min(x, hi),lo)
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_597_clip, 0, __pyx_n_s_clip, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__604)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clip, __pyx_t_37) < 0) __PYX_ERR(0, 5494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5498
 * 
 * 
 * def _wrap(x, lo, hi):             # <<<<<<<<<<<<<<
 *     r = hi-lo
 *     if x >= lo and x <= hi:
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_599_wrap, 0, __pyx_n_s_wrap, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__606)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wrap, __pyx_t_37) < 0) __PYX_ERR(0, 5498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5507
 *         return lo + (math.fmod((x-hi), r))
 * 
 * def array_reader(arr, chan, loop=False):             # <<<<<<<<<<<<<<
 *     ind = 0
 *     if chan > (get_channels(arr)):
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_601array_reader, 0, __pyx_n_s_array_reader, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__608)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_37, __pyx_tuple__609);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_reader, __pyx_t_37) < 0) __PYX_ERR(0, 5507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5529
 *     return reader
 * 
 * def sndplay(file):             # <<<<<<<<<<<<<<
 *     subprocess.run([default.player,file])
 * 
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_603sndplay, 0, __pyx_n_s_sndplay, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__611)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sndplay, __pyx_t_37) < 0) __PYX_ERR(0, 5529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5533
 * 
 * #decorator for reverbs.
 * def clm_reverb(func):             # <<<<<<<<<<<<<<
 *     @functools.wraps(func)
 *     def call(*args, **kwargs):
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_605clm_reverb, 0, __pyx_n_s_clm_reverb, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__613)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clm_reverb, __pyx_t_37) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5539
 *     return call
 * 
 * def array_resample(arr, new_length, interp_type=Interp.LINEAR):             # <<<<<<<<<<<<<<
 *     res = np.zeros(new_length)
 *     inp = np.array(arr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_607array_resample, 0, __pyx_n_s_array_resample, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__615)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_37, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __pyx_t_41 = __Pyx_Enum_enum__dunderpyx_t_8pysndlib_3clm_Interp_to_py(__pyx_e_8pysndlib_3clm_LINEAR); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_37)->__pyx_arg_interp_type = __pyx_t_41;
  __Pyx_GIVEREF(__pyx_t_41);
  __pyx_t_41 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_37, __pyx_pf_8pysndlib_3clm_631__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_resample, __pyx_t_37) < 0) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5549
 * 
 * 
 * def phase_delay(gen, freq):             # <<<<<<<<<<<<<<
 *     omega_t = 2 * np.pi * freq / get_srate()
 *     real = 0.
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_609phase_delay, 0, __pyx_n_s_phase_delay, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__617)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_phase_delay, __pyx_t_37) < 0) __PYX_ERR(0, 5549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5572
 * 
 * 
 * def impulse_generator(arr):             # <<<<<<<<<<<<<<
 *     n = 0
 *     num = len(arr)
 */
  __pyx_t_37 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_611impulse_generator, 0, __pyx_n_s_impulse_generator, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_impulse_generator, __pyx_t_37) < 0) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;

  /* "pysndlib/clm.pyx":5582
 * # # --------------- bessel functions ---------------- #
 * 
 * from math import fabs, sqrt, exp             # <<<<<<<<<<<<<<
 * 
 * cpdef cython.double bes_i0(cython.double x):
 */
  __pyx_t_37 = PyList_New(3); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  __Pyx_INCREF(__pyx_n_s_fabs);
  __Pyx_GIVEREF(__pyx_n_s_fabs);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_37, 0, __pyx_n_s_fabs)) __PYX_ERR(0, 5582, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_sqrt);
  __Pyx_GIVEREF(__pyx_n_s_sqrt);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_37, 1, __pyx_n_s_sqrt)) __PYX_ERR(0, 5582, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_exp);
  __Pyx_GIVEREF(__pyx_n_s_exp);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_37, 2, __pyx_n_s_exp)) __PYX_ERR(0, 5582, __pyx_L1_error);
  __pyx_t_41 = __Pyx_Import(__pyx_n_s_math, __pyx_t_37, 0); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_ImportFrom(__pyx_t_41, __pyx_n_s_fabs); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fabs, __pyx_t_37) < 0) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_ImportFrom(__pyx_t_41, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sqrt, __pyx_t_37) < 0) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __pyx_t_37 = __Pyx_ImportFrom(__pyx_t_41, __pyx_n_s_exp); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_37);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_exp, __pyx_t_37) < 0) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5584
 * from math import fabs, sqrt, exp
 * 
 * cpdef cython.double bes_i0(cython.double x):             # <<<<<<<<<<<<<<
 *     cdef cython.double ax
 *     cdef cython.double ans
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_614bes_i0, 0, __pyx_n_s_bes_i0, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__619)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_i0, __pyx_t_41) < 0) __PYX_ERR(0, 5584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5602
 * from pysndlib.cmath_sf cimport j0, j1, jn, y0, y1, yn
 * 
 * cpdef cython.double bes_j0(cython.double x):             # <<<<<<<<<<<<<<
 *     return j0(x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_616bes_j0, 0, __pyx_n_s_bes_j0, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__620)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_j0, __pyx_t_41) < 0) __PYX_ERR(0, 5602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5605
 *     return j0(x)
 * 
 * cpdef cython.double bes_j1(cython.double x):             # <<<<<<<<<<<<<<
 *     return j1(x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_618bes_j1, 0, __pyx_n_s_bes_j1, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__621)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_j1, __pyx_t_41) < 0) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5608
 *     return j1(x)
 * 
 * cpdef cython.double bes_jn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return jn(n, x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_620bes_jn, 0, __pyx_n_s_bes_jn, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__623)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_jn, __pyx_t_41) < 0) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5611
 *     return jn(n, x)
 * 
 * cpdef cython.double bes_y0(cython.double x):             # <<<<<<<<<<<<<<
 *     return y0(x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_622bes_y0, 0, __pyx_n_s_bes_y0, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__624)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_y0, __pyx_t_41) < 0) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5614
 *     return y0(x)
 * 
 * cpdef cython.double bes_y1(cython.double x):             # <<<<<<<<<<<<<<
 *     return y1(x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_624bes_y1, 0, __pyx_n_s_bes_y1, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__625)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_y1, __pyx_t_41) < 0) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5617
 *     return y1(x)
 * 
 * cpdef cython.double bes_yn(cython.int n, cython.double x):             # <<<<<<<<<<<<<<
 *     return yn(n, x)
 * 
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_626bes_yn, 0, __pyx_n_s_bes_yn, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__626)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bes_yn, __pyx_t_41) < 0) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":5621
 * 
 * 
 * cpdef cython.doublecomplex edot_product(cython.doublecomplex freq, np.ndarray data, size=None):             # <<<<<<<<<<<<<<
 *     if size is None:
 *         size = len(data)
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_628edot_product, 0, __pyx_n_s_edot_product, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__628)); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_41, __pyx_tuple__77);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_edot_product, __pyx_t_41) < 0) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_array_readin_gen(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_41 = __Pyx_CyFunction_New(&__pyx_mdef_8pysndlib_3clm_630__pyx_unpickle_array_readin_gen, 0, __pyx_n_s_pyx_unpickle_array_readin_gen, NULL, __pyx_n_s_pysndlib_clm, __pyx_d, ((PyObject *)__pyx_codeobj__629)); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_array_readin_gen, __pyx_t_41) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /* "pysndlib/clm.pyx":1
 * # cython: c_string_type=unicode             # <<<<<<<<<<<<<<
 * # cython: c_string_encoding=utf8
 * 
 */
  __pyx_t_41 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_41);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_41) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_XDECREF(__pyx_t_29);
  __Pyx_XDECREF(__pyx_t_30);
  __Pyx_XDECREF(__pyx_t_31);
  __Pyx_XDECREF(__pyx_t_32);
  __Pyx_XDECREF(__pyx_t_33);
  __Pyx_XDECREF(__pyx_t_34);
  __Pyx_XDECREF(__pyx_t_35);
  __Pyx_XDECREF(__pyx_t_36);
  __Pyx_XDECREF(__pyx_t_37);
  __Pyx_XDECREF(__pyx_t_38);
  __Pyx_XDECREF(__pyx_t_39);
  __Pyx_XDECREF(__pyx_t_40);
  __Pyx_XDECREF(__pyx_t_41);
  __Pyx_XDECREF(__pyx_t_42);
  __Pyx_XDECREF(__pyx_t_43);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pysndlib.clm", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pysndlib.clm");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u_);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C00A6
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
    if (unlikely(tstate->current_exception))
#elif CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
    Py_ssize_t i, nparts;
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (unlikely(!module)) {
        return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
    }
    return module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__2;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    #endif
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
        #if PY_VERSION_HEX < 0x03090000
        vectorcallfunc f = _PyVectorcall_Function(func);
        #else
        vectorcallfunc f = PyVectorcall_Function(func);
        #endif
        if (f) {
            return f(func, args, (size_t)nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, (size_t)nargs, NULL);
        }
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
    PyObject *dict;
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        Py_XDECREF(key); key = NULL;
        Py_XDECREF(value); value = NULL;
        if (kwds_is_tuple) {
            Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(kwds);
#else
            size = PyTuple_Size(kwds);
            if (size < 0) goto bad;
#endif
            if (pos >= size) break;
#if CYTHON_AVOID_BORROWED_REFS
            key = __Pyx_PySequence_ITEM(kwds, pos);
            if (!key) goto bad;
#elif CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kwds, pos);
#else
            key = PyTuple_GetItem(kwds, pos);
            if (!key) goto bad;
#endif
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
#endif
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(value);
            Py_DECREF(key);
#endif
            key = NULL;
            value = NULL;
            continue;
        }
#if !CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(key);
#endif
        Py_INCREF(value);
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    Py_XDECREF(key);
    Py_XDECREF(value);
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    Py_XDECREF(key);
    Py_XDECREF(value);
    return -1;
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        Py_ssize_t kwsize;
#if CYTHON_ASSUME_SAFE_MACROS
        kwsize = PyTuple_GET_SIZE(kw);
#else
        kwsize = PyTuple_Size(kw);
        if (kwsize < 0) return 0;
#endif
        if (unlikely(kwsize == 0))
            return 1;
        if (!kw_allowed) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, 0);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < kwsize; pos++) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if (!kw_allowed && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
      #if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
      #elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PySequenceMultiply */
static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
    PyObject *result, *pymul = PyInt_FromSsize_t(mul);
    if (unlikely(!pymul))
        return NULL;
    result = PyNumber_Multiply(seq, pymul);
    Py_DECREF(pymul);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
#if CYTHON_USE_TYPE_SLOTS
    PyTypeObject *type = Py_TYPE(seq);
    if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
        return type->tp_as_sequence->sq_repeat(seq, mul);
    } else
#endif
    {
        return __Pyx_PySequence_Multiply_Generic(seq, mul);
    }
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o))
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* RaiseUnboundLocalError */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* DivInt[mus_long_t] */
static CYTHON_INLINE mus_long_t __Pyx_div_mus_long_t(mus_long_t a, mus_long_t b) {
    mus_long_t q = a / b;
    mus_long_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(size_t)*3+2];
    char *dpos, *end = digits + sizeof(size_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    size_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (size_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (size_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (size_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* BufferIndexError */
static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) == 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_FALSE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a - (unsigned long)b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return PyLong_FromLong(-intval);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* pybytes_as_double */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value;
#if PY_MAJOR_VERSION >= 3
    float_value = PyFloat_FromString(obj);
#else
    float_value = PyFloat_FromString(obj, 0);
#endif
    if (likely(float_value)) {
#if CYTHON_ASSUME_SAFE_MACROS
        double value = PyFloat_AS_DOUBLE(float_value);
#else
        double value = PyFloat_AsDouble(float_value);
#endif
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pynumber_float */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
    double val;
    if (PyLong_CheckExact(obj)) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (likely(__Pyx_PyLong_IsCompact(obj))) {
            val = (double) __Pyx_PyLong_CompactValue(obj);
            goto no_error;
        }
#endif
        val = PyLong_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj)) {
        val = __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        val = __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        val = __Pyx_PyByteArray_AsDouble(obj);
    } else {
        return PyNumber_Float(obj);
    }
    if (unlikely(val == -1 && PyErr_Occurred())) {
        return NULL;
    }
#if CYTHON_USE_PYLONG_INTERNALS
no_error:
#endif
    return PyFloat_FromDouble(val);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyNumberPow2 */
static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace) {
#if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t shiftby;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(exp))) {
        shiftby = PyInt_AS_LONG(exp);
    } else
#endif
    if (likely(PyLong_CheckExact(exp))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(exp)) {
            return PyInt_FromLong(1L);
        } else if (__Pyx_PyLong_IsNeg(exp)) {
            goto fallback;
        } else if (__Pyx_PyLong_IsCompact(exp)) {
            shiftby = __Pyx_PyLong_CompactValueUnsigned(exp);
        } else {
            shiftby = PyLong_AsSsize_t(exp);
        }
        #else
        shiftby = PyLong_AsSsize_t(exp);
        #endif
    } else {
        goto fallback;
    }
    if (likely(shiftby >= 0)) {
        if ((size_t)shiftby <= sizeof(long) * 8 - 2) {
            long value = 1L << shiftby;
            return PyInt_FromLong(value);
#ifdef HAVE_LONG_LONG
        } else if ((size_t)shiftby <= sizeof(unsigned PY_LONG_LONG) * 8 - 1) {
            unsigned PY_LONG_LONG value = ((unsigned PY_LONG_LONG)1) << shiftby;
            return PyLong_FromUnsignedLongLong(value);
#endif
        } else {
            PyObject *result, *one = PyInt_FromLong(1L);
            if (unlikely(!one)) return NULL;
            result = PyNumber_Lshift(one, exp);
            Py_DECREF(one);
            return result;
        }
    } else if (shiftby == -1 && PyErr_Occurred()) {
        PyErr_Clear();
    }
fallback:
#endif
    return (inplace ? PyNumber_InPlacePower : PyNumber_Power)(two, exp, none);
}

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a == b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc;
    __Pyx_PyThreadState_declare
    #ifdef __Pyx_StopAsyncIteration_USED
    int is_async_stopiteration = 0;
    #endif
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    cur_exc = PyErr_Occurred();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        #ifdef __Pyx_StopAsyncIteration_USED
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else
        #endif
            return;
    }
    __Pyx_PyThreadState_assign
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(val);
    Py_XDECREF(tb);
    PyErr_SetString(PyExc_RuntimeError,
        #ifdef __Pyx_StopAsyncIteration_USED
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        #endif
        "generator raised StopIteration");
}

/* ModInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_TRUE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* RaiseClosureNameError */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#elif PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyObject *py_name = NULL;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
    if (!py_name) return NULL;
    PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
                 py_name);
    Py_DECREF(py_name);
#else
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
#endif
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_MACROS
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(!argc) < 0) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                lla = a;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetName(Py_TYPE(iterator));
    PyErr_Format(PyExc_TypeError,
        __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
    __Pyx_DECREF_TypeName(iterator_type_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
        next = iternext(iterator);
        if (likely(next))
            return next;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
#endif
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double a = floatval;
    double b, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op2))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        b = __pyx_PyFloat_AsDouble(op2);
#else
        b = PyFloat_AS_DOUBLE(op2);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        b = (double) PyInt_AS_LONG(op2);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op2))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op2)) {
            b = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op2)) {
            b = (double) __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    b = PyLong_AsDouble(op2);
                    if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
    }
        PyFPE_START_PROTECT("subtract", return NULL)
        result = a - b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long b = PyInt_AS_LONG(op2);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                llb = b;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_MACROS
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (n < 0) return -1;
#endif
    for (i = 1; i < n; i++)
    {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i;
    void** base_vtables;
    __Pyx_TypeName tp_base_name;
    __Pyx_TypeName base_name;
    void* unknown = (void*)-1;
    PyObject* bases = type->tp_bases;
    int base_depth = 0;
    {
        PyTypeObject* base = type->tp_base;
        while (base) {
            base_depth += 1;
            base = base->tp_base;
        }
    }
    base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
    for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
        void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = type->tp_base;
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = base->tp_base;
            }
        }
    }
    PyErr_Clear();
    free(base_vtables);
    return 0;
bad:
    tp_base_name = __Pyx_PyType_GetName(type->tp_base);
    base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
    free(base_vtables);
    return -1;
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_0_8
#define __PYX_HAVE_RT_ImportType_3_0_8
static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_8 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_8 && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
    size_bases = PyTuple_GET_SIZE(bases);
    for (i = 0; i < size_bases; i++) {
        base  = PyTuple_GET_ITEM(bases, i);
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                base = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base);
                Py_INCREF(base);
            }
        }
        j = PyList_GET_SIZE(new_bases);
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
    return result;
error:
    Py_XDECREF(new_bases);
    return NULL;
}

/* SetNewInClass */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
#ifdef __Pyx_CyFunction_USED
    int ret;
    if (__Pyx_CyFunction_Check(value)) {
        PyObject *staticnew = PyStaticMethod_New(value);
        if (unlikely(!staticnew)) return -1;
        ret = __Pyx_SetNameInClass(ns, name, staticnew);
        Py_DECREF(staticnew);
        return ret;
    }
#endif
    return __Pyx_SetNameInClass(ns, name, value);
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_MACROS
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_d);
}

/* UnpackUnboundCMethod */
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
     METH_VARARGS | METH_KEYWORDS,
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #else
    if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            target->method = unbound_method;
        }
    }
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* PyExec */
static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject* o, PyObject* globals) {
    return __Pyx_PyExec3(o, globals, NULL);
}
static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals) {
    PyObject* result;
    PyObject* s = 0;
    char *code = 0;
    if (!globals || globals == Py_None) {
        globals = __pyx_d;
    } else if (unlikely(!PyDict_Check(globals))) {
        __Pyx_TypeName globals_type_name =
            __Pyx_PyType_GetName(Py_TYPE(globals));
        PyErr_Format(PyExc_TypeError,
                     "exec() arg 2 must be a dict, not " __Pyx_FMT_TYPENAME,
                     globals_type_name);
        __Pyx_DECREF_TypeName(globals_type_name);
        goto bad;
    }
    if (!locals || locals == Py_None) {
        locals = globals;
    }
    if (__Pyx_PyDict_GetItemStr(globals, __pyx_n_s_builtins) == NULL) {
        if (unlikely(PyDict_SetItem(globals, __pyx_n_s_builtins, PyEval_GetBuiltins()) < 0))
            goto bad;
    }
    if (PyCode_Check(o)) {
        if (unlikely(__Pyx_PyCode_HasFreeVars((PyCodeObject *)o))) {
            PyErr_SetString(PyExc_TypeError,
                "code object passed to exec() may not contain free variables");
            goto bad;
        }
        #if PY_VERSION_HEX < 0x030200B1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
        result = PyEval_EvalCode((PyCodeObject *)o, globals, locals);
        #else
        result = PyEval_EvalCode(o, globals, locals);
        #endif
    } else {
        PyCompilerFlags cf;
        cf.cf_flags = 0;
#if PY_VERSION_HEX >= 0x030800A3
        cf.cf_feature_version = PY_MINOR_VERSION;
#endif
        if (PyUnicode_Check(o)) {
            cf.cf_flags = PyCF_SOURCE_IS_UTF8;
            s = PyUnicode_AsUTF8String(o);
            if (unlikely(!s)) goto bad;
            o = s;
        #if PY_MAJOR_VERSION >= 3
        } else if (unlikely(!PyBytes_Check(o))) {
        #else
        } else if (unlikely(!PyString_Check(o))) {
        #endif
            __Pyx_TypeName o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
            PyErr_Format(PyExc_TypeError,
                "exec: arg 1 must be string, bytes or code object, got " __Pyx_FMT_TYPENAME,
                o_type_name);
            __Pyx_DECREF_TypeName(o_type_name);
            goto bad;
        }
        #if PY_MAJOR_VERSION >= 3
        code = PyBytes_AS_STRING(o);
        #else
        code = PyString_AS_STRING(o);
        #endif
        if (PyEval_MergeCompilerFlags(&cf)) {
            result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf);
        } else {
            result = PyRun_String(code, Py_file_input, globals, locals);
        }
        Py_XDECREF(s);
    }
    return result;
bad:
    Py_XDECREF(s);
    return 0;
}

/* PyExecGlobals */
static PyObject* __Pyx_PyExecGlobals(PyObject* code) {
    return __Pyx_PyExec2(code, __pyx_d);
}

/* CyFunctionClassCell */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) {
    Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions);
    for (i = 0; i < count; i++) {
        __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *)
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            PyList_GET_ITEM(cyfunctions, i);
#else
            PySequence_ITEM(cyfunctions, i);
        if (unlikely(!m))
            return -1;
#endif
        __Pyx_CyFunction_SetClassObj(m, classobj);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF((PyObject*)m);
#endif
    }
    return 0;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
    if (unlikely(!code_object)) goto bad;
    py_py_line = PyLong_FromLong(py_line);
    if (unlikely(!py_py_line)) goto bad;
    py_funcname = PyUnicode_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    dict = PyDict_New();
    if (unlikely(!dict)) goto bad;
    {
        PyObject *old_code_object = code_object;
        code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
        Py_DECREF(old_code_object);
    }
    if (unlikely(!code_object)) goto bad;
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    __Pyx_TypeName obj_type_name;
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
                 "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
                 obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
    view->obj = NULL;
    Py_DECREF(obj);
}
#endif


/* MemviewSliceIsContig */
static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* FromPy */
static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
    Py_complex cval;
#if !CYTHON_COMPILING_IN_PYPY
    if (PyComplex_CheckExact(o))
        cval = ((PyComplexObject *)o)->cval;
    else
#endif
        cval = PyComplex_AsCComplex(o);
    return __pyx_t_double_complex_from_parts(
               (double)cval.real,
               (double)cval.imag);
}

/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t <= '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case '?': return "'bool'";
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparsable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(is_complex);
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(is_complex);
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static int
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number, ndim;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return -1;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
    ndim = ctx->head->field->type->ndim;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return -1;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
            PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
            return -1;
        }
        if (*ts != ',' && *ts != ')') {
            PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
            return -1;
        }
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim) {
        PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
        return -1;
    }
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return -1;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return 0;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* TypeInfoCompare */
  static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
{
    int i;
    if (!a || !b)
        return 0;
    if (a == b)
        return 1;
    if (a->size != b->size || a->typegroup != b->typegroup ||
            a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
        if (a->typegroup == 'H' || b->typegroup == 'H') {
            return a->size == b->size;
        } else {
            return 0;
        }
    }
    if (a->ndim) {
        for (i = 0; i < a->ndim; i++)
            if (a->arraysize[i] != b->arraysize[i])
                return 0;
    }
    if (a->typegroup == 'S') {
        if (a->flags != b->flags)
            return 0;
        if (a->fields || b->fields) {
            if (!(a->fields && b->fields))
                return 0;
            for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                __Pyx_StructField *field_a = a->fields + i;
                __Pyx_StructField *field_b = b->fields + i;
                if (field_a->offset != field_b->offset ||
                    !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                    return 0;
            }
            return !a->fields[i].type && !b->fields[i].type;
        }
    }
    return 1;
}

/* MemviewSliceValidateAndInit */
  static int
__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
{
    if (buf->shape[dim] <= 1)
        return 1;
    if (buf->strides) {
        if (spec & __Pyx_MEMVIEW_CONTIG) {
            if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                if (unlikely(buf->strides[dim] != sizeof(void *))) {
                    PyErr_Format(PyExc_ValueError,
                                 "Buffer is not indirectly contiguous "
                                 "in dimension %d.", dim);
                    goto fail;
                }
            } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
        if (spec & __Pyx_MEMVIEW_FOLLOW) {
            Py_ssize_t stride = buf->strides[dim];
            if (stride < 0)
                stride = -stride;
            if (unlikely(stride < buf->itemsize)) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
    } else {
        if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not contiguous in "
                         "dimension %d", dim);
            goto fail;
        } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not indirect in "
                         "dimension %d", dim);
            goto fail;
        } else if (unlikely(buf->suboffsets)) {
            PyErr_SetString(PyExc_ValueError,
                            "Buffer exposes suboffsets but no strides");
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
{
    CYTHON_UNUSED_VAR(ndim);
    if (spec & __Pyx_MEMVIEW_DIRECT) {
        if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer not compatible with direct access "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    if (spec & __Pyx_MEMVIEW_PTR) {
        if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer is not indirectly accessible "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
{
    int i;
    if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = 0; i < ndim; i++) {
            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not fortran contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = ndim - 1; i >- 1; i--) {
            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not C contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    }
    return 1;
fail:
    return 0;
}
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj)
{
    struct __pyx_memoryview_obj *memview, *new_memview;
    __Pyx_RefNannyDeclarations
    Py_buffer *buf;
    int i, spec = 0, retval = -1;
    __Pyx_BufFmt_Context ctx;
    int from_memoryview = __pyx_memoryview_check(original_obj);
    __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
    if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                            original_obj)->typeinfo)) {
        memview = (struct __pyx_memoryview_obj *) original_obj;
        new_memview = NULL;
    } else {
        memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                            original_obj, buf_flags, 0, dtype);
        new_memview = memview;
        if (unlikely(!memview))
            goto fail;
    }
    buf = &memview->view;
    if (unlikely(buf->ndim != ndim)) {
        PyErr_Format(PyExc_ValueError,
                "Buffer has wrong number of dimensions (expected %d, got %d)",
                ndim, buf->ndim);
        goto fail;
    }
    if (new_memview) {
        __Pyx_BufFmt_Init(&ctx, stack, dtype);
        if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
    }
    if (unlikely((unsigned) buf->itemsize != dtype->size)) {
        PyErr_Format(PyExc_ValueError,
                     "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                     "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                     buf->itemsize,
                     (buf->itemsize > 1) ? "s" : "",
                     dtype->name,
                     dtype->size,
                     (dtype->size > 1) ? "s" : "");
        goto fail;
    }
    if (buf->len > 0) {
        for (i = 0; i < ndim; i++) {
            spec = axes_specs[i];
            if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
                goto fail;
            if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
                goto fail;
        }
        if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
            goto fail;
    }
    if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                         new_memview != NULL) == -1)) {
        goto fail;
    }
    retval = 0;
    goto no_fail;
fail:
    Py_XDECREF(new_memview);
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 2,
                                                 &__Pyx_TypeInfo_double, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_double, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_float_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_mus_float_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_mus_long_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_mus_long_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* Declarations */
  #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
  #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = (float)(1.0) / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = (float)(1.0) / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
  #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
  #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = (double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = (double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* MemviewSliceCopyTemplate */
  static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object)
{
    __Pyx_RefNannyDeclarations
    int i;
    __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
    struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
    Py_buffer *buf = &from_memview->view;
    PyObject *shape_tuple = NULL;
    PyObject *temp_int = NULL;
    struct __pyx_array_obj *array_obj = NULL;
    struct __pyx_memoryview_obj *memview_obj = NULL;
    __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
    for (i = 0; i < ndim; i++) {
        if (unlikely(from_mvs->suboffsets[i] >= 0)) {
            PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                           "indirect dimensions (axis %d)", i);
            goto fail;
        }
    }
    shape_tuple = PyTuple_New(ndim);
    if (unlikely(!shape_tuple)) {
        goto fail;
    }
    __Pyx_GOTREF(shape_tuple);
    for(i = 0; i < ndim; i++) {
        temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
        if(unlikely(!temp_int)) {
            goto fail;
        } else {
            PyTuple_SET_ITEM(shape_tuple, i, temp_int);
            temp_int = NULL;
        }
    }
    array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
    if (unlikely(!array_obj)) {
        goto fail;
    }
    __Pyx_GOTREF(array_obj);
    memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                    (PyObject *) array_obj, contig_flag,
                                    dtype_is_object,
                                    from_mvs->memview->typeinfo);
    if (unlikely(!memview_obj))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
        goto fail;
    if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                dtype_is_object) < 0))
        goto fail;
    goto no_fail;
fail:
    __Pyx_XDECREF(new_mvs.memview);
    new_mvs.memview = NULL;
    new_mvs.data = NULL;
no_fail:
    __Pyx_XDECREF(shape_tuple);
    __Pyx_XDECREF(temp_int);
    __Pyx_XDECREF(array_obj);
    __Pyx_RefNannyFinishContext();
    return new_mvs;
}

/* MemviewSliceInit */
  static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (unlikely(memviewslice->memview || memviewslice->data)) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF(memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}
#ifndef Py_NO_RETURN
#define Py_NO_RETURN
#endif
static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
    va_list vargs;
    char msg[200];
#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        return;
    }
    old_acquisition_count = __pyx_add_acquisition_count(memview);
    if (unlikely(old_acquisition_count <= 0)) {
        if (likely(old_acquisition_count == 0)) {
            if (have_gil) {
                Py_INCREF((PyObject *) memview);
            } else {
                PyGILState_STATE _gilstate = PyGILState_Ensure();
                Py_INCREF((PyObject *) memview);
                PyGILState_Release(_gilstate);
            }
        } else {
            __pyx_fatalerror("Acquisition count is %d (line %d)",
                             old_acquisition_count+1, lineno);
        }
    }
}
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        memslice->memview = NULL;
        return;
    }
    old_acquisition_count = __pyx_sub_acquisition_count(memview);
    memslice->data = NULL;
    if (likely(old_acquisition_count > 1)) {
        memslice->memview = NULL;
    } else if (likely(old_acquisition_count == 1)) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         old_acquisition_count-1, lineno);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                                return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                                return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                                return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                                return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                                return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                                return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                                return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                                return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                                return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(int) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (int) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (int) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (int) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (int) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (int) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((int) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((int) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PY_LONG_LONG));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
  static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(PY_LONG_LONG) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_LONG) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                                return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(PY_LONG_LONG) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (PY_LONG_LONG) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (PY_LONG_LONG) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (PY_LONG_LONG) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (PY_LONG_LONG) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (PY_LONG_LONG) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((PY_LONG_LONG) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((PY_LONG_LONG) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((PY_LONG_LONG) 1) << (sizeof(PY_LONG_LONG) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(uint64_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) {
                                return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) {
                                return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) {
                                return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(uint64_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(uint64_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (uint64_t) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (uint64_t) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (uint64_t) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (uint64_t) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (uint64_t) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((uint64_t) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((uint64_t) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(size_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                                return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                                return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) {
                                return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(size_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(size_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (size_t) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (size_t) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (size_t) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (size_t) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (size_t) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((size_t) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((size_t) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                                return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                                return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                                return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(long) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                                return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                                return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                                return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                                return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                                return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                                return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(long) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (long) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (long) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (long) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (long) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (long) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((long) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((long) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Interp __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Interp neg_one = (enum __pyx_t_8pysndlib_3clm_Interp) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Interp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(enum __pyx_t_8pysndlib_3clm_Interp) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_8pysndlib_3clm_Interp) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) >= 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((((enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) >= 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) >= 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum __pyx_t_8pysndlib_3clm_Interp) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Interp, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((enum __pyx_t_8pysndlib_3clm_Interp)-1)*(((((enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) ((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((enum __pyx_t_8pysndlib_3clm_Interp)-1)*(((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) ((((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) (((enum __pyx_t_8pysndlib_3clm_Interp)-1)*(((((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Interp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Interp) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Interp) ((((((((((enum __pyx_t_8pysndlib_3clm_Interp)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Interp)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Interp, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Interp, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (enum __pyx_t_8pysndlib_3clm_Interp) -1;
    } else {
        enum __pyx_t_8pysndlib_3clm_Interp val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_8pysndlib_3clm_Interp) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Interp(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_8pysndlib_3clm_Interp");
    return (enum __pyx_t_8pysndlib_3clm_Interp) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_8pysndlib_3clm_Interp");
    return (enum __pyx_t_8pysndlib_3clm_Interp) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Window __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Window(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Window neg_one = (enum __pyx_t_8pysndlib_3clm_Window) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Window) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(enum __pyx_t_8pysndlib_3clm_Window) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_8pysndlib_3clm_Window) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) >= 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((((enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) >= 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((((((enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) >= 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((((((((enum __pyx_t_8pysndlib_3clm_Window)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum __pyx_t_8pysndlib_3clm_Window) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Window, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((enum __pyx_t_8pysndlib_3clm_Window)-1)*(((((enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) ((((((enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((enum __pyx_t_8pysndlib_3clm_Window)-1)*(((((((enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) ((((((((enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) (((enum __pyx_t_8pysndlib_3clm_Window)-1)*(((((((((enum __pyx_t_8pysndlib_3clm_Window)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Window, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Window) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Window) ((((((((((enum __pyx_t_8pysndlib_3clm_Window)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Window)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Window, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Window, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (enum __pyx_t_8pysndlib_3clm_Window) -1;
    } else {
        enum __pyx_t_8pysndlib_3clm_Window val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_8pysndlib_3clm_Window) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Window(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_8pysndlib_3clm_Window");
    return (enum __pyx_t_8pysndlib_3clm_Window) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_8pysndlib_3clm_Window");
    return (enum __pyx_t_8pysndlib_3clm_Window) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Spectrum __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Spectrum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Spectrum neg_one = (enum __pyx_t_8pysndlib_3clm_Spectrum) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Spectrum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_8pysndlib_3clm_Spectrum) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) >= 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) >= 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) >= 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum __pyx_t_8pysndlib_3clm_Spectrum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((enum __pyx_t_8pysndlib_3clm_Spectrum)-1)*(((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) ((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((enum __pyx_t_8pysndlib_3clm_Spectrum)-1)*(((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) ((((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) (((enum __pyx_t_8pysndlib_3clm_Spectrum)-1)*(((((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Spectrum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Spectrum) ((((((((((enum __pyx_t_8pysndlib_3clm_Spectrum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Spectrum)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Spectrum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Spectrum, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (enum __pyx_t_8pysndlib_3clm_Spectrum) -1;
    } else {
        enum __pyx_t_8pysndlib_3clm_Spectrum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_8pysndlib_3clm_Spectrum) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Spectrum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_8pysndlib_3clm_Spectrum");
    return (enum __pyx_t_8pysndlib_3clm_Spectrum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_8pysndlib_3clm_Spectrum");
    return (enum __pyx_t_8pysndlib_3clm_Spectrum) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE enum __pyx_t_8pysndlib_3clm_Polynomial __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Polynomial neg_one = (enum __pyx_t_8pysndlib_3clm_Polynomial) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Polynomial) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_8pysndlib_3clm_Polynomial) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) >= 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) >= 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) >= 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum __pyx_t_8pysndlib_3clm_Polynomial) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((enum __pyx_t_8pysndlib_3clm_Polynomial)-1)*(((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) ((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((enum __pyx_t_8pysndlib_3clm_Polynomial)-1)*(((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) ((((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) (((enum __pyx_t_8pysndlib_3clm_Polynomial)-1)*(((((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum __pyx_t_8pysndlib_3clm_Polynomial, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum __pyx_t_8pysndlib_3clm_Polynomial) ((((((((((enum __pyx_t_8pysndlib_3clm_Polynomial)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_8pysndlib_3clm_Polynomial)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Polynomial, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_8pysndlib_3clm_Polynomial, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (enum __pyx_t_8pysndlib_3clm_Polynomial) -1;
    } else {
        enum __pyx_t_8pysndlib_3clm_Polynomial val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_8pysndlib_3clm_Polynomial) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_8pysndlib_3clm_Polynomial(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_8pysndlib_3clm_Polynomial");
    return (enum __pyx_t_8pysndlib_3clm_Polynomial) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_8pysndlib_3clm_Polynomial");
    return (enum __pyx_t_8pysndlib_3clm_Polynomial) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
  static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int64_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) {
                                return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) {
                                return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) {
                                return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int64_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(int64_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (int64_t) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (int64_t) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (int64_t) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (int64_t) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (int64_t) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((int64_t) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((int64_t) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE mus_sample_t __Pyx_PyInt_As_mus_sample_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const mus_sample_t neg_one = (mus_sample_t) -1, const_zero = (mus_sample_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(mus_sample_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(mus_sample_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (mus_sample_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(mus_sample_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(mus_sample_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) >= 2 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((((mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(mus_sample_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) >= 3 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((((((mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(mus_sample_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) >= 4 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((((((((mus_sample_t)digits[3]) << PyLong_SHIFT) | (mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (mus_sample_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(mus_sample_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_sample_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(mus_sample_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_sample_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(mus_sample_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(mus_sample_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((mus_sample_t)-1)*(((((mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(mus_sample_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (mus_sample_t) ((((((mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(mus_sample_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((mus_sample_t)-1)*(((((((mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(mus_sample_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (mus_sample_t) ((((((((mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(mus_sample_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (mus_sample_t) (((mus_sample_t)-1)*(((((((((mus_sample_t)digits[3]) << PyLong_SHIFT) | (mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(mus_sample_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_sample_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_sample_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (mus_sample_t) ((((((((((mus_sample_t)digits[3]) << PyLong_SHIFT) | (mus_sample_t)digits[2]) << PyLong_SHIFT) | (mus_sample_t)digits[1]) << PyLong_SHIFT) | (mus_sample_t)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(mus_sample_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_sample_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(mus_sample_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_sample_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (mus_sample_t) -1;
    } else {
        mus_sample_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (mus_sample_t) -1;
        val = __Pyx_PyInt_As_mus_sample_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to mus_sample_t");
    return (mus_sample_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to mus_sample_t");
    return (mus_sample_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE mus_header_t __Pyx_PyInt_As_mus_header_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const mus_header_t neg_one = (mus_header_t) -1, const_zero = (mus_header_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(mus_header_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(mus_header_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (mus_header_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(mus_header_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(mus_header_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) >= 2 * PyLong_SHIFT)) {
                                return (mus_header_t) (((((mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(mus_header_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) >= 3 * PyLong_SHIFT)) {
                                return (mus_header_t) (((((((mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(mus_header_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) >= 4 * PyLong_SHIFT)) {
                                return (mus_header_t) (((((((((mus_header_t)digits[3]) << PyLong_SHIFT) | (mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (mus_header_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(mus_header_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_header_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(mus_header_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_header_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(mus_header_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(mus_header_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (mus_header_t) (((mus_header_t)-1)*(((((mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(mus_header_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (mus_header_t) ((((((mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(mus_header_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (mus_header_t) (((mus_header_t)-1)*(((((((mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(mus_header_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (mus_header_t) ((((((((mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(mus_header_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (mus_header_t) (((mus_header_t)-1)*(((((((((mus_header_t)digits[3]) << PyLong_SHIFT) | (mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(mus_header_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(mus_header_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(mus_header_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (mus_header_t) ((((((((((mus_header_t)digits[3]) << PyLong_SHIFT) | (mus_header_t)digits[2]) << PyLong_SHIFT) | (mus_header_t)digits[1]) << PyLong_SHIFT) | (mus_header_t)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(mus_header_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_header_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(mus_header_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(mus_header_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (mus_header_t) -1;
    } else {
        mus_header_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (mus_header_t) -1;
        val = __Pyx_PyInt_As_mus_header_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to mus_header_t");
    return (mus_header_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to mus_header_t");
    return (mus_header_t) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Interp(enum __pyx_t_8pysndlib_3clm_Interp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Interp neg_one = (enum __pyx_t_8pysndlib_3clm_Interp) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Interp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Interp) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Interp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Interp),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Interp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Polynomial(enum __pyx_t_8pysndlib_3clm_Polynomial value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Polynomial neg_one = (enum __pyx_t_8pysndlib_3clm_Polynomial) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Polynomial) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Polynomial));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Spectrum(enum __pyx_t_8pysndlib_3clm_Spectrum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Spectrum neg_one = (enum __pyx_t_8pysndlib_3clm_Spectrum) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Spectrum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Spectrum));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_8pysndlib_3clm_Window(enum __pyx_t_8pysndlib_3clm_Window value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_8pysndlib_3clm_Window neg_one = (enum __pyx_t_8pysndlib_3clm_Window) -1, const_zero = (enum __pyx_t_8pysndlib_3clm_Window) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Window) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_8pysndlib_3clm_Window) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Window),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_8pysndlib_3clm_Window));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(char) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    case 2:
                        if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
                                return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
                                return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
                                return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                            }
                        }
                        break;
                }
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(char) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    case -2:
                        if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                                return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                                return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                                return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                                return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                                return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                                return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(char) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (char) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (char) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (char) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (char) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (char) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((char) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((char) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* FormatTypeName */
  #if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name_2);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s__630);
    }
    return name;
}
#endif

/* PyObjectCallMethod1 */
  #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_GetMethod;
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* CoroutineBase */
  #include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    CYTHON_UNUSED_VAR(__pyx_tstate);
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_CLEAR(exc_state->exc_value);
#else
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
#endif
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    CYTHON_MAYBE_UNUSED_VAR(closing);
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_value) {
        #if CYTHON_COMPILING_IN_PYPY
        #else
        PyObject *exc_tb;
        #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
        exc_tb = PyException_GetTraceback(exc_state->exc_value);
        #elif PY_VERSION_HEX >= 0x030B00a4
        exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
        #else
        exc_tb = exc_state->exc_traceback;
        #endif
        if (exc_tb) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
            #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
            Py_DECREF(exc_tb);
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body(self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
#if CYTHON_COMPILING_IN_PYPY
    CYTHON_UNUSED_VAR(exc_state);
#else
    PyObject *exc_tb;
    #if PY_VERSION_HEX >= 0x030B00a4
    if (!exc_state->exc_value) return;
    exc_tb = PyException_GetTraceback(exc_state->exc_value);
    #else
    exc_tb = exc_state->exc_traceback;
    #endif
    if (likely(exc_tb)) {
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
        #if PY_VERSION_HEX >= 0x030B00a4
        Py_DECREF(exc_tb);
        #endif
    }
#endif
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
#if PY_VERSION_HEX < 0x030d00A1
            _PyGen_SetStopIterationValue(result);
#else
            if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
                PyErr_SetObject(PyExc_StopIteration, result);
            } else {
                PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
                if (likely(exc != NULL)) {
                    PyErr_SetObject(PyExc_StopIteration, exc);
                    Py_DECREF(exc);
                }
            }
#endif
        }
        Py_DECREF(result);
        result = NULL;
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (unlikely(PyErr_Occurred())) {
                PyErr_WriteUnraisable(yf);
            }
        } else {
            retval = __Pyx_PyObject_CallNoArg(meth);
            Py_DECREF(meth);
            if (unlikely(!retval))
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
    CYTHON_UNUSED_VAR(arg);
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (unlikely(PyErr_Occurred())) {
                    gen->is_running = 0;
                    return NULL;
                }
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = __Pyx_PyObject_Call(meth, args, NULL);
            } else {
                PyObject *cargs[4] = {NULL, typ, val, tb};
                ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_VISIT(exc_state->exc_value);
#else
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
#endif
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
#else
        Py_TYPE(gen)->tp_del(self);
        if (unlikely(Py_REFCNT(self) > 0))
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    __Pyx_PyHeapTypeObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (likely(--self->ob_refcnt == 0)) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_name;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_name, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_qualname;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
{
    PyObject *frame = self->gi_frame;
    CYTHON_UNUSED_VAR(context);
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    #if PY_VERSION_HEX >= 0x030B00a4
    gen->gi_exc_state.exc_value = NULL;
    #else
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
    #endif
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
  #ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (unlikely(!module)) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
  static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_GeneratorType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
    {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
    {Py_tp_iter, (void *)PyObject_SelfIter},
    {Py_tp_iternext, (void *)__Pyx_Generator_Next},
    {Py_tp_methods, (void *)__pyx_Generator_methods},
    {Py_tp_members, (void *)__pyx_Generator_memberlist},
    {Py_tp_getset, (void *)__pyx_Generator_getsets},
    {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict},
#if CYTHON_USE_TP_FINALIZE
    {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
#endif
    {0, 0},
};
static PyType_Spec __pyx_GeneratorType_spec = {
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    __pyx_GeneratorType_slots
};
#else
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_Generator_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
#endif
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
  static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    const char* rt_version = Py_GetVersion();
    unsigned long version = 0;
    unsigned long factor = 0x01000000UL;
    unsigned int digit = 0;
    int i = 0;
    while (factor) {
        while ('0' <= rt_version[i] && rt_version[i] <= '9') {
            digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
            ++i;
        }
        version += factor * digit;
        if (rt_version[i] != '.')
            break;
        digit = 0;
        factor >>= 8;
        ++i;
    }
    return version;
#endif
}
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* FunctionExport */
  static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* InitStrings */
  #if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
